pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.56k stars 1.07k forks source link

Documentation 404 not found for "Suggest Edit" link in "API Reference" pages #8763

Open etienneschalk opened 6 months ago

etienneschalk commented 6 months ago

What happened?

Concrete example: let's say I am currently reading the documentation of DataArray.resample. I would like to have a look at the internals and see the code directly on GitHub.

Screenshot from 2024-02-18 13-32-03

We can see a GitHub icon, with 3 links:

The [source] link does what is expected: it leads to the source code https://github.com/pydata/xarray/blob/main/xarray/core/dataset.py#L10471-L10565

What did you expect to happen?

The second link "Suggest edit" should actually lead to the source code, as the documentation is auto-generated from the docstrings themselves. Maybe it could be renamed like "View source"

Example of other repos having this feature:

Minimal Complete Verifiable Example

N/A

MVCE confirmation

Relevant log output

N/A

Anything else we need to know?

No response

Environment

N/A

kmuehlbauer commented 3 months ago

Thanks @etienneschalk for reporting and sorry for the delay.

Although the "suggest edit" button should be disabled,

https://github.com/pydata/xarray/blob/b83aef65e711e490403a1e37c4e818d7b6c098bc/doc/conf.py#L388-L392

this obviously doesn't work anymore. I'm no Sphinx expert at all, leaving the debugging to someone else more knowledgeable.