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 Distribution

dbnomics-data-model-1.0.0b1.tar.gz (118.3 kB view details)

Uploaded Source

Built Distribution

dbnomics_data_model-1.0.0b1-py3-none-any.whl (177.7 kB view details)

Uploaded Python 3

File details

Details for the file dbnomics-data-model-1.0.0b1.tar.gz.

File metadata

  • Download URL: dbnomics-data-model-1.0.0b1.tar.gz
  • Upload date:
  • Size: 118.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for dbnomics-data-model-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 f19fae54a3fe4067db86660fffedcea3c048809a2e401cd4522a7ba920a1bbb7
MD5 ec4cc6fc490823096504dad5746c0596
BLAKE2b-256 205b68b7fb63d6111d63ed09acb149f4f305c9c7aff11df1a6021e7f3a6e2d33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbnomics_data_model-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 aadf7615711987f1e00b24540ffb78a6cb8731c58594ed954e7361882f2351f3
MD5 5f4f97a7eca91476bd2b48538855cd70
BLAKE2b-256 d49d6ea2ab0d43353a6aff216569f4c7e9e9a55739451f59b3cd7b2211a79fdf

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