Skip to content

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

Closed
datapythonista opened this issue Mar 7, 2020 · 6 comments · Fixed by #32539
Closed

DOC: Remove absolute urls from the docs #32529

datapythonista opened this issue Mar 7, 2020 · 6 comments · Fixed by #32539
Assignees
Milestone

Comments

@datapythonista
Copy link
Member

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:

:ref:`caveats <computation.covariance.caveats>`

Which will point to the label defined here:

.. _computation.covariance.caveats:

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 pattern pandas.pydata.org doesn't exist in the repository (see other examples of patterns we don't want to find in ci/code_checks.sh that use the invgrep function). If there is a better patter than pandas.pydata.org feel free to use it.

@ArkadeepAdhikari
Copy link
Contributor

take

@ArkadeepAdhikari
Copy link
Contributor

Hi, this is my first issue, are there any checks/tests I should keep in mind? Thanks

@datapythonista
Copy link
Member Author

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!

@jorisvandenbossche
Copy link
Member

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.

@ArkadeepAdhikari
Copy link
Contributor

Thanks for the clarification, I'm changing the absolute urls in the rst docs to sphinx references, and keeping the others as it is.

@ArkadeepAdhikari
Copy link
Contributor

take

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.

4 participants