refactor: do not use built-in random and add proper linter check#698
Merged
refactor: do not use built-in random and add proper linter check#698
Conversation
cdb4777 to
a39864a
Compare
Codecov Report
@@ Coverage Diff @@
## master #698 +/- ##
=======================================
Coverage 84.12% 84.12%
=======================================
Files 246 246
Lines 20448 20450 +2
Branches 2759 2760 +1
=======================================
+ Hits 17201 17203 +2
Misses 2673 2673
Partials 574 574
|
msbrogli
previously approved these changes
Jul 12, 2023
a39864a to
f5c3905
Compare
msbrogli
previously approved these changes
Jul 12, 2023
luislhl
reviewed
Jul 12, 2023
|
|
||
| .PHONY: check-version | ||
| check-version: | ||
| bash ./extras/check_version.sh $(VERSION) |
Contributor
There was a problem hiding this comment.
I think we will need to adapt the .github/workflows/docker.yml, because we used this arg there.
Since you ported it to be an env var, we should set it as an env var there instead. Besides migrating to the new check-custom there as well.
Member
Author
There was a problem hiding this comment.
Oh, right, I'll fix it.
Member
Author
There was a problem hiding this comment.
Done. I've fixed it and tested with act with a wrong and correct tag and both work as expected.
f5c3905 to
33abcac
Compare
33abcac to
ba13778
Compare
msbrogli
approved these changes
Jul 12, 2023
2 tasks
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.
Motivation
Some tests are still using the built-in
randommodule, which makes it so we can't reproduce a random case.Acceptance Criteria
self.rng(fromtests.TestCase) insead ofrandomself.rnguse the seed fromself.seed_config, using a random seed when it isNoneChecklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged