Skip to content

feat(esm_catalog): PR-B4 — federation API (/catalogs CRUD + auth middleware)#1493

Open
siligam wants to merge 1 commit into
esm-catalog/pr-b3-science-routesfrom
esm-catalog/pr-b4-federation-api
Open

feat(esm_catalog): PR-B4 — federation API (/catalogs CRUD + auth middleware)#1493
siligam wants to merge 1 commit into
esm-catalog/pr-b3-science-routesfrom
esm-catalog/pr-b4-federation-api

Conversation

@siligam

@siligam siligam commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Provenance: this implementation is substantially Paul Gierz's work, carried over from his esm-tools-plus/simcat/pgierz-workbench prototype branch (commits Mar–Apr 2026). This PR ports it, largely as-is, into the reviewable stack.

  • Adds auth.py: Authenticator ABC + NoAuthenticator / APIKeyAuthenticator / JupyterHubAuthenticator implementations
  • Adds catalog_routes.py: full CRUD for /catalogs (GET list, GET by ID, POST add, PATCH update, POST refresh, DELETE remove); auth-gated; invalidates queryables cache on mutations
  • Wires create_catalog_router(registry, pool, auth, queryables_cache) into create_app(), which now accepts an optional authenticator parameter (defaults to NoAuthenticator / open access)
  • 16 new tests covering every endpoint + edge cases (duplicate 409, missing 404, status active/missing)

Test plan

  • pytest src/esm_catalog/tests/test_api_federation.py — 16 tests
  • pytest src/esm_catalog/tests/ — 129 total tests green
  • CI workflow esm-catalog-tests passes on Python 3.9 + 3.12

Stack position

release → PR-0 → A1a → A1b-1 → A1b-2 → A2 → A3 → A4 → B1 → B2 → B3 → B4 (this PR)

🤖 Generated with Claude Code

@siligam
siligam force-pushed the esm-catalog/pr-b4-federation-api branch from 840c483 to 16a3cdd Compare June 14, 2026 00:12
@siligam
siligam force-pushed the esm-catalog/pr-b3-science-routes branch from ef49a03 to 95043cd Compare June 17, 2026 12:13
@siligam
siligam force-pushed the esm-catalog/pr-b4-federation-api branch from 16a3cdd to ed75fed Compare June 17, 2026 12:13
@siligam
siligam force-pushed the esm-catalog/pr-b3-science-routes branch from 95043cd to 67fee03 Compare June 17, 2026 16:00
@siligam
siligam force-pushed the esm-catalog/pr-b4-federation-api branch from ed75fed to 1f401c8 Compare June 17, 2026 16:00
@siligam
siligam force-pushed the esm-catalog/pr-b3-science-routes branch from 67fee03 to 76f4e7a Compare June 17, 2026 16:34
@siligam
siligam force-pushed the esm-catalog/pr-b4-federation-api branch from 1f401c8 to 952b8d2 Compare June 17, 2026 16:34
…leware)

Adds dynamic catalog management via /catalogs REST endpoints (list, add,
get, update, refresh, delete) with pluggable auth middleware and 16 new tests.
129 total tests green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@siligam
siligam force-pushed the esm-catalog/pr-b3-science-routes branch from 76f4e7a to 61e2fab Compare June 17, 2026 17:03
@siligam
siligam force-pushed the esm-catalog/pr-b4-federation-api branch from 952b8d2 to 673be4b Compare June 17, 2026 17:03
@siligam

siligam commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto the corrected PR-0 base (#1483) — test relocation to tests/test_esm_catalog/, restored dedicated CI workflow at the new path, and a couple of CI fixes (doctest-collection exclusion, eval_type_backport for pydantic on Python 3.9). No change to this PR's own diff/scope. CI is green.

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