-
-
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] Fix invalid use of single-grave in docstrings #6023
Conversation
This is monumental! Nice use of regex! Would you be able to contribute your tools to |
The invalid use of single-grave in docstrings has been fixed to correctly render code snippets in API Reference Documentation
c39255a
to
2480e63
Compare
Sure, I'll look into that |
Hi @fkiraly, could you answer me a few questions here:
|
Sure! Just to say this quickly, I'd merge this separately, and imo we should move testing etc to another PR.
I would say, yes. Or, do you anticipate issues with some files?
Hm, not sure. I though that the "easiest" would be to just dump your code in Turning this into a test - or pre-commit step - requires more work. But, if you feel it is not too much work in addition, a pre-commit step or |
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.
Hm, it would appear that the bulk fix also has affected some error message, e.g., quantiles must be N
etc. It is odd that some error messages had backticks, I've removed then - let's hope that tests pass.
Might be worth thinking about for automatization.
No issues with the file |
Yes, private elements should probably be excluded. Anyway, that's probably for another PR, I'll merge this once I've looked through the files. |
Hi. I stumbled on this while looking at blame. Just want to note that while it is best practice to have a double apostrophes for Edited:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html |
I get your point, you are saying that we can render single-apostrophes if we use sphinx roles instead of double-apostrophes |
Yeah. And there is a global |
double-apostrophes vs sphinx default role |
Double-apostrophes is definitely better and we should aim for the standard. I just think it is wasteful to not set default role to something useful. Edit: anyway I just gonna present that perhaps relevant. Hope it was informative somehow. I think your work on automation of docstring format would be really helpful. And sorry if it was distracting. |
discussions like this are better in new issues, closed PR are rarely monitored. Very valuable points, but I doubt anyone except us has seen these! My recommendation on "how should have been" and on similar cases is:
That way, we ensure that more people see it and contribute - and the useful content does not get lost or forgotten! |
(I think it still makes sense to open a new issue, at least to bring it to attention of other core devs) |
#### Reference Issues/PRs This PR is related to this work here: #6023 #### What does this implement/fix? Explain your changes. It creates a python script in `build_tools` that can be run to list out all the files and incorrect uses of `backticks` in the docstrings. #### Any other comments? If this tool is accepted we can use this to fix all the remaining invalid `backtick` uses and can later be converted to a pre-commit tool.
The invalid use of single-grave in docstrings has been fixed to correctly render code snippets in API Reference Documentation
Reference Issues/PRs
This PR relates to these comments
#5932 (comment)
#5984 (review)
What does this implement/fix? Explain your changes.
Does your contribution introduce a new dependency? If yes, which one?
No
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
No, Although I am planning to add one with some guidance
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
sktime
root directory (not theCONTRIBUTORS.md
). Common badges:code
- fixing a bug, or adding code logic.doc
- writing or improving documentation or docstrings.bug
- reporting or diagnosing a bug (get this pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference
See here for further details on the algorithm maintainer role.