Skip to main content

Tool for data modelling in Gen3

Project description

Developing a Gen3 Data Dictionary

overview.png

This repository aims to provide the documentation, learning materials, and software tools to facilitate the creation of a data model in Gen3.

Pre-Reading: Please become familiar with some core data modelling concepts before starting.

Using Gen3SchemaDev as a data modelling tool

Fixing $ref properties in an existing dictionary

JSON Schema draft-04 (which Gen3 uses) ignores any keyword sitting as a direct sibling of $ref, so properties written as {description: ..., $ref: _definitions.yaml#/X} lose their description in the data-dictionary viewer. The fix-refs command rewrites such properties in place, moving the $ref into an allOf list so annotations survive resolution:

gen3schemadev fix-refs -y path/to/dictionary --dry-run   # preview changes
gen3schemadev fix-refs -y path/to/dictionary             # rewrite in place

The command is idempotent and never touches bare refs, refs already inside allOf/anyOf/oneOf, the properties: {$ref: ...} merge construct, or _definitions.yaml/_terms.yaml/_settings.yaml.

Deep dive into Gen3 Data Modelling

Special Thanks to Marion Shadbolt for providing the source material

  1. Gen3 Dictionary Overview
  2. Gen3 Schema Explained
    1. Descriptors
    2. Links
    3. Properties
  3. Example of a Gen3 Schema yaml
  4. Handy tips
  5. FAIR Concepts for Data Modelling

For Developers

Installation and testing

# To install
pip install poetry
poetry install
source $(poetry env info --path)/bin/activate
gen3schemadev --version

# To run tests
poetry run pytest

Contributing

Gen3SchemaDev is an open source project, and we highly encourage any contributions and PRs. Specifically we need the community to help with the following:

  1. Keeping the gen3 metaschema up to date
  2. Adding business rule logic to the rule validator module.
    1. For example, a node with the category data_file should have a collection of required data file properties such as md5sum, filesize, etc.

For PRs, please follow the contributing guidelines.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen3schemadev-2.5.0.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gen3schemadev-2.5.0-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file gen3schemadev-2.5.0.tar.gz.

File metadata

  • Download URL: gen3schemadev-2.5.0.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1018-azure

File hashes

Hashes for gen3schemadev-2.5.0.tar.gz
Algorithm Hash digest
SHA256 37f33eda2bc6cf96d004443841e3c59f6257d876bc40550e493b012e8c8e2aa3
MD5 a720b70f93b32d783a8c7c13ac30a9d0
BLAKE2b-256 237bfa5ade0d4185981a6b45a7ec0a6bf55adf3e3155b628dfbf2d939d3bf779

See more details on using hashes here.

File details

Details for the file gen3schemadev-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: gen3schemadev-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 51.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1018-azure

File hashes

Hashes for gen3schemadev-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51cc0c2b0502a890f319329ec3e7f4f45b60bc85464ec750310832f2d287260d
MD5 ff363cca41291557d3120da9836a4292
BLAKE2b-256 d8385fe25f15bb549497e09d811d013cc0aea5746e4d9ee80df329d83c23b8db

See more details on using hashes here.

Supported by

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