Free up -c for config and make config audits work on fresh clones#923
Open
dvida wants to merge 2 commits into
Open
Free up -c for config and make config audits work on fresh clones#923dvida wants to merge 2 commits into
dvida wants to merge 2 commits into
Conversation
Remove the -c short flag from options that are not --config (FluxAuto --csvdir, FOVSkyMap --show_coordinates, RetroactiveFixup --copyconfig) so -c consistently means the config file across all tools. The long flags are unchanged. AuditConfig and MigrateConfig now fall back to the pristine .config tracked in git (git show HEAD:.config) when .configTemplate is missing. The template is only created by RMS_Update.sh, so fresh clones and stations that never updated previously got an incomplete comparison or a hard error. The temporary template file is cleaned up in a finally block on all paths. AuditConfig defaults now resolve relative to the RMS repository root instead of the current working directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62f84ac822
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
An explicitly passed --template path that doesn't exist (e.g. a typo) now fails with the existing error message instead of being silently replaced by the repository default .config, which could migrate the active config against the wrong template in an -u run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
-cshort flag from options that are not--config, so-cconsistently means the config file across all tools (long flags unchanged):Utils/FluxAuto.py--csvdirUtils/FOVSkyMap.py--show_coordinatesUtils/RetroactiveFixup.py--copyconfigUtils/AuditConfig.pyandUtils/MigrateConfig.pynow fall back to the pristine.configtracked in git (git show HEAD:.config) when.configTemplateis missing. The template is only created byRMS_Update.sh, so fresh clones and stations that never updated previously got an "INCOMPLETE COMPARISON" audit or a hard error from MigrateConfig. The temporary template file is cleaned up in afinallyblock on all paths, including error exits.AuditConfigdefaults (config_path,--template,--configreader) now resolve relative to the RMS repository root instead of the current working directory.Testing
.configTemplate:python -m Utils.AuditConfigproduces a full 187-option comparison via the git fallback (previously "INCOMPLETE COMPARISON")python -m Utils.MigrateConfig --input <copy of .config>dry run merges 187 attributes using the git-derived template.configTemplatefiles remain in /tmp after both runs🤖 Generated with Claude Code