Skip to content

refactor: organize artifact CLI commands - #4671

Merged
mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-chore/artifact-cli-refactor
Sep 22, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-chore/artifact-cli-refactor

Conversation

@mnriem

@mnriem mnriem commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move each specify artifact command into its paired command_<name>.py module
  • keep shared Typer registration and CLI infrastructure in artifacts/_commands.py
  • reorganize artifact command tests to mirror the source hierarchy while retaining domain and cross-domain contracts
  • add an explicit command registration order/uniqueness test

Validation

  • full repository suite: 8,368 passed, 16 skipped (8,384 collected)
  • focused artifact suite: 149 passed
  • exact uvx ruff@0.15.0 check src tests: passed
  • git diff --check: passed
  • full specify artifact help surface: byte-identical before/after
  • wheel packaging audit: all new command modules included and no obsolete grouped modules present
  • original artifact test function names preserved; collection increased by one intentional registration test

AI disclosure

Authored autonomously by GitHub Copilot (model: GPT-5.6 Sol) on behalf of @mnriem. The implementation, tests, validation, commit, and this pull request description were fully AI-generated.

Copilot AI balanced review requested due to automatic review settings September 22, 2026 11:23

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The refactor preserves command behavior, follows the documented CLI architecture, and retains comprehensive coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Refactors artifact CLI handlers into command-specific modules while preserving behavior and aligning tests with the source hierarchy.

Changes:

  • Splits list, info, and lookup handlers into dedicated modules.
  • Centralizes shared registration infrastructure.
  • Reorganizes tests and verifies stable command registration.

Review fully AI-generated by GitHub Copilot (model: unknown, autonomous).

File Description
src/​specify_cli/​artifacts/​_commands.py Centralizes shared registration.
src/​specify_cli/​artifacts/​command_list.py Houses the list command.
src/​specify_cli/​artifacts/​command_info.py Houses the info command.
src/​specify_cli/​artifacts/​command_lookup.py Houses the lookup command.
src/​specify_cli/​artifacts/​catalog.py Updates module documentation.
tests/​specify_cli/​artifacts/​conftest.py Provides shared fixtures.
tests/​specify_cli/​artifacts/​helpers.py Provides shared test helpers.
tests/​specify_cli/​artifacts/​test_catalog.py Retains domain tests.
tests/​specify_cli/​artifacts/​test_catalog_parity.py Clarifies parity-test scope.
tests/​specify_cli/​artifacts/​test_command_list.py Covers list behavior.
tests/​specify_cli/​artifacts/​test_command_info.py Covers info behavior.
tests/​specify_cli/​artifacts/​test_command_lookup.py Covers lookup behavior.
tests/​specify_cli/​artifacts/​test_registration.py Verifies registration order and uniqueness.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mnriem mnriem added the triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review label Sep 22, 2026
@mnriem
mnriem force-pushed the mnriem-chore/artifact-cli-refactor branch from 95ffe74 to 2d04d90 Compare September 22, 2026 12:04
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mnriem
mnriem force-pushed the mnriem-chore/artifact-cli-refactor branch from 2d04d90 to 503dd36 Compare September 22, 2026 12:13
@mnriem
mnriem merged commit 1b281d1 into github:main Sep 22, 2026
15 checks passed
@mnriem
mnriem deleted the mnriem-chore/artifact-cli-refactor branch September 22, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants