• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ouranosinc / xclim / 5683966277
90%
main: 92%

Build:
Build:
LAST BUILD BRANCH: eco-ci-project
DEFAULT BRANCH: main
Ran 27 Jul 2023 06:15PM UTC
Jobs 2
Files 70
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5683966277

push

github

web-flow
Deterministic randomness (#1442)

<!--Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [x] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #1428
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [ ] CHANGES.rst has been updated (with summary of main changes)
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added

### What kind of change does this PR introduce?

Added new `random` fixture : it returns a numpy Generator with a
constant seed. All tests using random number generation use that
fixture. Each time the test is run, the same generator is returned, and
it generate the same numbers each time.

Some tests were already using specific seeds, but I tried to use this
new solution everywhere, leading to adjustment of the expected values in
many places.

The KMeans object of `sci-kit learn` doesn't support the conventional
numpy generator, so a specific fixture is created for these tests.

I rewrote some tests, to reduce the number of line and complexity. The
normal bootstrap tests for example have all been merged into one.

### Does this PR introduce a breaking change?
No, it only affects the tests.

### Other information:
I think we have no random generation done inside dask tasks, which
avoids having to implement that.

3 of 3 new or added lines in 1 file covered. (100.0%)

8248 of 9096 relevant lines covered (90.68%)

3.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-{{ matrix.tox-env }} - 5683966277.1 27 Jul 2023 06:21PM UTC 0
86.22
2 run-{{ matrix.tox-env }}-opt-slow - 5683966277.2 27 Jul 2023 06:21PM UTC 0
90.28
Source Files on build 5683966277
Detailed source file information is not available for this build.
  • Back to Repo
  • f6838a15 on github
  • Prev Build on master (#5680572103)
  • Next Build on master (#5727954351)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc