Skip to content

Fix missing quasisymmetry re-export causing "Test conda env" job failure - #826

Draft
jurasic-pf with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-test-conda-env-job
Draft

Fix missing quasisymmetry re-export causing "Test conda env" job failure#826
jurasic-pf with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-test-conda-env-job

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The "Test conda env" job (run 34170619332) failed with AttributeError: module 'vmecpp.simsopt_compat' has no attribute 'magnetic_field_strength' (and two similar errors), because tests/test_qs.py calls these functions on vmecpp.simsopt_compat but they were never actually exposed there.

Root cause

  • src/vmecpp/_qs.py defines magnetic_field_strength, quasisymmetry_residuals, and quasisymmetry_total.
  • Its docstring states these are "Re-exported from vmecpp.simsopt_compat", but the rename commit that introduced this comment never added the corresponding import — the re-export was a no-op comment.

Fix

  • Added the missing import in src/vmecpp/simsopt_compat.py to re-export magnetic_field_strength, quasisymmetry_residuals, and quasisymmetry_total from vmecpp._qs.
from vmecpp._qs import (  # noqa: F401
    magnetic_field_strength,
    quasisymmetry_residuals,
    quasisymmetry_total,
)
  • Included src/vmecpp/_qs.py and tests/test_qs.py, which were part of the same in-flight change but not yet present on this branch, so the re-export has something to target and the fix is exercised by the existing test.

Co-authored-by: jurasic-pf <166746189+jurasic-pf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Test conda env Fix missing quasisymmetry re-export causing "Test conda env" job failure Sep 8, 2026
Copilot AI requested a review from jurasic-pf September 8, 2026 00:04

@github-actions github-actions 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.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 740cf56 Previous: de5166b Ratio
benchmarks/test_benchmarks.py::test_bench_simsopt_finite_difference_gradient 0.4870138609999799 seconds (stddev: 0) 0.3059909609996794 seconds (stddev: 0) 1.59

This comment was automatically generated by workflow using github-action-benchmark.

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