-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Improve Docstring for MAPE Metrics #4563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, really great!
I left some small comments, these are not blocking since small, but kindly have a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, all good to go!
Non-blocking comment: The absolute bars around fractions render as too short, so I would recommend to use the \left|
and \right|
commands instead of just |
if it is around \frac
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for taking the approval back, but it looks like there is now an issue with the examples.
As the r
has been added , the backslash for newline (that was already there!) is now causing trouble. Could you kindly check and possibly reformat?
I see. based on sphnix doc, I added
Didnt realise that it'd affect the Also, I'm wondering, which test files that run documentation tests for consistency. would be great if I could run the tests locally and detect this sort of problem before pushing the commits. |
I think that's an extremely valid point! Would appreciate if you could open an issue that there should be some guide on how to run the doctests locally. The current guide only covers Could you open an issue to add this to Here's from |
you still need the |
Actually, I reformatted it by removing the line break first. but something like below happened when I rebuilt the doc. Look at (default='uniform_average'). the docstring is formatted as below wo the
Even if I indent it to align with is there a way to still use backslash as a continuation line when the docstring is in raw format (when Sorry, I didn't pick up that the preferred code style uses Also regarding UpdateI found a suggestion from this closed PR that I can ignore the 88 max length limit with # noqa: E501 at the end of the docstring, is that permissible? |
doctest already runs as part of the CI, it's only about telling people how to run it locally
I don't know... I would just shorten the line |
(well, funnily, this got more complicated than thought. What a fiddly thing, that backslash...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should I do with this?
the thing is, that sentence explains a list of acceptable parameters for that argument and what the default parameter is. cant really shorten it else, users won't know what to change in that argument to control the function behaviour. Anyway, I may have missed your requested changes. 😅 Sorry about that. very new to this thing. I guess I missed the opportunity to get coauthor-commit badges.
yeah lol. |
Not sure what badge that is? You can get a |
I see - well, in that case, I took the liberty to commit directly to your branch with an alternative docstring field that does not go over the character limit, this should also get you the badge :-) |
Reference Issues/PRs
Fixes #4457. See also #4303
What does this implement/fix? Explain your changes.
Does your contribution introduce a new dependency? If yes, which one?
No
Any other comments?
This isn't directly related to the PR, but I ran the documentation build locally to confirm that the changes were displayed correctly. During the process, I noticed that it took a while to build the HTML docs. It would be great if this process could be sped up a bit. Maybe consider
sphinx-autobuild
extension to automatically detect changes in docs with live-reload in the browser during local development.PR checklist
For all contributions