-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Remove absolute urls from the docs #32529
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
Comments
take |
Hi, this is my first issue, are there any checks/tests I should keep in mind? Thanks |
Have a look at the contributing guide if you don't know how to contribute to pandas: https://pandas.pydata.org/docs/development/contributing.html The rest should be explained in the description. You should know how to use grep to work on this. Assign the issue to yourself again when you're ready to start working on it. Thanks! |
For docstrings, those absolute urls are on purpose, as sphinx references are not useful when looking at those docstrings in plain text (eg as help in ipython console / jupyter notebook). So for those, I would keep the absolute urls. If there are absolute urls in the prose rst docs, for sure those can be changed to sphinx references. |
Thanks for the clarification, I'm changing the absolute urls in the rst docs to sphinx references, and keeping the others as it is. |
take |
Looks like we've got some absolute urls (including the domain) in the docs, like https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases (see here: https://github.com/pandas-dev/pandas/blob/master/pandas/core/indexes/datetimes.py#L178 ).
Sphinx (the tool we use to build the docs) provides a way to create those automatically, with the
:ref:
directive.See for example how to automatically generate a link here:
Which will point to the label defined here:
To avoid having new cases in the future after fixing the existing ones, we should add a check in
ci/code_checks.sh
to validate that the patternpandas.pydata.org
doesn't exist in the repository (see other examples of patterns we don't want to find inci/code_checks.sh
that use theinvgrep
function). If there is a better patter thanpandas.pydata.org
feel free to use it.The text was updated successfully, but these errors were encountered: