refactor(catalogs): extract integration catalog config loading#2497
Merged
Conversation
fe469a1 to
722edc7
Compare
Contributor
There was a problem hiding this comment.
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.pywithCatalogEntryandCatalogStackBaseto centralize catalog URL validation and YAML config loading. - Updated
IntegrationCatalogEntryto inherit fromCatalogEntry, andIntegrationCatalogto inherit fromCatalogStackBase. - Removed the now-duplicated
_validate_catalog_urland_load_catalog_configimplementations fromIntegrationCatalog.
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
approved these changes
May 11, 2026
Collaborator
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice for #2437.
What changed
CatalogEntryandCatalogStackBase.IntegrationCatalogto 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 ofsrc/specify_cli/__init__.py.Validation
uvx ruff check src/specify_cli/catalogs.py src/specify_cli/integrations/catalog.py tests/integrations/test_integration_catalog.pyuv run pytest tests/integrations/test_cli.py tests/integrations/test_integration_catalog.py -q