Metadata-Version: 2.1
Name: swh.core
Version: 0.0.80
Summary: Software Heritage core utilities
Home-page: https://forge.softwareheritage.org/diffusion/DCORE/
Author: Software Heritage developers
Author-email: swh-devel@inria.fr
License: UNKNOWN
Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
Project-URL: Funding, https://www.softwareheritage.org/donate
Project-URL: Source, https://forge.softwareheritage.org/source/swh-core
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Description-Content-Type: text/markdown
Requires-Dist: Click
Requires-Dist: Deprecated
Requires-Dist: PyYAML
Provides-Extra: db
Requires-Dist: psycopg2 ; extra == 'db'
Provides-Extra: http
Requires-Dist: aiohttp ; extra == 'http'
Requires-Dist: aiohttp-utils (>=3.1.1) ; extra == 'http'
Requires-Dist: arrow ; extra == 'http'
Requires-Dist: decorator ; extra == 'http'
Requires-Dist: Flask ; extra == 'http'
Requires-Dist: msgpack (>0.5) ; extra == 'http'
Requires-Dist: python-dateutil ; extra == 'http'
Requires-Dist: requests ; extra == 'http'
Provides-Extra: logging
Requires-Dist: systemd-python ; extra == 'logging'
Provides-Extra: testing
Requires-Dist: pytest ; extra == 'testing'
Requires-Dist: pytest-postgresql ; extra == 'testing'
Requires-Dist: requests-mock ; extra == 'testing'
Requires-Dist: hypothesis (>=3.11.0) ; extra == 'testing'
Requires-Dist: pre-commit ; extra == 'testing'
Requires-Dist: pytz ; extra == 'testing'
Requires-Dist: psycopg2 ; extra == 'testing'
Requires-Dist: aiohttp ; extra == 'testing'
Requires-Dist: aiohttp-utils (>=3.1.1) ; extra == 'testing'
Requires-Dist: arrow ; extra == 'testing'
Requires-Dist: decorator ; extra == 'testing'
Requires-Dist: Flask ; extra == 'testing'
Requires-Dist: msgpack (>0.5) ; extra == 'testing'
Requires-Dist: python-dateutil ; extra == 'testing'
Requires-Dist: requests ; extra == 'testing'
Requires-Dist: systemd-python ; extra == 'testing'

swh-core
========

core library for swh's modules:
- config parser
- hash computations
- serialization
- logging mechanism
- database connection
- http-based RPC client/server

Development
-----------

We strongly recommend you to use a [virtualenv][1] if you want to run tests or
hack the code.

To set up your development environment:

```
(swh) user@host:~/swh-environment/swh-core$ pip install -e .[testing]
```

This will install every Python package needed to run this package's tests.

Unit tests can be executed using [pytest][2] or [tox][3].

```
(swh) user@host:~/swh-environment/swh-core$ pytest
============================== test session starts ==============================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.8.0, pluggy-0.12.0
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/ddouard/src/swh-environment/swh-core/.hypothesis/examples')
rootdir: /home/ddouard/src/swh-environment/swh-core, inifile: pytest.ini
plugins: requests-mock-1.6.0, hypothesis-4.26.4, celery-4.3.0, postgresql-1.4.1
collected 89 items

swh/core/api/tests/test_api.py ..                                         [  2%]
swh/core/api/tests/test_async.py ....                                     [  6%]
swh/core/api/tests/test_serializers.py .....                              [ 12%]
swh/core/db/tests/test_db.py ....                                         [ 16%]
swh/core/tests/test_cli.py ......                                         [ 23%]
swh/core/tests/test_config.py ..............                              [ 39%]
swh/core/tests/test_statsd.py ........................................... [ 87%]
....                                                                      [ 92%]
swh/core/tests/test_utils.py .......                                      [100%]
===================== 89 passed, 9 warnings in 6.94 seconds =====================
```

Note: this git repository uses [pre-commit][4] hooks to ensure better and more
consistent code. It should already be installed in your virtualenv (if not,
just type `pip install pre-commit`). Make sure to activate it in your local
copy of the git repository:

```
(swh) user@host:~/swh-environment/swh-core$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
```

Please read the [developer setup manual][5] for more information on how to hack
on Software Heritage.

[1]: https://virtualenv.pypa.io
[2]: https://docs.pytest.org
[3]: https://tox.readthedocs.io
[4]: https://pre-commit.com
[5]: https://docs.softwareheritage.org/devel/developer-setup.html


