PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

Use `scipy-doctest` instead of `refguide-check` #747

Closed ev-br closed 6 days ago

ev-br commented 4 weeks ago

SciPy has recently refactored its refguide-check utility into a separate pip-installable package and added integration of the modified doctesting with pytest. This PR switches the refguide-check run (which uses the utility vendored from scipy) to this refactored way.

There are several minor tweaks to docstrings --- I'm actually not sure all the affected docstrings were checked previously (but they are now):

The pytest incantations to run doctesting are explicit on the CI --- in SciPy, these are hidden behind the dev.py smoke-docs interface.

ev-br commented 4 weeks ago

Thanks @agriyakhetarpal . Rolled back all changes to *rst files, removed the corresponding stanza from the CI run, and removed the refguide-check utility as "not used anymore". Would be nice if you could trigger the CI run for me, would you?

agriyakhetarpal commented 4 weeks ago

Thanks! I tried but it turns out I don't have enough permissions to trigger a CI run – tagging @rgommers who can do this for you.

rgommers commented 4 weeks ago

triggered now - the joys of spammer-protection:)

ev-br commented 4 weeks ago

Thanks Ralf! So the CI is green, thus the question is whether y'all want it :-). And if you do, whether you want a spin command to to mimic scipy's python dev.py smoke-docs.

rgommers commented 4 weeks ago

Yes, and yes. thanks:)

And if you do, whether you want a spin command to to mimic scipy's python dev.py smoke-docs.

Do you want to include that here, or separately?

ev-br commented 4 weeks ago

A follow-up PR would not require restarting the CI for me, so seems easier :-).

rgommers commented 4 weeks ago

Did you actually notice the doctesting happening in CI? I only see REFGUIDE_CHECK: [0] in test.yml.

ev-br commented 4 weeks ago

Indeed! So it was never actually running on CI, huh :-). Pushed a commit to switch it always on. Depending on how you want to play this, can iterate the CI in follow-ups or here. (If the latter, a new commit asks for one more confirmation I'm not a crypto miner)

rgommers commented 4 weeks ago
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'util/readthedocs/requirements.txt'

If it becomes a pain for CI not to run, maybe submit a trivial typo/change PR that can be merged straight away?

agriyakhetarpal commented 3 weeks ago

With the latest failure, maybe we should do cd .. rather, much easier than fixing the paths in-place every time.

ev-br commented 3 weeks ago

Since sphinx on CI, which is the source of the failures, is not really related, maybe it's best to separate the fixes.

ev-br commented 3 weeks ago

Okay, current status:

So how about not fixing the sphinx-build check in this PR? If that's OK, the PR is ready from my side.

agriyakhetarpal commented 3 weeks ago

I'll hope to fix the sphinx-build checks in a separate PR after this – I would be fine with this getting merged.