Xarray: DOC: Broken links from generated documentation to github

Created on 19 Mar 2019  路  6Comments  路  Source: pydata/xarray

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) )

documentation help wanted

Most helpful comment

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.

All 6 comments

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).

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?

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?

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.

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)

Was this page helpful?
0 / 5 - 0 ratings