Repository navigation
refactor: reorganize bundle CLI commands - #4663
Merged
Merged
Conversation
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The structural refactor preserves registration and compatibility while retaining comprehensive command and domain regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Reorganizes the bundle CLI to match the repository’s command architecture while preserving behavior and the legacy BundlerError import.
Changes:
- Splits bundle and catalog handlers into dedicated command modules.
- Flattens bundle domain services under
specify_cli.bundles. - Mirrors command tests and preserves regression and compatibility coverage.
| File | Description |
|---|---|
tests/unit/test_bundle_download_url.py |
Moves source-resolution tests. |
tests/test_init_dir_cli.py |
Relocates bundle-specific override tests. |
tests/specify_cli/bundles/test_yamlio.py |
Updates flattened imports. |
tests/specify_cli/bundles/test_versioning.py |
Updates flattened imports. |
tests/specify_cli/bundles/test_validator.py |
Updates validator imports. |
tests/specify_cli/bundles/test_sources.py |
Consolidates source-resolution regressions. |
tests/specify_cli/bundles/test_security_paths.py |
Updates security-path imports. |
tests/specify_cli/bundles/test_resolver.py |
Updates resolver imports. |
tests/specify_cli/bundles/test_references.py |
Updates reference imports. |
tests/specify_cli/bundles/test_records.py |
Updates record imports. |
tests/specify_cli/bundles/test_primitives.py |
Updates primitive-service imports. |
tests/specify_cli/bundles/test_packager.py |
Updates packager imports. |
tests/specify_cli/bundles/test_offline.py |
Updates offline catalog tests. |
tests/specify_cli/bundles/test_installer.py |
Updates installer imports and patches. |
tests/specify_cli/bundles/test_conflict.py |
Updates conflict imports. |
tests/specify_cli/bundles/test_commands.py |
Tests shared CLI registration and errors. |
tests/specify_cli/bundles/test_command_validate.py |
Mirrors validate command coverage. |
tests/specify_cli/bundles/test_command_update.py |
Mirrors update command coverage. |
tests/specify_cli/bundles/test_command_search.py |
Mirrors search command coverage. |
tests/specify_cli/bundles/test_command_remove.py |
Mirrors remove command coverage. |
tests/specify_cli/bundles/test_command_list.py |
Mirrors list command coverage. |
tests/specify_cli/bundles/test_command_install.py |
Consolidates install command coverage. |
tests/specify_cli/bundles/test_command_init.py |
Mirrors init command coverage. |
tests/specify_cli/bundles/test_command_info.py |
Consolidates info and download coverage. |
tests/specify_cli/bundles/test_command_build.py |
Mirrors build command coverage. |
tests/specify_cli/bundles/test_command_add.py |
Covers the add alias and catalog flow. |
tests/specify_cli/bundles/test_catalog_stack.py |
Updates catalog-stack imports. |
tests/specify_cli/bundles/test_catalog_config.py |
Updates catalog-config imports. |
tests/specify_cli/bundles/test_bundles.py |
Verifies error-import compatibility. |
tests/specify_cli/bundles/test_adapters.py |
Updates adapter imports. |
tests/specify_cli/bundles/helpers.py |
Moves shared bundle test helpers. |
tests/specify_cli/bundles/conftest.py |
Adds scoped project fixture. |
tests/specify_cli/bundles/catalog/test_command_remove.py |
Mirrors catalog remove coverage. |
tests/specify_cli/bundles/catalog/test_command_list.py |
Mirrors catalog list coverage. |
tests/specify_cli/bundles/catalog/test_command_add.py |
Mirrors catalog add coverage. |
tests/specify_cli/bundles/catalog/__init__.py |
Adds nested test package marker. |
tests/specify_cli/bundles/_command_helpers.py |
Shares command-test setup helpers. |
tests/specify_cli/bundles/__init__.py |
Adds bundle test package marker. |
tests/integration/test_bundler_init_install.py |
Moves install initialization tests. |
tests/contract/test_manifest_schema.py |
Updates manifest API imports. |
tests/contract/test_catalog_schema.py |
Updates catalog API imports. |
src/specify_cli/commands/bundle/__init__.py |
Removes obsolete monolithic CLI module. |
src/specify_cli/bundles/yamlio.py |
Flattens package imports. |
src/specify_cli/bundles/versioning.py |
Flattens package imports. |
src/specify_cli/bundles/validator.py |
Flattens validator dependencies. |
src/specify_cli/bundles/sources.py |
Extracts manifest source resolution. |
src/specify_cli/bundles/resolver.py |
Flattens resolver dependencies. |
src/specify_cli/bundles/references.py |
Flattens reference dependencies. |
src/specify_cli/bundles/records.py |
Flattens record dependencies. |
src/specify_cli/bundles/project.py |
Flattens project helpers. |
src/specify_cli/bundles/primitives.py |
Flattens primitive integrations. |
src/specify_cli/bundles/packager.py |
Flattens packager dependencies. |
src/specify_cli/bundles/manifest.py |
Flattens manifest dependencies. |
src/specify_cli/bundles/installer.py |
Flattens installer dependencies. |
src/specify_cli/bundles/conflict.py |
Flattens conflict dependencies. |
src/specify_cli/bundles/command_validate.py |
Implements validate CLI adapter. |
src/specify_cli/bundles/command_update.py |
Implements update CLI adapter. |
src/specify_cli/bundles/command_search.py |
Implements search CLI adapter. |
src/specify_cli/bundles/command_remove.py |
Implements remove CLI adapter. |
src/specify_cli/bundles/command_list.py |
Implements list CLI adapter. |
src/specify_cli/bundles/command_install.py |
Implements install CLI adapter. |
src/specify_cli/bundles/command_init.py |
Implements init CLI adapter. |
src/specify_cli/bundles/command_info.py |
Implements info CLI adapter. |
src/specify_cli/bundles/command_build.py |
Implements build CLI adapter. |
src/specify_cli/bundles/command_add.py |
Implements add CLI adapter. |
src/specify_cli/bundles/catalogs.py |
Flattens catalog models. |
src/specify_cli/bundles/catalog/command_remove.py |
Implements catalog remove adapter. |
src/specify_cli/bundles/catalog/command_list.py |
Implements catalog list adapter. |
src/specify_cli/bundles/catalog/command_add.py |
Implements catalog add adapter. |
src/specify_cli/bundles/catalog/__init__.py |
Registers nested catalog commands. |
src/specify_cli/bundles/catalog_stack.py |
Flattens catalog-stack dependencies. |
src/specify_cli/bundles/catalog_config.py |
Flattens catalog configuration. |
src/specify_cli/bundles/adapters.py |
Flattens external adapters. |
src/specify_cli/bundles/_commands.py |
Centralizes group infrastructure and registration. |
src/specify_cli/bundles/__init__.py |
Documents the flattened package API. |
src/specify_cli/bundler/services/__init__.py |
Removes obsolete nested package. |
src/specify_cli/bundler/models/__init__.py |
Removes obsolete nested package. |
src/specify_cli/bundler/lib/__init__.py |
Removes obsolete nested package. |
src/specify_cli/bundler/commands_impl/__init__.py |
Removes obsolete implementation package. |
src/specify_cli/bundler.py |
Preserves legacy BundlerError import. |
src/specify_cli/__init__.py |
Registers the reorganized bundle CLI. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Description
Refactor the
specify bundlehierarchy to followdesign/cli.md:command_<name>.pymodulecatalog/as the only nested package because it is a genuine CLI namespacespecify_cli/bundles/while preserving the publicBundlerErrorimport compatibility boundarytests/specify_cli/bundles/hierarchy while retaining genuine contracts in their existing suitesThe rebase preserves upstream additions including
bundle add, first-party catalog fallback behavior, and offline bundled-workflow installation. User-visible help is byte-identical toupstream/main.Testing
specify bundlehelp surface locally and confirmed byte-identical output againstupstream/main(36,645 bytes)uvx ruff@0.15.0 check src testsgit diff --checkAI Disclosure
AI disclosure: GitHub Copilot, powered by GPT-5.6 Sol, operated autonomously for repository analysis, code and test refactoring, rebase conflict resolution, validation, and PR drafting on behalf of @mnriem. The code and PR description are fully AI-drafted; validation evidence was produced by local automated commands.