Conversation
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.
This was referenced Sep 29, 2026
…n-unit-test-coverage
CI's check_test_style requires test_<area>_<rest>.py; Kronecker is a discrete distribution, so dd is the correct area prefix.
alegresor
approved these changes
Sep 30, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds unit-test coverage for
qmcpy.Kronecker, including regression tests for #612(
periodic_discrepancyreturns NaN / is shift-dependent under the defaultrandomize="SHIFT"). The four tests pinning that bug are marked@unittest.expectedFailuresince the fix has not yet landed ondevelop(tracked in PR #556 / PR #633).
pytest test/test_kronecker.py -v(32 passed, 4 xfailed)Plan for the xfail markers
Once #556/#633 merge #612's fix to
develop, I will rebase this branch, removethe
expectedFailuremarkers from the now-passing tests, and rewritetest_squared_discrepancy_matches_direct_double_sum(it currently passes onlybecause it encodes the pre-fix formula's structure).
AI Assistance
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
origin/lattice_kroneckerandorigin/issue_629_choi.