Fix Doctests - #2499
Conversation
|
|
||
| # can't use collect here because integdatasets might not exist. | ||
| def integdatasets_fitting_integ_dict(integdatasets=None): | ||
| def integdatasets_fitting_integ_dict(integdatasets): |
There was a problem hiding this comment.
The reason the regression testa are failing are these two lines.
I don't know whether you removed these =None or whether you simply were using a very old version of the code when you added your commits
|
You changed it for the integrability but not for the positivity. I'm not sure whether you merged back some old branch. I recommend you revert back your local version to this commit e489d6d and update the code there. |
|
@scarlehoff I have just reverted the positivity dictionary function back to the master version. Now the changes only affect the docstrings. |
|
What command did you use to check they pass doctests? I tried with (which would be fixed by doing Clearly, these are not errors in that they are both (I wanted to ask you to add it to the github workflow) |
You are right, I hadn't yet added the changed to the I have been using |
|
ah, okok, I thought perhaps there was a way to tell pytest to autoconvert the Running it with: I'm still getting a few errors. Most of them again things like so again, not really "errors" but doctest complains Also, you probably didn't get this one (since you might have installed 3.1 already) but I think that When you do that I'll add a new entry to (or if you want to try feel free, but perhaps ignore as well |
|
I don't seem to get this error, they all pass for me. What version of numpy are you using? |
|
ah, that's interesting. Perhaps it's worth to try it directly in the CI then... |
scarlehoff
left a comment
There was a problem hiding this comment.
lgtm, unless there's some specific reason to run the test only for labelled PRs I think it'd be better to do it at every push. It takes about 6 minutes so it is quite cheap.
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled] |
There was a problem hiding this comment.
I would just do it on every push tbh.
Is there any reason to do it only on labelled PRs?
There was a problem hiding this comment.
There was no particular reason other than it allowing us to have the flexibility to not run the test, but as it's fast then I can't see a reason why we wouldn't want to run it. I'll change this
This PR addresses this Issue.
Many of the examples given in docstrings were out of date. The majority of these have been reformatted and now pass
doctest. Where executing an example is unnecessary, it has been converted to a Python code block instead.To Do:
n3fit_data.py