Skip to content

Use the knowledge partitons to make a NPM data package#181

Draft
abkfenris wants to merge 1 commit into
phase-2c-partition-subset-generationfrom
phase-2d-npm-data-package
Draft

Use the knowledge partitons to make a NPM data package#181
abkfenris wants to merge 1 commit into
phase-2c-partition-subset-generationfrom
phase-2d-npm-data-package

Conversation

@abkfenris

@abkfenris abkfenris commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Add js-data-pkg/ containing the standard_knowledge_data npm package —
a pure-JS companion to the WASM package that ships pre-generated IOOS
community knowledge and CF standard name partitions as tree-shakable
ESM modules.

Build script (js-data-pkg/scripts/build.mjs) reads core/standards/*.yaml
directly and emits gitignored ESM files:
all-standards.js — full CF vocabulary (~3.9 MB)
all-knowledge.js — CF subset + all 41 knowledge entries
partitions/{slug}.js — per-IOOS-category self-contained subsets

Package exports use wildcard subpath patterns so new categories are
picked up automatically without updating package.json:
import met from 'standard_knowledge_data/partitions/meteorology'

Add data_pkg_build nox session (off by default) and build_data_pkg CI
job that installs deps, runs the build, and smoke-tests the meteorology
partition before any publish step.


This is part 5 of 6 in a stack made with GitButler:

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Javascript size report

Size
Base (phase-2c-partition-subset-generation) 462.3 KB
PR 462.3 KB
Delta +0.0 KB (+0.0%)

✅ No size change.

@abkfenris abkfenris mentioned this pull request Jun 25, 2026
Add js-data-pkg/ containing the standard_knowledge_data npm package —
a pure-JS companion to the WASM package that ships pre-generated IOOS
community knowledge and CF standard name partitions as tree-shakable
ESM modules.

Build script (js-data-pkg/scripts/build.mjs) reads core/standards/*.yaml
directly and emits gitignored ESM files:
  all-standards.js         — full CF vocabulary (~3.9 MB)
  all-knowledge.js         — CF subset + all 41 knowledge entries
  partitions/{slug}.js     — per-IOOS-category self-contained subsets

Package exports use wildcard subpath patterns so new categories are
picked up automatically without updating package.json:
  import met from 'standard_knowledge_data/partitions/meteorology'

Add data_pkg_build nox session (off by default) and build_data_pkg CI
job that installs deps, runs the build, and smoke-tests the meteorology
partition before any publish step.
@abkfenris abkfenris force-pushed the phase-2c-partition-subset-generation branch from 407164e to 16f471a Compare June 25, 2026 20:36
@abkfenris abkfenris force-pushed the phase-2d-npm-data-package branch from edd4d33 to a2c9065 Compare June 25, 2026 20:36
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