Provide classes for DBnomics entities and a storage abstraction
Project description
DBnomics Data Model
In DBnomics, once data has been downloaded from providers, it is converted in a common format: the DBnomics data model.
This Python package provides:
- model classes defining DBnomics entities (provider, dataset, series, etc.) with their business logic and validation rules
- a data storage abstraction to load and save those entities
- adapters implementing the data storage abstraction (e.g.
dbnomics_data_model.storage.adapters.filesystem
)
This package is used in particular by the convert script of fetchers in order to save data.
Documentation
Please read https://db.nomics.world/docs/data-model/
Validate data
To validate a directory containing data written by (or compatible with) the "filesystem" adapter:
dbnomics-validate-storage <storage_dir>
This script outputs the data validation errors it finds.
Code quality
Install the development dependencies:
pip install -e .[dev]
Run linter
flake8 .
Run type check
mypy -p dbnomics_data_model
Run tests
pytest
Run code coverage
coverage run
coverage html
Then open htmlcov/index.html
in your browser.
Publish a new version
For package maintainers:
git tag x.y.z
git push
git push --tags
GitLab CI will publish the package to https://pypi.org/project/dbnomics-data-model/ (see .gitlab-ci.yml
).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dbnomics-data-model-1.0.0b3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19145cb4a32ef973759e8ba9ee847ee58c43e1f0c38bf1692ecaac36d2122435 |
|
MD5 | 3bc54eb8e2b7317d81257e20fc25759c |
|
BLAKE2b-256 | 2fc32ae14d981378bf03ec0553f6eed51d9a358f4df0c8c7b8503b3930201b99 |
Hashes for dbnomics_data_model-1.0.0b3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5bec8ad75d8c70652c6b70a59bbb9bc2cc0e14677d244927776145589d6f675 |
|
MD5 | a5b3f219ecb95c096db6114b0f856a2d |
|
BLAKE2b-256 | 311738b0b95b0a00b8c330421b7845542529906b5f4dabf95fc68bfbf044d879 |