Skip to content

Conversation

@shreyb
Copy link
Collaborator

@shreyb shreyb commented May 19, 2025

Added workflow for creating a new capability set that mirrors https://github.com/DUNE/data-mgmt-ops/wiki/Dune-Physicsgroups-disk--how-to-create-a-new-physics-group

Also added tests for the workflow that ensure the correct APIs are getting called.

Closes #103

@shreyb shreyb linked an issue May 19, 2025 that may be closed by this pull request
@shreyb shreyb requested review from LTrestka, cathulhu and Copilot and removed request for LTrestka and cathulhu May 19, 2025 17:06
Copy link

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

Adds a new workflow for creating capability sets in FERRY, complete with verification steps and unit tests.

  • Implements NewCapabilitySet workflow for group, unit, FQAN, and capability-set operations.
  • Enhances FerryAPI.call_endpoint and Workflow.verify_output for better dry-run output and error handling.
  • Registers the new workflow and adds comprehensive tests for its methods.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_NewCapabilitySet.py Added unit tests for NewCapabilitySet.run and its helpers
ferry_cli/helpers/workflows.py Improved verify_output error handling and removed sys.exit
ferry_cli/helpers/supported_workflows/init.py Registered NewCapabilitySet in the supported workflows mapping
ferry_cli/helpers/supported_workflows/NewCapabilitySet.py Implemented the new capability-set workflow
ferry_cli/helpers/api.py Updated dry-run logging in call_endpoint to include parameters
ferry_cli/main.py Modified output handling condition to check json_result
Comments suppressed due to low confidence (2)

tests/test_NewCapabilitySet.py:83

  • Typo in test function name: 'test_NewCapabiilitySet_run' has an extra 'i'. Rename to 'test_NewCapabilitySet_run' for consistency with the class name.
def test_NewCapabiilitySet_run(args, expected, capsys):

ferry_cli/helpers/workflows.py:43

  • [nitpick] The error message 'Failed to verify output' is generic and used for multiple failure cases; consider providing more specific messages or include context about the failure reason.
print("Failed to verify output")

@shreyb shreyb requested review from LTrestka and cathulhu May 19, 2025 17:14
Copy link
Collaborator

@cathulhu cathulhu left a comment

Choose a reason for hiding this comment

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

I see no issues and the replies to copilot comments make sense to me

@shreyb shreyb merged commit 34d07a2 into master Jun 4, 2025
1 check passed
@shreyb shreyb added this to the 1.0.2 milestone Oct 13, 2025
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.

Add workflow for adding capability sets

3 participants