Skip to content

Preserve overlay metadata for qualified variable names - #5506

Open
joshwebtimestwo wants to merge 1 commit into
AllskyTeam:masterfrom
joshwebtimestwo:fix/qualified-variable-metadata
Open

joshwebtimestwo wants to merge 1 commit into
AllskyTeam:masterfrom
joshwebtimestwo:fix/qualified-variable-metadata

Conversation

@joshwebtimestwo

Copy link
Copy Markdown

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 its AS_ variant, although the variable list also contains the canonical SWX_KPDATA identifier. The overlay field editor can insert that identifier.

Resolve an exact variable identifier first, then retain the existing display-name and AS_ 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.py and git diff --check: pass.
  • A separate reproduction used the v1.0.6 Space Weather metadata and v2026.10.01 serializer/overlay formatter with this branch's variable loader. Both ${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.

@Alex-developer

Copy link
Copy Markdown
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

@Alex-developer Alex-developer added this to the v2026.10.01_02 milestone Oct 27, 2026
@joshwebtimestwo

Copy link
Copy Markdown
Author

Thanks for the update. No rush, and good luck with the release testing.

This branch has not been deployed

No deployments
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.

2 participants