Skip to content

Add transport k vs Sauter regression test#78

Open
krystophny wants to merge 8 commits into
mainfrom
issue-77-transport-k-sauter-regression
Open

Add transport k vs Sauter regression test#78
krystophny wants to merge 8 commits into
mainfrom
issue-77-transport-k-sauter-regression

Conversation

@krystophny

Copy link
Copy Markdown
Member

Summary

  • Add compute_transport_k(d31, d32) to neo2_ql package (k = 5/2 - D32_ii / D31_ii)
  • Add regression test comparing NEO-2 k against gacode NEO Sauter reference on 2 AUG 30835 radial surfaces (rho_pol ~ 0.29, 0.70)
  • Reference fixture with D31/D32 and Sauter k values stored in private data repo (plasma/data, branch issue-77-transport-k-sauter-regression)
  • CI authenticates via project deploy token (new GITLAB_DEPLOY_TOKEN / GITLAB_DEPLOY_USER secrets, replaces expired GITLAB_ACCESS_TOKEN)
  • Data repo also gets the full gacode_compare package and gacode NEO run outputs for provenance

No private data exposed in this repo. Test skips gracefully when NEO2_DATA_DIR is not set.

Closes #77

Verification

Test passes locally with data

$ NEO2_DATA_DIR=/home/ert/data PYTHONPATH=src python3 test/test_transport_k.py
All transport-k tests passed.

Test skips gracefully without data

$ PYTHONPATH=src python3 test/test_transport_k.py
SKIP: NEO2_DATA_DIR not set or fixture not found
All transport-k tests passed.

CTest passes

$ ctest --test-dir TEST --output-on-failure
1/2 Test #1: nrutil_test ......................   Passed    0.06 sec
2/2 Test #2: python_transport_k_test ..........   Passed    0.55 sec
100% tests passed, 0 tests failed out of 2

Test plan

  • CI clones data repo with deploy token successfully
  • CI checks out matching issue-77-transport-k-sauter-regression branch in data repo
  • Transport k test runs and passes in CI
  • Merge data repo branch to main after this PR merges

Add compute_transport_k (k = 5/2 - D32/D31) to neo2_ql package and a
regression test that compares NEO-2 k against gacode NEO Sauter reference
on 2 AUG 30835 surfaces.  Reference fixture lives in the private data
repo (plasma/data) and is accessed via NEO2_DATA_DIR env var.

CI workflow updated to use a project deploy token instead of a personal
access token for cloning the data repo, and to checkout the matching
branch before running the test.

Closes #77
Move github.head_ref into env block instead of direct ${{ }}
interpolation in shell context. Remove redundant branch checkout
from golden record step since Clone test data already handles it.
Import from neo2_ql.transport_k instead of neo2_ql to avoid pulling
in the full package init chain which requires scipy.
Inline the trivial formula in the test to avoid importing the full
neo2_ql package which pulls in scipy (not declared as a dependency).
The data repo uses git LFS for all files. Add selective LFS pull
for the transport_k fixture directory after checkout.
git lfs needs explicit credentials URL when using deploy tokens.
Deploy tokens don't support git LFS. Use personal access token
(GITLAB_ACCESS_TOKEN) with oauth2 prefix which works for both
git clone and LFS operations.
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.

Add repo-local regression for transport k vs Sauter reference

1 participant