Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dbnomics_data_model-1.0.0b9-py3-none-any.whl (172.3 kB view details)

Uploaded Python 3

File details

Details for the file dbnomics_data_model-1.0.0b9-py3-none-any.whl.

File metadata

File hashes

Hashes for dbnomics_data_model-1.0.0b9-py3-none-any.whl
Algorithm Hash digest
SHA256 1ee79930b6ab26954b4e8dd899058d51b874f4bb0de7b4b1e0c315b6b5008a27
MD5 3773390cb4e157d01c12a7f9e7ae8559
BLAKE2b-256 9e3406e450a7d730737182653152e9cf8c89284c7d447ecc62b34af0b04ba0dc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page