Skip to content

Conversation

GeigerJ2
Copy link
Contributor

@GeigerJ2 GeigerJ2 commented Sep 12, 2025

[wip]

Why verdi comptuer setup-many instead of modifying setup

A separate verdi computer setup-many command was added rather than extending the existing setup command due to architectural constraints in AiiDA's CLI framework:

Key difficulties with modifying setup:

  • Required field validation: Click validates required options (--label, --hostname, etc.) before the function executes, making it impossible to bypass validation when using config files
  • ConfigFileOption conflicts: The existing ConfigFileOption automatically merges single YAML files into CLI parameters but doesn't support multiple files
  • Interactive prompting system: The command's interactive behavior (prompting for missing fields) conflicts with batch operations that should be non-interactive by design

I attempted to retrofit the batch functionality onto the interactive single-computer setup command, but that either resulted in parameter validation errors, prompting conflicts, or complex workarounds that would compromise the existing user experience. In the end, adding a new setup-many command instead seemed like a better option, and provides a clean, purpose-built solution for batch operations without affecting the existing functionality.

Copy link

codecov bot commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 50.72464% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.99%. Comparing base (9bccdc8) to head (50e976c).

Files with missing lines Patch % Lines
src/aiida/cmdline/commands/cmd_computer.py 18.19% 18 Missing ⚠️
src/aiida/cmdline/commands/cmd_code.py 65.22% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7007      +/-   ##
==========================================
- Coverage   79.04%   78.99%   -0.05%     
==========================================
  Files         566      566              
  Lines       43699    43754      +55     
==========================================
+ Hits        34539    34560      +21     
- Misses       9160     9194      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GeigerJ2 GeigerJ2 force-pushed the feature/multi-computer-code-export-import branch from 403c217 to f516727 Compare September 18, 2025 05:00
@GeigerJ2 GeigerJ2 force-pushed the feature/multi-computer-code-export-import branch from f516727 to 50e976c Compare September 22, 2025 14:00
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.

1 participant