Tool for data modelling in Gen3
Project description
Developing a Gen3 Data Dictionary
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
- Gen3 Dictionary Overview
- Gen3 Schema Explained
- Example of a Gen3 Schema yaml
- Handy tips
- 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:
- Keeping the gen3 metaschema up to date
- Adding business rule logic to the rule validator module.
- For example, a node with the category
data_fileshould have a collection of required data file properties such as md5sum, filesize, etc.
- For example, a node with the category
For PRs, please follow the contributing guidelines.
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gen3schemadev-2.6.0.tar.gz.
File metadata
- Download URL: gen3schemadev-2.6.0.tar.gz
- Upload date:
- Size: 45.9 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b49b90c46fd75a197041d21215f7b6ae7182f67cf7964bf12400e611b33e44b2
|
|
| MD5 |
6fea399bcb84804f2b5000198b1ed8bb
|
|
| BLAKE2b-256 |
adca166e4c46e0535e7a7daf46a059481c282f098d38ee40680a68d7d251c7c2
|
File details
Details for the file gen3schemadev-2.6.0-py3-none-any.whl.
File metadata
- Download URL: gen3schemadev-2.6.0-py3-none-any.whl
- Upload date:
- Size: 53.0 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
984f562da8b3feaca74fba5612865bea01ee516e615b71c7fa714cb39962f97b
|
|
| MD5 |
61f8de6a1e467ec46fc4c0318d4ce881
|
|
| BLAKE2b-256 |
003b40e4233e17333578da6d095afdbcf6913953a1efae201e0a3c3f3f36d45c
|