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
Location reporting returns useless information #115
Using numpydoc 0.7, the location of reporting seems to be broken, the currently provided information is useless yet too verbose.
File "/Users/bsipocz/munka/devel/astroquery/astropy_helpers/astropy_helpers/extern/numpydoc/docscrape.py", line 343, in _parse
raise ValueError(msg)
ValueError: The section Examples appears twice in the docstring of None in None.
I see that part of the code is already been refactored. I wonder if it's fixes my issue, what's your ETA for a new release?
Edit: I've just checked this with the current dev version, same error:
Exception occurred:
File "/Users/bsipocz/munka/devel/astroquery/astropy_helpers/astropy_helpers/extern/numpydoc/docscrape.py", line 358, in _error_location
raise ValueError(msg)
ValueError: The section Examples appears twice in the docstring of None in None.
I don't think this is fixed (I introduced this in #95). It's not always useless, only if the information is not available at this point. The case were both are None is not caught and in that case we could get a more concise message. I don't think the necessary information is available at this point, but there might be a way to get around this.
I managed to get some info out when hacked that filename print to return self._parsed_data.
(We run into this case when we tried to use the docstring to generate parts of another one's. Clearly that utils function of ours needs upgrading, too).
Actually somewhat orthogonal, but in the same travis log there are examples for another message where a location would be most useful, too (though Return is at least grep-able for in the codebase). UserWarning: Unknown section Return
I'm not 100% sure this was released yet? I feel the better error messages are mostly helpful for CI and maintainers - contributors tend not to look at the error messages in the doc build that much (unless you make the CI fail). So you can still benefit. I'm often switching between numpydoc branches when building the sklearn docs, at least for debugging purposes ;)
It wasn't released yet as of 0.7.
We actually make the docs builds fail on travis for most of the astropy projects, and also promote it in our package template, thus it will also bite maintainers less familiar with any of the infrastructure...
Now that Scikit-learn 0.19.1 is heading out the door, I would like to work towards getting numpydoc 0.8 out, as scikit-learn dev docs are currently a bit broken without b215bed. I figure I might as well try to fix a few of the easy issues here first.
I have a half-way ready hack from last weekend that I can try to finalize today (sadly my laptop died on Monday, so getting a backup solution up and ready took most of my time after that...).
Activity
amueller commentedon Oct 15, 2017
I don't think this is fixed (I introduced this in #95). It's not always useless, only if the information is not available at this point. The case were both are None is not caught and in that case we could get a more concise message. I don't think the necessary information is available at this point, but there might be a way to get around this.
bsipocz commentedon Oct 15, 2017
I managed to get some info out when hacked that filename print to return
self._parsed_data.(We run into this case when we tried to use the docstring to generate parts of another one's. Clearly that utils function of ours needs upgrading, too).
bsipocz commentedon Oct 15, 2017
Actually somewhat orthogonal, but in the same travis log there are examples for another message where a location would be most useful, too (though
Returnis at least grep-able for in the codebase).UserWarning: Unknown section Returnamueller commentedon Oct 15, 2017
@bsipocz that should have been fixed in #101. And PR certainly welcome to improve the current message / heuristics.
bsipocz commentedon Oct 15, 2017
Arrg, I should have looked into the recent changes more carefully, and bundle that one into the recent astropy-helpers release.
bsipocz commentedon Oct 15, 2017
I'll see whether I can cook up a PR quickly. Won't promise that it happen, but will look into it tonight.
amueller commentedon Oct 15, 2017
I'm not 100% sure this was released yet? I feel the better error messages are mostly helpful for CI and maintainers - contributors tend not to look at the error messages in the doc build that much (unless you make the CI fail). So you can still benefit. I'm often switching between numpydoc branches when building the sklearn docs, at least for debugging purposes ;)
amueller commentedon Oct 15, 2017
Development speed on numpydoc is pretty slow, so no rush, and if you get to it at any point, I'm sure many people would appreciate it :)
bsipocz commentedon Oct 15, 2017
It wasn't released yet as of 0.7.
We actually make the docs builds fail on travis for most of the astropy projects, and also promote it in our package template, thus it will also bite maintainers less familiar with any of the infrastructure...
bsipocz commentedon Oct 15, 2017
It will either happen some time soon (as now I still remember where and what the issue was), or probably never... 😉
jnothman commentedon Oct 22, 2017
Now that Scikit-learn 0.19.1 is heading out the door, I would like to work towards getting numpydoc 0.8 out, as scikit-learn dev docs are currently a bit broken without b215bed. I figure I might as well try to fix a few of the easy issues here first.
bsipocz commentedon Oct 22, 2017
I have a half-way ready hack from last weekend that I can try to finalize today (sadly my laptop died on Monday, so getting a backup solution up and ready took most of my time after that...).
jnothman commentedon Oct 23, 2017
So I haven't understood: is this issue fixed in master, or not?
bsipocz commentedon Oct 23, 2017
It's not yet fixed in master. I have one working solution (more like a hack) locally and will open a PR for it shortly.
bsipocz commentedon Oct 23, 2017
See PR #123
Clarify location of certain invalid docstrings. (#200)