TST/DOC: set up doctesting - #921
Conversation
|
cc @lucascolley |
|
aha, thanks for working on this! There are some merge conflicts now, sorry, bad timing with a big refactor. Let me know if you have any trouble resolving them. |
| >>> import array_api_extra as xpx | ||
| >>> xpx.at(x, idx).set(value) # or add(value), etc. | ||
| >>> xpx.at(x)[idx].set(value) | ||
| import array_api_extra as xpx |
There was a problem hiding this comment.
Removing >>> disables the doctester AFAIU, is this the intent here?
There was a problem hiding this comment.
yes. is there a better way?
There was a problem hiding this comment.
why are we disabling the doctester though? Can we not fix the example instead?
There was a problem hiding this comment.
I think they are all illustrative snippets (pseudocode): idx, x, value are not defined for example. Do you suggest making them all proper doc examples?
There was a problem hiding this comment.
FWIW I did not realize these are illustrations nit proper examples. The latter are preferable long-term, but if your goal now is to shield this docstring from doctesting, sure, removing the REPL prompt is the way.
An alternative is to add the function name into the skiplist (cd scipy's conftest). Or indeed make a full doctest example, which us obviously more work.
Which of these options is preferable, I can't say. And won't hold this PR for either of these.
@lucascolley I think the conflicts are fixed now. |
Closes #397
This PR tries to set up doctesting using scipy_doctest. I had to fixed a couple of doc examples for
pixi run docteststo pass.I worked with Codex on this, notably the
conftest.py.