Clustering.jl
Clustering.jl copied to clipboard
Add `rng` parameter to appropriate methods
This PR adds a kw-argument rng
to the methods that rely on RNG. This will break dependency on the default global RNG object and will allow to better control of RNG behavior in the tests by using RNG from StableRNGs
package.
In addition, some test were switched from using Random.GLOBAL_RNG
to StableRNG
.
Codecov Report
Merging #228 (159061b) into master (8af2507) will decrease coverage by
0.12%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #228 +/- ##
==========================================
- Coverage 95.30% 95.18% -0.13%
==========================================
Files 17 16 -1
Lines 1213 1328 +115
==========================================
+ Hits 1156 1264 +108
- Misses 57 64 +7
Impacted Files | Coverage Δ | |
---|---|---|
src/fuzzycmeans.jl | 87.87% <100.00%> (+1.21%) |
:arrow_up: |
src/kmeans.jl | 99.35% <100.00%> (+0.06%) |
:arrow_up: |
src/seeding.jl | 100.00% <100.00%> (ø) |
|
src/hclust.jl | 93.95% <0.00%> (-0.91%) |
:arrow_down: |
src/mcl.jl | 90.38% <0.00%> (-0.15%) |
:arrow_down: |
src/utils.jl | 100.00% <0.00%> (ø) |
|
src/dbscan.jl | 100.00% <0.00%> (ø) |
|
src/varinfo.jl | 100.00% <0.00%> (ø) |
|
src/Clustering.jl | ||
... and 5 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8af2507...159061b. Read the comment docs.
Awesome, this looks great for tests in downstream packages. I would love to see a release tagged for this!
https://github.com/JuliaRegistries/General/pull/68842