Conversation
…n doing floating point number comparisons
ielis
left a comment
There was a problem hiding this comment.
Hello @justaddcoffee,
thanks a lot, using ellipsis in float comparisons is a very good and useful idea. I have a few comments & questions, can you pls see below?
Thank you!
| >>> p_value = r.pvalue | ||
| >>> float(p_value) | ||
| 6.348081479150902e-06 | ||
| >>> float(p_value) # doctest: +ELLIPSIS |
There was a problem hiding this comment.
The doctest runner seems to recognize the ... even without #doctest: +ELLIPSIS marker, and the test passes here. Does the same happen on your end? If yes, pls remove # doctest: +ELLIPSIS.
pyproject.toml
Outdated
| test = [ | ||
| "pytest>=7.0.0,<8.0.0", | ||
| "pytest-cov", | ||
| "numtest" |
There was a problem hiding this comment.
I am not sure we really need this dependency. All tests passed on my end without numtest, just with the ... at proper places. Unless I am missing something, we do not need numtest, and by applying Occam's razor, it should be removed.
…IS_MARKER = '...' and DOCTEST +ELLIPSIS annotations
|
Thanks @ielis - you are right, the |
ielis
left a comment
There was a problem hiding this comment.
Looks great now, thank you!
doctests in survival.rst and phenotype_scores.rst are failing for me on my Macbook M1 MacOS v12.5
This PR adds numtest as a test dependency and then uses ELLIPSIS_MARKER to allow approximate comparisons