-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
DOC, TST: Refguide Wish List #12548
Comments
Not too controversial I think. Doing all non-underscored modules by default is a reasonable alternative. I think the exclude list will in many cases then be just as long though, most packages don't have good public/private separation - and that includes numpy and scipy. So there's not much to gain either. |
@mattip Also pointed out https://pypi.org/project/xdoctest/ That project parses the abstract syntax tree. Has ability to skip blocks, which I think we don't. Recent discussions seem to favor feature merge of some sort with https://github.com/astropy/pytest-doctestplus and @mhvk has a pertinent issue of that nature open there |
There's a way to skip blocks marker as pseudocode in refguide_check. The way it's implemented is a hack, but it can be done better using the standard doctest machinery, (need to sibclass the DocTestFinder IIRC). |
I started the ball rolling a little on the html docstring line coverage infrastructure: nedbat/coveragepy#808 My first impression after two days of looking into that is that it is hard! We'll see what Ned thinks I guess. It looks like the original "hits" in Raymond Hettinger's Stack Overflow example may just be default fallbacks used by |
Background:
tools/refguide_check.py
is vendored in (copied in & slightly customized) from the original version available at the same path in the SciPy repo, and runs standard library doctests with various fallbacks to make execution / expectations more reasonable for scientific code (i.e.,allclose
type checks for floating point results in NumPy arrays, and so on).Related original issue: #9415
Related original PR to add refguide: #12253
Here's a wish list -- feel free to edit or comment below, and I'll update it.
ACTUAL
vs.DESIRED
values and / or the error messages? see, for example: ENH: add "max difference" messages to np.testing.assert_array_equal #12591 (comment))Would be neat if refguide had an # assumes: <tag> syntax, with a way to specify which tags are expected to hold. This would be stronger than the current "may vary".
[1] See https://mail.python.org/pipermail/python-ideas/2014-August/028678.html and thread leading up to it.
The text was updated successfully, but these errors were encountered: