Skip to content

Add Kronecker discrepancy regression tests (#612) - #635

Open
algo-hawk wants to merge 3 commits into
developfrom
testing_env/brandon-unit-test-coverage
Open

algo-hawk wants to merge 3 commits into
developfrom
testing_env/brandon-unit-test-coverage

Conversation

@algo-hawk

Copy link
Copy Markdown
Collaborator

Summary

Adds unit-test coverage for qmcpy.Kronecker, including regression tests for #612
(periodic_discrepancy returns NaN / is shift-dependent under the default
randomize="SHIFT"). The four tests pinning that bug are marked
@unittest.expectedFailure since the fix has not yet landed on develop
(tracked in PR #556 / PR #633).

Plan for the xfail markers

Once #556/#633 merge #612's fix to develop, I will rebase this branch, remove
the expectedFailure markers from the now-passing tests, and rewrite
test_squared_discrepancy_matches_direct_double_sum (it currently passes only
because it encodes the pre-fix formula's structure).

AI Assistance

  • AI assistance substantively affected this PR, and I describe that use below.

Used AI assistance to help design and write the test suite, and to independently
verify (via a scratch worktree) that PR #556 and PR #633 fix the pinned bugs
before recommending them for merge.

Checklist

  • I linked the relevant issue or explained why none was needed. -- Related to Kronecker.periodic_discrepancy returns NaN under the default randomize='SHIFT' #612, see plan above.
  • I added or updated tests, docs, notebooks, or explained why they were not needed. -- this PR is test-only.
  • I verified any equations, citations, benchmarks, numerical claims, or external references changed in this PR. -- reproduced the NaN/shift-dependence bug locally and verified the fix independently against origin/lattice_kronecker and origin/issue_629_choi.
  • I reviewed AI-assisted content for licensing, provenance, attribution, confidentiality, and security concerns.
  • I described any CI, dependency, notebook runtime, or generated artifact changes if applicable. -- none.

Pins the shift-dependence/NaN bug in Kronecker.periodic_discrepancy
with expectedFailure tests. Includes broader unit-test coverage for
the Kronecker sequence construction, generating vectors, randomization,
and spawning.
CI's check_test_style requires test_<area>_<rest>.py; Kronecker is a
discrete distribution, so dd is the correct area prefix.

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.

5 participants