Repository navigation
ngmix_runner: expand MEGACAM_FLIP before reading it as a boolean - #988
Open
cailmdaley wants to merge 2 commits into
Open
cailmdaley wants to merge 2 commits into
cailmdaley wants to merge 2 commits into
Conversation
The cfis ngmix ini sets MEGACAM_FLIP = ${SP_MEGACAM_FLIP:-True}; plain
getboolean sees the literal and every tile_ngmix chunk fails with
'Not a boolean'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JK7o9J2jMWQK4dkZkL9WLv
getexpanded passed the fallback through the env-var expander, so a bool fallback raised TypeError where getboolean returns it. ngmix_runner reads MEGACAM_FLIP with fallback=True, so configs without that line broke. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9H9kWBd294QyzLNrxc
This branch has not been deployed
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.
Claude Opus on behalf of Cail.
ngmix_runnerreadsMEGACAM_FLIPwith plaingetboolean. The cfis ngmix ini setsMEGACAM_FLIP = ${SP_MEGACAM_FLIP:-True}, so the parser gets that literal string, and everytile_ngmixchunk fails withNot a booleanabout 26 minutes in. This has been the case onfeat/im-sims-mccdsince 85e0900, so image-sim runs on the current tip fail at ngmix.Changes:
ngmix_runner.pynow reads the option withgetexpandedboolean, which expands the variable before converting it.CustomParser.getexpandedbooleannow returnsfallbackwhen the option or section is absent, the same waygetbooleandoes. Before this change it passed the fallback through the env-var expander, and a bool fallback raisedTypeError. Without this second fix, the one-line change above would break every config that has noMEGACAM_FLIPline, becausengmix_runnerpassesfallback=True.test_custom_parser_expanded_boolean_fallbackcovers an absent option, an absent section, no fallback (raisesNoOptionError), and an expanded value that overrides the fallback.Testing: I ran
tests/module/test_pipeline.py(17 passed) inshapepipe_im_sims-runtime.sifon a candide compute node, with this branch'ssrcfirst on the path.🤖 Generated with Claude Code
https://claude.ai/code/session_01JK7o9Dv6PXjWdodP6mhNQL