Skip to content

refactor(catalogs): extract integration catalog config loading#2497

Merged
mnriem merged 1 commit into
github:mainfrom
PascalThuet:codex/catalog-base-refactor
May 11, 2026
Merged

refactor(catalogs): extract integration catalog config loading#2497
mnriem merged 1 commit into
github:mainfrom
PascalThuet:codex/catalog-base-refactor

Conversation

@PascalThuet
Copy link
Copy Markdown
Contributor

First slice for #2437.

What changed

  • Added a small shared catalog config module with CatalogEntry and CatalogStackBase.
  • Moved catalog URL validation and local YAML catalog config loading into the shared base.
  • Updated IntegrationCatalog to use the shared base while keeping active source resolution, fetching, caching, and merge/search behavior local and unchanged.

Scope

This intentionally migrates only IntegrationCatalog. Extension, preset, and workflow catalogs remain unchanged for follow-up PRs. This does not change checksum/signature policy or move catalog CLI commands out of src/specify_cli/__init__.py.

Validation

  • uvx ruff check src/specify_cli/catalogs.py src/specify_cli/integrations/catalog.py tests/integrations/test_integration_catalog.py
  • uv run pytest tests/integrations/test_cli.py tests/integrations/test_integration_catalog.py -q

@PascalThuet PascalThuet changed the title [codex] refactor integration catalog config loading refactor integration catalog config loading May 8, 2026
@PascalThuet PascalThuet force-pushed the codex/catalog-base-refactor branch from fe469a1 to 722edc7 Compare May 8, 2026 06:26
@PascalThuet PascalThuet changed the title refactor integration catalog config loading refactor(catalogs): extract integration catalog config loading May 8, 2026
@PascalThuet PascalThuet marked this pull request as ready for review May 8, 2026 06:29
@PascalThuet PascalThuet requested a review from mnriem as a code owner May 8, 2026 06:29
@mnriem mnriem requested a review from Copilot May 11, 2026 13:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a small shared catalog-stack config module and refactors IntegrationCatalog to use it, reducing duplication while preserving existing integration catalog resolution/fetch/merge behavior (first slice of #2437).

Changes:

  • Added src/specify_cli/catalogs.py with CatalogEntry and CatalogStackBase to centralize catalog URL validation and YAML config loading.
  • Updated IntegrationCatalogEntry to inherit from CatalogEntry, and IntegrationCatalog to inherit from CatalogStackBase.
  • Removed the now-duplicated _validate_catalog_url and _load_catalog_config implementations from IntegrationCatalog.
Show a summary per file
File Description
src/specify_cli/integrations/catalog.py Refactors integration catalog stack config loading/URL validation to use the shared base while keeping integration-specific behavior local.
src/specify_cli/catalogs.py Adds shared primitives for catalog entry modeling plus URL validation and YAML catalog-stack config loading.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@mnriem mnriem merged commit 0593565 into github:main May 11, 2026
15 checks passed
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented May 11, 2026

Thank you!

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.

3 participants