Skip to content

Fix undefined basis variable in interface workflow (#7571) - #7878

Open
mohanchen wants to merge 2 commits into
deepmodeling:developfrom
mohanchen:20260829-issue7571
Open

Fix undefined basis variable in interface workflow (#7571)#7878
mohanchen wants to merge 2 commits into
deepmodeling:developfrom
mohanchen:20260829-issue7571

Conversation

@mohanchen

Copy link
Copy Markdown
Collaborator

Summary

Fixes #7571

The interface workflow (wannier-interface job) defines a basis key in the build matrix, but the "Create mock data & patch script" step never exported it to the step environment. The Python heredoc in that step references basis directly, so each matrix job fails with NameError: name 'basis' is not defined before any mock data is generated.

Changes

  • Add BASIS: ${{ matrix.basis }} to the step env
  • Read basis = os.environ["BASIS"] inside the heredoc, matching the existing SCRIPT/PREFIX pattern

Verification

  • YAML syntax check passed: python3 -c "import yaml; yaml.safe_load(open('.github/workflows/interface.yml'))"
  • Diff is +2 lines only
  • Note: this workflow is workflow_dispatch only, so it is not triggered by push/PR events; a manual dispatch run is needed to fully verify the fix

The "Create mock data & patch script" step referenced `basis` inside
the Python heredoc without defining it: the matrix key `basis` was
never exported to the step environment, so the step failed with
"NameError: name 'basis' is not defined" before any mock data was
generated.

Pass matrix.basis through the BASIS environment variable and read it
in the heredoc, matching the existing SCRIPT/PREFIX pattern.
@mohanchen mohanchen added the Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS label Aug 29, 2026
@mohanchen
mohanchen requested a review from Critsium-xy August 29, 2026 09:34
Document the upstream repo/issues/PR links and two workflow facts:
upstream PRs are opened from personal fork branches, and
workflow_dispatch-only workflows cannot be verified by PR CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code scan] Pass matrix.basis into the interface workflow heredoc

1 participant