Uh oh!
There was an error while loading. Please reload this page.
Fix doctests - #4408
Conversation
Uh oh!
There was an error while loading. Please reload this page.
keewis
left a comment
There was a problem hiding this comment.
Is there a tool to do this or you had to copy and paste all the results?
that was a entirely manual process. However, it should be possible to write a script using doctest.DoctestParser, doctest.DoctestFinder and doctest.DoctestRunner (and I would be surprised if there's nothing like that already).
Uh oh!
There was an error while loading. Please reload this page.
max-sixty
commented
Sep 6, 2020
Well, thanks for doing all that! On the tool, I agree that would be great. Here's something I did in a day that aimed to do it for any value rather than doctests. Would be easier and less complicated for doctests: https://github.com/max-sixty/pytest-accept |
dcherian
commented
Sep 9, 2020
shall we merge and deal with the effects of #4409 later? |
I tried to fix the remaining doctests that were unrelated to #4409, so those need a review first (especially the |
wow. The RTD check fails due to: |
max-sixty
commented
Sep 10, 2020
Looks great! I raised an eyebrow about the Re the warning, we could add an |
keewis
commented
Sep 10, 2020
yeah, well, I didn't want to leave files lying around. Not sure if there's a better way to do that. Maybe if there's a way to have
I doubt that would fix it (maybe I'm missing something), these are triggered by |
keewis
commented
Sep 10, 2020
the main build is also failing so I guess this is unrelated. There is a |
which makes manually removing paths unnecessary
keewis
commented
Sep 10, 2020
@max-sixty, I removed the call to |
| np.random.seed(0) | ||
| # always switch to the temporary directory, so files get written there | ||
| tmpdir.chdir() |
max-sixty
commented
Sep 11, 2020
Great! To the extent the RTD build failure is not from this branch, shall we merge this now? |
max-sixty
commented
Sep 11, 2020
(i.e. feel free to merge!) |
the failing hypothesis test looks unrelated, so I'm merging. Edit: it seems RTD was fixed |
max-sixty
commented
Sep 11, 2020
Thanks a lot @keewis ! This is a big step forward! |
keewis
commented
Sep 11, 2020
should we add a CI that checks that we don't regress? |
dcherian
commented
Sep 11, 2020
Sounds good to me. Thanks for working on this. |
keewis
commented
Sep 11, 2020
okay, then let's wait for #4409 which should fix the remaining three doctest failures. |
max-sixty
commented
Sep 11, 2020
For sure re CI! |
This is an attempt to fix the examples in our docstrings. With this, the output of:
is
remaining warnings and errors
where
DataWithCoords.pipeandDataset.filter_by_attrsfail mostly because the order of the coords is not deterministic. Should we sort before formatting the coords?Does anyone know what
dsinsave_mfdatasetshould look like? Also, how do we fix the construction ofOuterIndexerandVectorizedIndexer?isort . && black . && mypy . && flake8whats-new.rstEdit: if we merge #4409 before this, we can make sure all doctests pass.