-
-
Notifications
You must be signed in to change notification settings - Fork 656
Handle aliased functions and methods in generated documentation #40753
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
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit 36f57f3; changes) is ready! 🎉 |
looks somewhat reasonable. Is there any plan to do similar thing in |
Yes. For an alias, the original docstring appears on command-line. It would be nice that that is preceded by something like "This is an alias of ...".
|
I wasn't planning to but I guess we could, more thoughts below.
The point of this PR was to remove unnecessary entries from the HTML docs. I think including the docstring for aliases on the command line is fine. Definitely don't want to remove it like this code does for the HTML docs. We could add something at the start of the docstring like you say. Do you think users might be confused by both |
OK. This PR is a great improvement as it is.
The docstring is for |
I can open a new issue for handling docstrings of aliases on the command line then. Anything else? |
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.
LGTM, this is a nice improvement!
Since this is a general change that other projects could also benefit from, could you please upstream your changes to the autodoc project? (Then once we rebase to the new autodoc extension that also handles alias for functions, we could remove the changes here in our doc conf)
Thanks for the reviews @user202729 @kwankyu @tobiasdiez!
I'll put it on my TODO list but not sure when I'll find the time. I have some larger mathematics PRs in the works (some work on function fields, and separate work on public-key crypto) for the next couple months that are higher priority for me. Before upstreaming it might be good to collect the class aliasing code (which we already have in our sage_autodoc extension, which is supposed to be removed eventually per #30893) and the function/method aliasing code in one place and then upstream them together. We probably want to run it on our own repo for a while too to make sure there are no issues with this. The |
Perhaps it's not strictly necessary, but if there are less differences between the upstream autodoc and our custom version then a replacement of the latter becomes more feasible. |
sagemathgh-40753: Handle aliased functions and methods in generated documentation Closes sagemath#40649. I added AUTHORS in `src/sage/misc/sagedoc_conf.py` based on the previous copyright header. From the git history other people have touched this file, but it mostly looked like refactoring/moving code around. If I missed anyone who should be listed in the AUTHORS I'm happy to add them. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. URL: sagemath#40753 Reported by: Vincent Macri Reviewer(s): Kwankyu Lee, Tobias Diez, Vincent Macri
Closes #40649.
I added AUTHORS in
src/sage/misc/sagedoc_conf.py
based on the previous copyright header. From the git history other people have touched this file, but it mostly looked like refactoring/moving code around. If I missed anyone who should be listed in the AUTHORS I'm happy to add them.📝 Checklist