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

generate does not overwrite your files

gen3schemadev generate never overwrites existing files by default. Generating into an empty folder works as it always has; generating into a folder that already contains files stops and lists exactly what it would have replaced, along with the ways forward.

This matters because a dictionary repository can be run in more than one way. Some treat the input_yaml as the source of truth and regenerate from it. Others generate once and then edit the Gen3 schemas directly, at which point the generated files are the dictionary. The tool cannot tell which you are doing, and guessing wrong destroys work.

  • --input-driven — the input_yaml is the source of truth; regenerate everything, and fail if the folder holds a file the input cannot produce
  • --only <node> — regenerate named nodes, leaving every other file untouched
  • --check — report whether the folder still matches the input, write nothing, exit non-zero on drift. This is the CI gate
  • --force — overwrite everything, discarding any hand edits

Nodes may also extend the packaged program, project and core_metadata_collection presets, adding properties while inheriting the node-level settings other Gen3 microservices depend on. See Running a Gen3 dictionary repository.

Null description placeholders

gen3schemadev validate warns about description: null placeholders anywhere in the dictionary (commonly in _definitions.yaml's enum definitions). The Gen3 metaschema requires descriptions to be strings; null placeholders cause "No Description" in the data-dictionary viewer and metaschema validation failures that surface on resolved node schemas, far from the offending definition. Remove the null description 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 3.0.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 3.0.0
File Size Uploaded Provenance Actions
gen3schemadev-3.0.0.tar.gz 54.5 kB Without provenance Details for gen3schemadev-3.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 117.3 kB

Release files / gen3schemadev-3.0.0.tar.gz

Download URL gen3schemadev-3.0.0.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
52dc991236b6d5d83211b778b5ecac050474b082bca0d1b7016ffdd458b24464
BLAKE2b-256 checksum
How to use checksums
339960860c5e8480e7ad7f879c9fac53da341292c9938d5a4dd3c9835b2e1622
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-1020-azure

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

Download URL gen3schemadev-3.0.0-py3-none-any.whl
Size 62.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4bc80998d2e2bbac2d96c8cbd29ed84872aed12769257c9dd9ab43c8565f447
BLAKE2b-256 checksum
How to use checksums
d131655c83a9e46b01311f1d652ad0f199a2c5a5cee86e209f2be9726b620ccc
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-1020-azure

Security for Gen3SchemaDev 3.0.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