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-hypernode.com/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 Distributions
Built Distribution
File details
Details for the file dbnomics_data_model-1.0.0b11-py3-none-any.whl
.
File metadata
- Download URL: dbnomics_data_model-1.0.0b11-py3-none-any.whl
- Upload date:
- Size: 175.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2a5f990dcab06d5851c31a8a3a50c28d00539b32b8c37e9a8266fe4f621322 |
|
MD5 | f76965a1206fb310d0dcb9704f0c784c |
|
BLAKE2b-256 | 89c0545f0ea1cd0d390a99adcdcbb461551244e5209f5b7a28161fa47823965a |