Repository navigation
Preserve overlay metadata for qualified variable names - #5506
Open
joshwebtimestwo wants to merge 1 commit into
Open
joshwebtimestwo wants to merge 1 commit into
joshwebtimestwo wants to merge 1 commit into
Conversation
Collaborator
|
Thats for the PR, we are currently testing the next release due out in a week or so. I'll take a look at this once the release is done |
Author
|
Thanks for the update. No rush, and good luck with the release testing. |
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.
Fully qualified overlay fields such as
${SWX_KPDATA}can display a value while losing the module's colour metadata.get_variable()only compares the display name (${KPDATA}) and itsAS_variant, although the variable list also contains the canonicalSWX_KPDATAidentifier. The overlay field editor can insert that identifier.Resolve an exact
variableidentifier first, then retain the existing display-name andAS_fallbacks. This also prevents a different variable's display alias from shadowing an exact identifier.Related context: AllskyTeam/allsky-modules#423. The reporter has not confirmed the cause on their installation; the lookup failure was reproduced independently on current
master.Verification:
python -m unittest discover -s scripts/modules/allskyvariables/tests -v: four tests pass, including alias/legacy compatibility. The qualified lookup and alias-collision cases both failed before the fix.python -m py_compile scripts/modules/allskyvariables/allskyvariables.py scripts/modules/allskyvariables/tests/test_variable_lookup.pyandgit diff --check: pass.${KPDATA}and${SWX_KPDATA}preserve the green, yellow and red fills for Kp 1.33, 4.5 and 6. Debug-variable input was stubbed; no Raspberry Pi, camera, live NOAA request or full image-render test was run.AI assistance was used to prepare this contribution. Codex reviewed the diff and ran the checks above.