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

DOC: Broken links from generated documentation to github #2821

Closed
hannasv opened this issue Mar 19, 2019 · 6 comments · Fixed by #4460
Closed

DOC: Broken links from generated documentation to github #2821

hannasv opened this issue Mar 19, 2019 · 6 comments · Fixed by #4460

Comments

@hannasv
Copy link

hannasv commented Mar 19, 2019

This is the link that is used when i click on the "Edit on Github" button in the documentation.
https://github.com/pydata/xarray/blob/stable/doc/generated/xarray.DataArray.std.rst

I wish to access the implementation of Dataset.std() because I am not able to reproduce the results when I calculate the sample standard deviation. Based on the formula below.

STD = sqrt( sum( x - x.mean() )**2 / (n-1) )

@shoyer
Copy link
Member

shoyer commented Mar 20, 2019

Thanks for the report on the broken links. Unfortunately I'm sure yet how to fix these -- I doubt our docstring links have ever worked on readthedocs.

As for you other issue, xarray uses the default ddof parameter from numpy:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html

You should be set it by passing ddof as a keyword argument, e.g., ds.std(ddof=1).

@zdgriffith
Copy link
Contributor

I just went through a bunch of the doc pages and the "Edit on Github" link now works on all of them...I think this issue could be closed?

@dcherian
Copy link
Contributor

yeah it works for pages like whats-new.rst but not for pages in the /generated/ folder which is reasonable I guess.

This issue seems to be about linking to source code from the API reference (I think) which would be a really nice addition. Maybe take a look at adding https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html?

@dcherian
Copy link
Contributor

@max-sixty
Copy link
Collaborator

Pinning this, would be great if anyone wants to have a go. It's a shame to have the link for doc contributions -- maybe our most important place for contributions, particularly from new contributors -- be broken.

@max-sixty max-sixty pinned this issue Mar 4, 2020
@keewis
Copy link
Collaborator

keewis commented May 18, 2020

linkcode could work, but we could also help sphinx_rtd_theme (which is what adds the Edit on Github link) to find the correct url. See e.g. scanpydoc's template based implementation (source code)

@max-sixty max-sixty changed the title DOC: Broken links from documentation to github DOC: Broken links from generated documentation to github Jul 25, 2020
This was referenced Sep 20, 2020
@mathause mathause unpinned this issue Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants