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

Intersphinx mapping not working in Returns #937

Closed
maxrjones opened this issue Feb 20, 2021 · 5 comments · Fixed by #954
Closed

Intersphinx mapping not working in Returns #937

maxrjones opened this issue Feb 20, 2021 · 5 comments · Fixed by #954
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@maxrjones
Copy link
Member

Description of the problem

The intersphinx mapping to pandas.DataFrame does not seem to be working in the Returns section of the docstrings. See blockmedian for an example.

Originally posted by @weiji14 in #930 (comment)

@maxrjones maxrjones added the bug Something isn't working label Feb 20, 2021
@maxrjones
Copy link
Member Author

Relevant issue: sphinx-doc/sphinx#8290

Seems the options here are to either set napoleon_use_rtype = True in doc/conf.py, manually define the links, or wait for a bug fix.

@seisman
Copy link
Member

seisman commented Feb 20, 2021

Tried napoleon_use_rtype = True, it gives:

image

@seisman
Copy link
Member

seisman commented Feb 20, 2021

napoleon_use_rtype = True gives inconsistent rendering for returns and parameters. I don't think this is what we want. I think we should manually define the links or just ignore them.

@maxrjones
Copy link
Member Author

maxrjones commented Feb 22, 2021

My preference would be to ignore the missing links in the rtypes (seems like an upstream bug to me) and manually define the links in the bullet lists (if present) below the rtypes (which would not be automatically linked regardless of the bug). These are the module docstrings which would need to be updated if we chose this solution:

  • blockmedian.py (L61)
  • grdcut.py (L85)
  • grdfilter.py (L119)
  • grdtrack.py (L66)
  • info.py (L66)

@seisman
Copy link
Member

seisman commented Feb 22, 2021

My preference would be to ignore the missing links in the rtypes (seems like an upstream bug to me) and manually define the links in the bullet lists (if present) below the rtypes (which would not be automatically linked regardless of the bug).

Sounds good.

@seisman seisman added this to the 0.3.1 milestone Feb 22, 2021
@seisman seisman added the documentation Improvements or additions to documentation label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants