Skip to content

chore!: document the schema-first workflow, adopt gen3schemadev 3.1.0, remove dead scaffolding#9

Merged
JoshuaHarris391 merged 2 commits into
mainfrom
chore/schema-first-polish
Jul 24, 2026
Merged

chore!: document the schema-first workflow, adopt gen3schemadev 3.1.0, remove dead scaffolding#9
JoshuaHarris391 merged 2 commits into
mainfrom
chore/schema-first-polish

Conversation

@JoshuaHarris391

Copy link
Copy Markdown
Collaborator

This repository's model is maintained by hand — the node YAMLs in dictionary/prod_dict/ are the
source of truth. Nothing said so. The README documented a "generate into test_dict, copy elements
into prod_dict" loop that nobody follows, so a new contributor had no way to know where the model
actually lives.

Why input_dd.yaml had to go

It was a fork artefact, not a build input — no property definitions at all, just 27 node stubs
and 26 link triples, frozen since 2025-11-10 while the dictionary moved on across 29 commits.

Regenerating from it would have:

Properties destroyed 343 of 448 (77%)proteomics_assay 37 → 2, medical_history 31 → 2
Custom enum definitions wiped all of them, leaving dangling $refs across the node files
Links dropped 11 of 45, including every extra parent on qc_file, supplementary_file, analysis_workflow
project.yaml / program.yaml replaced by a generic template, losing systemProperties and uniqueKeysbreaks Gen3 submission
_dict_version regressed 1.2.0 → 0.5.0

The README now states the rule and the reason, rather than just forbidding it.

Removed

dictionary/input_dd.yaml, dictionary/test_dict/ (a byte-identical mirror of prod_dict), both
copy scripts, scripts/add_enum_to_def.py with its stale CSV, and notebook.ipynb.

On the enum script: it existed to re-inject enums after generate overwrote _definitions.yaml, and
nothing generates. Nothing referenced it. _definitions.yaml is now the richer record anyway — 373
enumDef entries against the CSV's 195 rows, with more source and term_id annotations — so
deleting the CSV loses no provenance.

gen3schemadev 2.6.1 → 3.1.0

For a validate-and-bundle-only repository the value is specific: generate now refuses to
overwrite existing files
, so the accidental wipe described above is no longer possible. The bundle
is re-serialised in sorted key order as a side effect; content unchanged.

CI extended

It previously validated only the loose YAMLs. Now also:

  • the bundle is validated in its own right — it is what Gen3 loads, and was never checked
  • bundle freshness — a branch can no longer edit a schema and forget to re-bundle
  • version consistency between _settings.yaml and pyproject.toml

Each gate was negative-tested: editing a schema without re-bundling, mismatching the version, and
adding a property with no type all fail as they should.

Verification

No node schema is modified. All 32 dictionary YAMLs are byte-identical to main, verified by
hashing before and after — the check that proves nothing regenerated. The bundle's content is
identical to what was committed, differing only in key order, confirmed by parsing both. All four
gates pass locally, bundling twice is byte-stable, and every README link resolves.

PR #8 and its branch are untouched.

Follow-ups, not done here

  • pyproject.toml is brought to 1.2.0 to match _dict_version, but no tag is cut — releasing is
    a separate decision and six environments pin versions independently
  • docs/acdc_proteomics_metabolomics_methods_and_rationale.md references a companion implementation
    spec that does not exist in the repository
  • Dependabot reports 19 vulnerabilities on the default branch, unrelated to this change

🤖 Generated with Claude Code

…, remove dead scaffolding

The node YAMLs in dictionary/prod_dict/ are this repository's source of truth
and are edited by hand, but nothing said so. The README documented a
"generate into test_dict, copy elements into prod_dict" loop that nobody
follows, leaving a new contributor no way to know where the model lives.

dictionary/input_dd.yaml was a fork artefact, not a build input. It carried no
property definitions at all - 27 node stubs and 26 link triples, frozen since
2025-11-10 while the dictionary moved on across 29 commits. Regenerating from it
would have destroyed 343 of 448 properties, wiped every custom enum definition,
dropped 11 links, and replaced project.yaml and program.yaml with a generic
template that breaks Gen3 submission. It is removed, along with test_dict (a
byte-identical mirror), both copy scripts, the enum injection script and its
stale CSV, and a notebook that no longer runs.

Upgrades gen3schemadev from 2.6.1 to 3.1.0. For a repository that only validates
and bundles, the value is that generate now refuses to overwrite existing files -
the accidental wipe described above is no longer possible. The bundle is
re-serialised in sorted key order as a result; its content is unchanged.

Extends CI, which previously validated only the loose YAMLs: the bundle is now
validated in its own right, checked for staleness against a fresh build, and the
dictionary version is checked for consistency. Each gate was confirmed to fail on
the condition it guards.

Brings pyproject.toml to 1.2.0 to match _dict_version, which the README now
documents as canonical, and records the deployment loop - tag here, bump
dictionary_version in acdc-aws-etl-pipeline, run deploy_dd.sh - which nothing
captured before.

No node schema is modified: all 32 dictionary YAMLs are byte-identical to main.
…lish

# Conflicts:
#	dictionary/prod_dict/acdc_schema.json
#	dictionary/test_dict/_definitions.yaml
#	dictionary/test_dict/acdc_schema.json
#	dictionary/test_dict/metabolomics_assay.yaml
#	dictionary/test_dict/metabolomics_file.yaml
#	dictionary/test_dict/proteomics_assay.yaml
#	dictionary/test_dict/proteomics_file.yaml
#	dictionary/test_dict/qc_file.yaml
@JoshuaHarris391
JoshuaHarris391 merged commit 1b699bc into main Jul 24, 2026
1 check passed
@JoshuaHarris391
JoshuaHarris391 deleted the chore/schema-first-polish branch July 24, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant