Skip to content
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

ENH/TST: Doctest narrative documentation #14707

Closed
bsipocz opened this issue Oct 15, 2019 · 5 comments
Closed

ENH/TST: Doctest narrative documentation #14707

bsipocz opened this issue Oct 15, 2019 · 5 comments

Comments

@bsipocz
Copy link
Member

bsipocz commented Oct 15, 2019

I can't yet claim to have any detailed oversight of the testing infrastructure of numpy, it definitely seems that a number of narrative documentations are not tested yet, e.g. here:
doc/source/reference/.

I've tried to force doctest to pick up those tests, but so far it's without much success. I got to the point with pytest-doctest that the files are found, but for some reasons there are still deselected.

$ ~/munka/devel/numpy [doc_ma_generic L|✚ 2…1⚑ 1] $ pytest -m doctest doc/source/reference/ --doctest-rst
================================================= test session starts ==================================================
platform darwin -- Python 3.7.4, pytest-5.2.0, py-1.8.0, pluggy-0.12.0
rootdir: /Users/bsipocz/munka/devel/numpy, inifile: pytest.ini
plugins: xdist-1.29.0, forked-1.0.2, arraydiff-0.3, xonsh-0.8.3, dependency-0.4.0, remotedata-0.3.2, doctestplus-0.4.0, openfiles-0.4.0, asdf-2.4.2, cov-2.8.1, requests-mock-1.6.0
collected 89 items / 89 deselected   
@mattip
Copy link
Member

mattip commented Oct 15, 2019

We use python runtests.py --recheck-guide to do doctest testing

@bsipocz
Copy link
Member Author

bsipocz commented Oct 15, 2019

yes, but that is not testing stuff in doc/source/reference/

@mattip
Copy link
Member

mattip commented Oct 15, 2019

are there docstrings there? I think the examples in the rst files are run by sphinx, that is how the plots are created here

@bsipocz
Copy link
Member Author

bsipocz commented Oct 15, 2019

yes, there are plenty of them, and a few issues opened about code examples that doesn't work, e.g. here:
https://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html

I'm in the middle to clean up that page, but it's just symptomatic treatment until the doctests are picking those pages up automatically

@mattip
Copy link
Member

mattip commented Dec 8, 2019

Superceded by gh-14970, now that refguide-check can test snippets in RST documenation.
Please reopen if I missed something.

@mattip mattip closed this as completed Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants