Skip to content

fix(workflows): expose workflow/step catalog add metadata options#3388

Open
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/workflow-catalog-add-metadata-options
Open

fix(workflows): expose workflow/step catalog add metadata options#3388
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/workflow-catalog-add-metadata-options

Conversation

@WOLIKIMCHENG

@WOLIKIMCHENG WOLIKIMCHENG commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

workflow catalog add and workflow step catalog add only exposed url and optional --name, even though the underlying workflow/step catalog config already supports priority, install_allowed, and description, and the sibling preset/extension catalog commands already expose those knobs.

This change keeps the fix narrow:

  • add --priority, --install-allowed/--no-install-allowed, and --description to both workflow catalog add commands
  • extend WorkflowCatalog.add_catalog() and StepCatalog.add_catalog() with backward-compatible optional overrides
  • preserve existing workflow/step defaults when callers do not pass overrides:
    • priority still defaults to max + 1
    • install_allowed still defaults to true
    • description still defaults to an empty string

Testing

  • uv run specify --help
  • .venv/bin/python -m pytest tests/test_workflows.py -k "WorkflowCatalog or StepCatalog" -v — 37 passed
  • .venv/bin/specify workflow catalog add --help
  • .venv/bin/specify workflow step catalog add --help

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.

Pull request overview

This PR aligns the workflow and step catalog “add” commands with the capabilities already supported by the underlying catalog config by exposing metadata fields (priority, install_allowed, description) through both the CLI and the Python catalog APIs.

Changes:

  • Added --priority, --install-allowed/--no-install-allowed, and --description options to workflow catalog add and workflow step catalog add.
  • Extended WorkflowCatalog.add_catalog() and StepCatalog.add_catalog() to accept optional metadata overrides while preserving existing defaults when omitted.
  • Expanded workflow/step catalog tests to cover defaults, Python API overrides, and CLI option wiring.
Show a summary per file
File Description
tests/test_workflows.py Adds assertions and new tests covering default metadata, override behavior, and CLI option handling for both workflow and step catalogs.
src/specify_cli/workflows/catalog.py Extends both catalog add_catalog() methods to accept optional priority, install_allowed, and description overrides.
src/specify_cli/workflows/_commands.py Adds new Typer options to the two CLI “catalog add” commands and passes them through to the catalog layer.

Review details

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines 1019 to 1027
):
"""Add a workflow catalog source."""
from .catalog import WorkflowCatalog, WorkflowValidationError

project_root = _require_specify_project()
catalog = WorkflowCatalog(project_root)
try:
catalog.add_catalog(url, name)
catalog.add_catalog(url, name, priority, install_allowed, description)
except WorkflowValidationError as exc:
Comment on lines 1678 to 1687
@@ -1669,7 +1683,7 @@ def workflow_step_catalog_add(

catalog = StepCatalog(project_root)
try:
catalog.add_catalog(url, name)
catalog.add_catalog(url, name, priority, install_allowed, description)
except StepValidationError as exc:
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