Releases: AustralianBioCommons/gen3schemadev
Release list
v2.6.1
Reverted
- The
allOf$ref wrapping introduced in v2.5.0 has been reverted (a971677). It was based on a misdiagnosis: Gen3's resolver merges a property's sibling keys over the referenced definition, so the normal sibling form{description: ..., $ref: ...}works fine. The actual cause of "No Description" in the data-dictionary viewer wasdescription: nullplaceholders in the enum definitions of_definitions.yaml.
What changed
format_datetimeemits the sibling form{description: ..., $ref: _definitions.yaml#/datetime}— descriptions are still preserved (unlike ≤2.4.0, which silently dropped them), just without theallOfwrapper.- The
project.yamlandprogram.yamltemplates are back to their 2.4.0 sibling-$refform. - The
fix-refsCLI command is removed — do not use it from 2.5.0/2.6.0.
What is kept
- The
description: nullwarning from v2.6.0 stays invalidate: it scans the whole dictionary before resolution and lists every offending definition by file and path (e.g._definitions.yaml: enum_yes_no.description). Removing those null keys is the actual fix for missing descriptions in the viewer. validateremains tolerant ofallOf/anyOf/oneOf-wrapped refs.
If you already ran fix-refs on a dictionary
No action needed: the wrapped form is valid JSON Schema and validate continues to accept it. You may revert the wrapping in your dictionary if you prefer the conventional sibling style, but it is not required.
Full Changelog: v2.6.0...v2.6.1
v2.6.0
Warning
The allOf $ref wrapping introduced in v2.5.0 was based on a misdiagnosis and has been reverted in v2.6.1. Do not use the fix-refs command from this release. The real cause of missing descriptions in the data-dictionary viewer is description: null placeholders in _definitions.yaml — the null-description warning (kept in v2.6.1) diagnoses it.
Features
- Warn about
description: nullplaceholders invalidateandfix-refs(f571c79)
The Gen3 metaschema requires description to be a string, but generated shared definitions often carry description: null placeholders. A direct $ref masks the null during resolution (the referencing property's own description merges over it), while a bare or allOf-wrapped ref — including refs wrapped by v2.5.0's fix-refs — exposes it: metaschema validation then fails on a resolved node schema, far from the offending definition, and aborts on the first hit.
Both commands now scan the whole dictionary up front and print a single warning block listing every offender by file and dotted path (e.g. _definitions.yaml: enum_yes_no.description), so the root cause is named before the confusing downstream failure.
Details
validateruns the scan on the bundled schemas before rule validation and resolution.fix-refsruns it after its summary (also in--dry-run), since wrapping is what exposes the nulls.- Warning only — dictionaries where masked nulls currently pass keep passing; the metaschema stage remains the enforcer. The suggested remediation is to remove the null
descriptionkeys from the shared definitions: removing adds no shared description, so nothing leaks onto referencing properties.
Full Changelog: v2.5.0...v2.6.0
v2.5.0
Warning
The allOf $ref wrapping introduced in v2.5.0 was based on a misdiagnosis and has been reverted in v2.6.1. Do not use the fix-refs command from this release. The real cause of missing descriptions in the data-dictionary viewer is description: null placeholders in _definitions.yaml — the null-description warning (kept in v2.6.1) diagnoses it.
Features
- Preserve
$refsibling annotations viaallOfwrapping and addfix-refscommand (1f805ad)
Gen3 resolves data dictionaries with JSON Schema draft-04 semantics, where any keyword sitting as a direct sibling of $ref is ignored during resolution. Properties written as {description: ..., $ref: ...} therefore lost their description/termDef/term in dictionaryutils, and the data-dictionary viewer showed "No Description". This release keeps those annotations by moving the $ref into an allOf list, with the annotations as siblings of allOf.
Details
- New
refsmodule — single source of truth for the transform. Idempotent; never touches bare refs, refs already insideallOf/anyOf/oneOf, theproperties: {$ref: ...}merge construct, or_definitions.yaml/_terms.yaml/_settings.yaml. - Generator fix —
format_datetimeno longer drops the property description when emitting the_definitions.yaml#/datetimeref; annotations are preserved besideallOf. - New CLI command —
gen3schemadev fix-refs -y <dir> [--dry-run]rewrites an existing dictionary in place (recursive) with a per-file, per-property report of what was wrapped and what was skipped and why. - Rule validator —
props_must_have_typenow recognises refs wrapped inallOf/anyOf/oneOf, so fixed properties are not flagged as missingtype/enum. Legacy top-level sibling refs still validate as before. - Shipped templates — sibling-
$refproperties inproject.yaml(id,programs) andprogram.yaml(id) rewritten to theallOfform.
Notes for downstream consumers
- Resolved-schema shape changes for wrapped properties: the referenced definition content now nests under
allOf[0]after resolution (gen3-validator), instead of being merged flat. - After updating a deployed dictionary, the compiled dictionary must be rebuilt and the portal cache refreshed before descriptions appear in the UI.
Full Changelog: v2.4.0...v2.5.0
v2.4.0
What's Changed
Features
- Broaden supported Python versions from 3.12-only to 3.9.5+ (now 3.9, 3.10, 3.11, 3.12) (a6658bf)
Other
- Add a CI matrix that builds and runs the test suite on Python 3.9, 3.10, 3.11, and 3.12
- Re-resolve and lock dependencies across the wider Python range
Full Changelog: v2.3.6...v2.4.0
v2.3.6
What's Changed
fix: preserve user-defined data_* properties on data_file nodes (#67)
Bug: construct_props in src/gen3schemadev/converter.py unconditionally overwrote data_category, data_format, data_type, and core_metadata_collections on any data_file node, silently discarding enum values a user had declared in input.yaml. Declaring, e.g., data_format with enums: [csv, txt] had no effect — the generated schema always received the hardcoded placeholders ['data_format_1', 'data_format_2', 'data_format_3'].
Fix: Switched those four assignments from dict[key] = to dict.setdefault(key, ...) so the hardcoded placeholders are only injected when the user has not already defined the property. User-authored definitions now survive end-to-end through gen3schemadev generate. Existing projects that rely on the default placeholders are unaffected.
Example — now works as expected:
- name: lipidomics_file
category: data_file
properties:
- name: data_format
type: enum
description: File format for lipidomics output
enums: [csv, txt]Tests: Added 6 regression tests in tests/test_converter.py plus a new fixture tests/input_example_file_props.yml covering preservation of each of the three reported properties, preservation of core_metadata_collections, the default-injection fallback path, and an end-to-end populate_template round-trip. Full suite: 99/99 passing.
Full Changelog: v2.3.5...v2.3.6
v2.3.5
What's Changed
Features
- Project foreign key link definitions (#66): Modified
create_link_propto useto_one_projectandto_many_projectdefinitions when linking toprojectnodes, as project usesforeign_key_project(id/code) instead of the standardforeign_key(id/submitter_id). Includes comprehensive tests covering all multiplicity scenarios for project links. - Project schema
codevalidation (#65): Added a newRuleValidatormethod to enforce that project schemas must includecodein their required properties list, as Gen3 usescodeas the unique project identifier. Includes comprehensive tests covering pass, fail, and skip scenarios for non-project schemas.
Chores
- Bump version to 2.3.5
v2.3.4
What's Changed
Improvements
- Upgraded
gen3-validatordependency to 2.x - Updated version to 2.3.4
Documentation
- Updated README.md
v2.3.3
What's Changed
- Fix project program allowed system props by @JoshuaHarris391 in #60
Full Changelog: v2.3.2...v2.3.3
v2.3.2
What's Changed
- Fix dont script program proj rule validate by @JoshuaHarris391 in #59
Full Changelog: v2.3.1...v2.3.2
v2.3.1
Full Changelog: v2.3.0...v2.3.1
- Fix added, rule validator now checks that
data_type,data_category, anddata_formatare props in a data_file node