Replace -e/--exclusive flag with NUMBER_LIST (#746)#748
Merged
Conversation
The exclusive input-ID flag and the NUMBER_LIST config option converged in FileHandler._format_process_list and did the same thing for a single ID; NUMBER_LIST is now the one mechanism. Pipeline: - remove -e/--exclusive from args.py and its plumbing through run.py, FileHandler, and JobHandler (where it was stored but never used) - NUMBER_LIST entries are now validated against the input file numbers found on disk, preserving -e's early failure on a wrong ID: the run aborts at start-up instead of when a module first opens files - unit tests for the validation (subset passes, typo raises, no-list scan path unchanged) Canfar chain (script-level -e options are unchanged; one ID per headless job remains the interface): - job_sp_canfar.bash, job_sp_canfar_v2.0.bash, and init_run_exclusive_canfar.sh write NUMBER_LIST into a per-job config copy (set_config_number_list: insert-or-replace under [FILE], ID in numbering-scheme form: leading dash, dots->dashes) instead of passing -e to shapepipe_run. Side benefit: the processed ID is recorded in the config copied to the run's log directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review hardening: set_config_number_list now verifies the key landed in the config copy and aborts otherwise — a config with no NUMBER_LIST line and no bare [FILE] header would previously install an unmodified copy and silently process every image. Also fix init_run_exclusive_canfar.sh's missing-ID guard, which tested an unset variable and never fired. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Open
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.
Implements #746: the
-e/--exclusiveinput-ID flag is retired;NUMBER_LISTis now the one mechanism for restricting a run to given IDs. Targetsngmix_v2.0so it rides #741 to develop (the v2.0 canfar scripts diverged from develop, so this is the conflict-free base).Pipeline
-e/--exclusiveremoved fromargs.py, with its plumbing throughrun.py,FileHandler, andJobHandler(where it was stored but never used)NUMBER_LISTentries are now validated against the input file numbers actually found on disk — preserving-e's early failure on a typo'd ID: the run aborts at start-up with a clear message instead of when a module first tries to open non-existent filesNUMBER_LISTunchangedCanfar chain — script-level
-eoptions are unchanged (one ID per headless job remains the orchestration interface); what changes is how they realize it:job_sp_canfar.bash,job_sp_canfar_v2.0.bash,init_run_exclusive_canfar.shwriteNUMBER_LISTinto a per-job config copy (set_config_number_list: insert-or-replace under[FILE]; ID transformed to numbering-scheme form, leading dash + dots→dashes — exactly the transform-edid internally)Verified: full test suite (61 passed) in the ngmix v2.0 container against this branch;
set_config_number_listsmoke-tested againstconfig_tile_Uz.ini(insert), an already-set config (replace), and a[FILE]-followed-by-comment edge case.Closes #746.
🤖 Generated with Claude Code