Generate partitions/subsets of knowledge split by ioos_category#180
Draft
abkfenris wants to merge 1 commit into
Draft
Generate partitions/subsets of knowledge split by ioos_category#180abkfenris wants to merge 1 commit into
abkfenris wants to merge 1 commit into
Conversation
This was referenced Jun 24, 2026
Merged
Javascript size report
✅ No size change. |
This was referenced Jun 25, 2026
Draft
Add utils/generate_partitions.py (uv script) that reads core/standards/*.yaml
and emits both compact JSON and human-readable YAML for:
data/all-standards.{json,yaml} — full CF vocabulary
data/all-knowledge.{json,yaml} — CF standards + all knowledge entries
data/partitions/{category}.{json,yaml} — 14 per-IOOS-category self-contained subsets
Each partition: { cf_standards: {standard_names, aliases}, knowledge: [...] }
Consumers call loadStandards(data.cf_standards) + loadKnowledgeObjects(data.knowledge).
YAML scalars that look like numbers (e.g. 'unit: 1', 'unit: 0.001') are coerced
to strings in both scripts — matching serde_yaml's automatic coercion but
preserving correctness through the JSON path.
Extend gen-data.mjs to mirror the same partition logic into public/data/ for
Vite dev/test serving (identical format, JS-only dependency chain).
Add 3 Vitest tests verifying partition loading:
- meteorology subset is self-contained (out-of-category standards absent)
- all-knowledge covers every category
- all-standards loads the full vocabulary without knowledge enrichment
Add generate_partitions nox session (off by default, opt-in for CI release path).
Full nox suite passes: 19+11 Rust, 15 Vitest, 5 Playwright, 1 pack smoke.
f4285cd to
5caceff
Compare
407164e to
16f471a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add utils/generate_partitions.py (uv script) that reads core/standards/*.yaml
and emits both compact JSON and human-readable YAML for:
data/all-standards.{json,yaml} — full CF vocabulary
data/all-knowledge.{json,yaml} — CF standards + all knowledge entries
data/partitions/{category}.{json,yaml} — 14 per-IOOS-category self-contained subsets
Each partition: { cf_standards: {standard_names, aliases}, knowledge: [...] }
Consumers call loadStandards(data.cf_standards) + loadKnowledgeObjects(data.knowledge).
YAML scalars that look like numbers (e.g. 'unit: 1', 'unit: 0.001') are coerced
to strings in both scripts — matching serde_yaml's automatic coercion but
preserving correctness through the JSON path.
Extend gen-data.mjs to mirror the same partition logic into public/data/ for
Vite dev/test serving (identical format, JS-only dependency chain).
Add 3 Vitest tests verifying partition loading:
Add generate_partitions nox session (off by default, opt-in for CI release path).
Full nox suite passes: 19+11 Rust, 15 Vitest, 5 Playwright, 1 pack smoke.
This is part 4 of 6 in a stack made with GitButler: