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

Download files

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

Source Distribution

gen3schemadev-4.0.0.tar.gz (60.9 kB view details)

Uploaded Source

Built Distribution

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

gen3schemadev-4.0.0-py3-none-any.whl (70.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gen3schemadev-4.0.0.tar.gz
Algorithm Hash digest
SHA256 60bed51ebd2265ff3cb055c04d6e8c1c0a3007c4881d45b9597214c439169c83
MD5 8178f3136c51dcb79274f2d07699fdd6
BLAKE2b-256 3327f8f24c4de8b7dc6b2470195de76c46d81c51267a870c594a1f839c2ea65a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gen3schemadev-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b29057fc1a0a5c963f5e2d2580c64909ea45acec62cdb4ba5a47b92ea43abe5
MD5 0cc6706214fa296e19712c45bb80821d
BLAKE2b-256 a77937c5d48d15db2fa47525c54ff33dd06427ead53cf503e77e0d016858bcc3

See more details on using hashes here.

Release history Release notifications | RSS feed

4.0.1

2 files

This release

4.0.0 This release

2 files

3.2.0

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

2 files

2.5.0

2 files

2.4.0

2 files

2.3.6

2 files

2.3.5

2 files

2.3.4

2 files

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.11

2 files

Supported by

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