-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove FLOAT_CMP in favor of pytest's NUMBER? #184
Comments
That would require bumping minversion of pytest to 7.1 ? How does one control rtol and atol? |
Seems pretty sane? Perhaps we should test it somewhere? |
So, we will lose the ability to use these settings? I am actually not sure who is using it but I want to understand all the implications. |
I think yes we will lose these settings, but gain something nicer, which is that each float comparison can have its own |
I would gravitate towards getting on the same page with scipy/numpy rather than vanilla doctest. IMO don't fix what's not broken, and NUMBER doesn't seem to offer any extra over FLOAT_CMP atm. |
We discussed this at infrastructure tag-up 2022-08-11. If using NUMBER means one less thing we have to maintain and it is good enough, maybe worth it. Problem is no one has the time to explore this. @nstarman , are you interested to experiment by replacing FLOAT_CMP as alias to NUMBER as a PR here, and then have |
what is the overall time requirement of rewriting all core/coordinated usage of |
Re: time requirement -- Not much recently. Though if things ever break, we don't have a lot of resources to deep-dive into what changed upstream, so 🎲 . |
frankly a feature like |
Haven't heard about |
Longish discussion is here and resources (email threads, discorse, repos, etc.) linked from within: numpy/numpy#21070 |
😬. I can give it a try. I've never delved under pytest's hood. |
Yes, upstreaming is now very much on the table, yet this suggestion still not clear that would make sense without a clear lists of benefits (that overwhelm the need for the the deprecation and refactoring). So I'm very much so on the opinion of closing this as a "not now". |
upstream as in to pytest? |
More like a sidestream (still as a plugin, wasn't that the conclusion of the upstreaming discussion that it should still stay as a plugin?) if it works out and is adopted for the more generic libraries. |
Pytest offers NUMBER (see in https://docs.pytest.org/en/7.1.x/how-to/doctest.html#using-doctest-options). I think this does everything FLOAT_CMP does.
For backwards compat, we could make FLOAT_CMP just point to NUMBER...
The text was updated successfully, but these errors were encountered: