Repository navigation
Add a focused DUB target for distribution unit tests - #392
Merged
Merged
Conversation
Register `dub test mir-stat:distribution-tests` for local work on distributions. Compile the distribution source tree with the ordinary mir_stat_test version and follow its imports so DMD and LDC also run the unit tests for shared helpers, including covariance views. Document the focused command alongside the full suite and slow numerical reference sweeps. On Windows with DMD 2.114.0, a forced build and test run took 42 seconds for the 72 focused modules and 2m 09s for the full 113-module suite. AI-Assisted-By: Codex (GPT-6.2 Astra Medium)
The folded log-density test lived inside the NoncentralChi2 template. When a separately compiled module instantiated it for Fp!64, DMD and LDC could skip the nested unittest and still report a passing suite. Move the test to module scope and instantiate NoncentralChi2!(Fp!64) there. DMD coverage confirmed that all three assertions ran once in both the default package build and per-file compilation. AI-Assisted-By: Codex (GPT-6.2 Astra Medium)
Keep automatic discovery of distribution modules and list their shared helpers as DUB sources. With singleFile compilation, the previous -i flags could emit the same helper in multiple objects and cause duplicate definitions at link time. Enable mir_stat_test for coverage builds as well as ordinary unittests. Use a short local runner path so Windows coverage report names fit in long checkout paths. AI-Assisted-By: Codex (GPT-6.2 Astra Medium)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Run
dub test mir-stat:distribution-testsfrom the repository root to exercise the ordinary distribution tests and their shared helpers. Usedub testfor the full library suite.The target discovers modules under
mir.stat.distributionautomatically, including modules that no other test imports. It lists shared helper sources in the DUB recipe so per-file builds compile each helper once. A short local runner path keeps Windows coverage report names manageable in long checkouts.Move the
Fp!64noncentral chi-squared log-density cutoff test to module scope. DMD and LDC could silently skip the nested unittest when a separately compiled module instantiated the template.Validation
singleFilemode. The full DMD suite passed all 113 modules.singleFilemodes.AI-Assisted-By: Codex (GPT-6.2 Astra Medium)