Skip to content
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

Replace sage autodoc extension by built-in one #30893

Open
tobiasdiez opened this issue Nov 11, 2020 · 14 comments
Open

Replace sage autodoc extension by built-in one #30893

tobiasdiez opened this issue Nov 11, 2020 · 14 comments

Comments

@tobiasdiez
Copy link
Contributor

Replaces sage's custom autodoc extension by the built-in one. The motivation is to add support for typing information in the documentation in #30894.

The following customizations need to be removed for this:

  • providing argspecs for decorators (sage_wraps): Replace sage_wraps by decorator library #30884
  • using argspecs instead of signature
  • dealing with cached function(methods) callers
  • dealing with nested classes
  • dealing with classcall metaclass
  • dealing with class aliases
  • skipping lazy imports to avoid deprecation warnings

Depends on #30884

CC: @jhpalmieri @kwankyu

Component: documentation

Work Issues: Make docbuild pass

Author: Tobias Diez

Branch/Commit: public/documentation/replaceautodoc @ ca98b7a

Issue created by migration from https://trac.sagemath.org/ticket/30893

@tobiasdiez
Copy link
Contributor Author

Author: Tobias Diez

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 11, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

f149da6Replace sage autodoc extension by built-in one

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 11, 2020

Changed commit from 2220595 to f149da6

@tobiasdiez

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:6

Building the docs fails immediately for me, because text roles like :arxiv:, :trac:, etc. are no longer defined.

I think it would be better, at least as a first step, to update sage_autodoc to incorporate the recent changes in Sphinx's autodoc.

@jhpalmieri
Copy link
Member

comment:7

My understanding is that one of the main reasons for using our own version of autodoc is to be able to include Cython files in the documentation, and this requires customization of the introspection code. So that is something you should test when experimenting with this: how is autodoc working on Cython files?

@tobiasdiez
Copy link
Contributor Author

comment:8

Thanks for the input @jhpalmieri.

Building the docs fails immediately for me, because text roles like :arxiv:, :trac:, etc. are no longer defined.

That should be fixed now.

I think it would be better, at least as a first step, to update sage_autodoc to incorporate the recent changes in Sphinx's autodoc.

I tried rebasing first, but there were quite a few changes which made it rather difficult. So I thought replacing it completely, and then implement the necessary changes elsewhere would be easier.

should test when experimenting with this: how is autodoc working on Cython files?

I will do so! I just figured out how to convince sage to produce the documentation for something else then the manifold package. After playing around a bit, I realized that there might be quite some changes necessary (e.g. instancedoc doesn't play nicely with Python's inspect). Will keep you updated.

@tobiasdiez
Copy link
Contributor Author

Work Issues: Make docbuild pass

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 11, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

ca98b7aFix extlinks

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 11, 2020

Changed commit from f149da6 to ca98b7a

@mkoeppe
Copy link
Member

mkoeppe commented Feb 13, 2021

comment:10

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@mkoeppe
Copy link
Member

mkoeppe commented Jul 19, 2021

comment:11

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 2, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@tobiasdiez

This comment has been minimized.

@kwankyu

This comment has been minimized.

@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
We rebase `sage_autodoc` to Sphinx 5.3.0.

This is a step toward eventual removal of sage_autodoc in sagemath#30893, a
customization of Sphinx autodoc extension for Sage objects.

Other related tickets are sagemath#27578. sagemath#30884, sagemath#31309, in this regard.

URL: https://trac.sagemath.org/34730
Reported by: klee
Ticket author(s): Kwankyu Lee
Reviewer(s): Tobias Diez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants