Skip to content

feat(esm_catalog): PR-A1e — namelist extension#1512

Open
siligam wants to merge 1 commit into
releasefrom
esm-catalog/pr-a1e-namelist-extension
Open

feat(esm_catalog): PR-A1e — namelist extension#1512
siligam wants to merge 1 commit into
releasefrom
esm-catalog/pr-a1e-namelist-extension

Conversation

@siligam

@siligam siligam commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Part of the esm_catalog decomposition, per the PR-A1a foundation plan. Follows #1504 (A1b core), branches from release.

Adds src/esm_catalog/namelist.py:

  • add_namelist_extension(collection, namelists) — collection-level nml:files, nml:groups, nml:parameters (flattened "group:key" → scalar, for CQL2 filtering). Drops nml:raw from the pr-a1a version per the plan — storing the full raw namelist as JSON on every collection could be megabytes for complex setups.
  • add_namelist_item_extension(item, ctx) — item-level nml:{component}:{group}:{key} entries across all components, read from ctx.namelists_by_component (kept as-is per the plan; performs no scanning).

Wired into make_collection (using the collection's own component's entry from ctx.namelists_by_component) and make_item.

Also adds configs/stac-extensions/namelist/v1.0.0/schema.json (custom extension — no external community schema exists) and tests/test_esm_catalog/test_stac_namelist_ext.py.

Test plan

  • pytest tests/test_esm_catalog — 51 passed
  • New tests cover: collection no-op/flattening/files+groups/nml:raw dropped/nested-dict+long-list skipping/idempotent URL append, item no-op/multi-component coverage, and schema validation (via jsonschema) for both Collection and Item shapes

Adds src/esm_catalog/namelist.py:
- add_namelist_extension(collection, namelists) — collection-level nml:files,
  nml:groups, nml:parameters (flattened "group:key" -> scalar, for CQL2
  filtering). Drops nml:raw from the pr-a1a version (could be megabytes of
  raw namelist JSON per collection).
- add_namelist_item_extension(item, ctx) — item-level nml:{component}:{group}:{key}
  entries across ALL components, from ctx.namelists_by_component (kept as-is
  from pr-a1a; this function performs no scanning).

Wires both into make_collection (using the component's own entry from
ctx.namelists_by_component) and make_item.

Adds configs/stac-extensions/namelist/v1.0.0/schema.json (custom extension)
and tests/test_esm_catalog/test_stac_namelist_ext.py, including schema
validation for both Collection and Item shapes.
@siligam

siligam commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@mandresm heads-up: per our Webex split this one was yours — I went ahead and implemented it anyway while I had momentum finishing the A1 plan (A1c/A1f landed as #1511/#1513 the same day, and this one follows the plan's spec directly: nml:raw dropped, files/groups/parameters kept, item-level function unchanged). If you'd already started on it or want it done differently, happy to close this in favour of yours — otherwise it's ready for your review.

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