Skip to content

Free up -c for config and make config audits work on fresh clones#923

Open
dvida wants to merge 2 commits into
prereleasefrom
config-tooling-fixes
Open

Free up -c for config and make config audits work on fresh clones#923
dvida wants to merge 2 commits into
prereleasefrom
config-tooling-fixes

Conversation

@dvida

@dvida dvida commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the -c short flag from options that are not --config, so -c consistently means the config file across all tools (long flags unchanged):
    • Utils/FluxAuto.py --csvdir
    • Utils/FOVSkyMap.py --show_coordinates
    • Utils/RetroactiveFixup.py --copyconfig
  • Utils/AuditConfig.py and Utils/MigrateConfig.py 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" audit or a hard error from MigrateConfig. The temporary template file is cleaned up in a finally block on all paths, including error exits.
  • AuditConfig defaults (config_path, --template, --configreader) now resolve relative to the RMS repository root instead of the current working directory.

Testing

  • On a tree without .configTemplate: python -m Utils.AuditConfig produces 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
  • Verified no temporary .configTemplate files remain in /tmp after both runs

🤖 Generated with Claude Code

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread Utils/MigrateConfig.py Outdated
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>
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