Skip to content

feat(esm_catalog): PR-A1g — contacts STAC extension#1506

Open
mandresm wants to merge 9 commits into
releasefrom
esm-catalog/pr-a1g-contacts-extension
Open

feat(esm_catalog): PR-A1g — contacts STAC extension#1506
mandresm wants to merge 9 commits into
releasefrom
esm-catalog/pr-a1g-contacts-extension

Conversation

@mandresm

@mandresm mandresm commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Adds feature PR-A1g — Contacts extension described in https://github.com/esm-tools/esm_tools/blob/22519379dc96e17e65d8d302c6d969375f0ec139/src/esm_catalog/PR-A1A-STAC-FOUNDATION-PLAN.md.

Adds contact info to the STAC item, and checks whether mandatory info is provided if the experiment is labelled as production.

TODOs

  • isort and black
  • docstrings

- Contact dataclass in context.py: name, orcid, institution, roles,
  from_config() classmethod, validate() for production checks
- contacts field added to CollectionContext (list[Contact])
- Production validation: at least one contact required, each contact
  must have name + institution when production=True
- contacts.py: add_contacts(item, ctx) maps ctx.contacts to STAC
  contacts format (identifier/scheme for ORCID, organization for institution)
- 12 new tests; 29 total passing

Co-Authored-By: PavanSiligam <pavan.siligam@gmail.com>
Co-Authored-By: Paul Gierz <pgierz@awi.de>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mandresm mandresm self-assigned this Jul 6, 2026
mandresm and others added 3 commits July 6, 2026 15:56
…need to be included in the stac item by the make_item anyway

Co-Authored-By: Claude <noreply@anthropic.com>
@mandresm
mandresm marked this pull request as ready for review July 6, 2026 14:54
@mandresm
mandresm requested a review from siligam July 6, 2026 14:54

@siligam siligam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and compact, tests included. One real conformance bug (the identifier shape) plus a few small robustness/cleanup things — details inline.

Comment thread src/esm_catalog/item.py Outdated
Comment thread src/esm_catalog/context.py
Comment thread src/esm_catalog/item.py Outdated
Comment thread src/esm_catalog/item.py Outdated
Comment thread tests/test_esm_catalog/test_stac_item.py
@mandresm
mandresm requested a review from pgierz July 20, 2026 13:53
siligam added a commit that referenced this pull request Jul 22, 2026
A bare `epoch:`/`period:` under general.paleo is present-but-None, and
`if "epoch" in paleo_config` let it through, writing a schema-invalid
`"paleo:epoch": null` into the item. Nothing calls pystac .validate() in
the pipeline, so it shipped unchecked. Gate on truthiness instead.

Same silent-null-write class as the contacts `roles` case on #1506.
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.

2 participants