You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use CI to make sure # doctest: +ELLIPSIS is not in docs #17019
I could also use a grep function (e.g., grep --include=\*.py -rnw sklearn/ -e '# doctest: +ELLIPSIS'), capture the exit code and raise an error if pattern found.
@thomasjpfan@jnothman I'm quite sure a PR has just been merged removing a forgotten "# doctest: +NORMALIZE_WHITESPACE", but I can't find it right now. Anyway, finding this one (#13991) helped me to better understand what is the goal of this issue.
Shouldn't be more suitable to check for custom doctest directive in the CI, not only ELLIPSIS?
I could also use a grep function (e.g., grep --include=*.py -rnw sklearn/ -e '# doctest: +ELLIPSIS'), capture the exit code and raise an error if pattern found.
We most likely need to check the rst as well.
Shouldn't be more suitable to check for custom doctest directive in the CI, not only ELLIPSIS?
I agree we should check for "# doctest: +NORMALIZE_WHITESPACE". I think a greping solution as suggested by @lucyleeow would work for our use case.
Activity
GaelVaroquaux commentedon Apr 24, 2020
cc @lucyleeow if you have spare cycles
lucyleeow commentedon Apr 24, 2020
AFAICT there is no option to do this with flake8. You could do it with a flake8 plugin (e.g., https://github.com/i02sopop/flake8-banned-words) but we'd need to rely on an external plugin.
I could also use a grep function (e.g.,
grep --include=\*.py -rnw sklearn/ -e '# doctest: +ELLIPSIS'), capture the exit code and raise an error if pattern found.cmarmo commentedon May 12, 2020
@thomasjpfan @jnothman I'm quite sure a PR has just been merged removing a forgotten "# doctest: +NORMALIZE_WHITESPACE", but I can't find it right now. Anyway, finding this one (#13991) helped me to better understand what is the goal of this issue.
Shouldn't be more suitable to check for custom doctest directive in the CI, not only
ELLIPSIS?thomasjpfan commentedon May 16, 2020
We most likely need to check the
rstas well.I agree we should check for
"# doctest: +NORMALIZE_WHITESPACE". I think a greping solution as suggested by @lucyleeow would work for our use case.rth commentedon May 18, 2020
Ideally it would have been nice to run this as part of pre-commit checks as well, so that these checks could be easily run locally, but so far I have not found an obvious way of doing that. There is a number of setups that forbid something https://pre-commit.com/hooks.html but not one that takes as input a list of regexp...