Repository navigation
random walker: Display a warning when the probability is outsite [0,1] for a given tol - #4631
Conversation
|
@sciunto I tried to fix the CI problem, please pull from your remote branch :-). |
|
Thank you very much @sciunto for addressing an old but relevant issue. Since you added a new attribute could you please also add a new test (probably checking that the warning is issued if |
|
Thanks for the fix and the comment. I'll add some tests and might need to revisit others as well. |
|
Now you have to catch the warnings in the tests :-). |
Co-authored-by: Riadh Fezzani <[email protected]>
|
Now, it should pass, and proper tests are added. :) |
|
|
||
| def test_prob_tol(): | ||
| # Turn warnings into errors | ||
| warnings.simplefilter('error') |
There was a problem hiding this comment.
I think this is good for debugging, but I don't think it should persist through the test suite.
There was a problem hiding this comment.
I'm just afraid that otherwise, we miss a failure. What's your suggestion?
There was a problem hiding this comment.
ah good catch. Anyway uncaught warnings make the test suite fail.
There was a problem hiding this comment.
@emmanuelle shall I understand that you want me also to remove this line?
On my machine, the test was not failing without this line. Is there another configuration in the CI that I missed? I remember that warnings were supposed to fail at some point, but I can't remember how this is set.
There was a problem hiding this comment.
Found it. The same line is in setup_test()
There was a problem hiding this comment.
@sciunto so are you going to remove it?? =) At which point you will have my approval. =)
There was a problem hiding this comment.
Now that I understand, yes :D
There was a problem hiding this comment.
I just pushed the commit
|
Who wants to make a second review over here? :) |
Co-authored-by: Riadh Fezzani <[email protected]>
Description
I fully agree with the diagnosis explained in this #2360 (comment)
In this PR, I add a new parameter to display a warning when the probability is off.
Closes #2360
Checklist
./doc/examples(new features only)./benchmarks, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py.doc/release/release_dev.rst.