Skip to main content

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.

Both fix-refs and validate also warn about description: null placeholders anywhere in the dictionary (commonly in _definitions.yaml): the Gen3 metaschema requires descriptions to be strings, and such placeholders fail metaschema validation once exposed through bare or allOf-wrapped refs. Remove the null keys to resolve the warning.

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

Metadata

Release files for Gen3SchemaDev 2.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Gen3SchemaDev 2.6.0
File Size Uploaded Provenance Actions
gen3schemadev-2.6.0.tar.gz 45.9 kB Without provenance Details for gen3schemadev-2.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Gen3SchemaDev 2.6.0
File Interpreter ABI Platform Actions
gen3schemadev-2.6.0-py3-none-any.whl Python 3 none any Details for gen3schemadev-2.6.0-py3-none-any.whl

Total release size: 98.8 kB

Release files / gen3schemadev-2.6.0.tar.gz

Download URL gen3schemadev-2.6.0.tar.gz
Size 45.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b49b90c46fd75a197041d21215f7b6ae7182f67cf7964bf12400e611b33e44b2
BLAKE2b-256 checksum
How to use checksums
adca166e4c46e0535e7a7daf46a059481c282f098d38ee40680a68d7d251c7c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1018-azure

Release files / gen3schemadev-2.6.0-py3-none-any.whl

Download URL gen3schemadev-2.6.0-py3-none-any.whl
Size 53.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
984f562da8b3feaca74fba5612865bea01ee516e615b71c7fa714cb39962f97b
BLAKE2b-256 checksum
How to use checksums
003b40e4233e17333578da6d095afdbcf6913953a1efae201e0a3c3f3f36d45c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1018-azure

Security for Gen3SchemaDev 2.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page