Skip to content

DOC: Fixed redirects in various parts of the documentation #26497

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

Merged
merged 4 commits into from
May 31, 2019
Merged

DOC: Fixed redirects in various parts of the documentation #26497

merged 4 commits into from
May 31, 2019

Conversation

lrjball
Copy link
Contributor

@lrjball lrjball commented May 22, 2019

Links in the docs to part way down a page were being sent to the top of the page due to a generic redirect from pandas.pydata.org/pandas-doc/stable/... -> pandas.pydata.org/pandas-doc/stable/user_guide/... . These links have been change to go straight to the .../user_guide/... version of the page to ensure the link goes to the correct part of the docs.

For example, the link within the chunksize parameter of pandas.read_json() currently goes to the top of the IO Tools page, when the relevant section is the 'Line delimited json' heading about half way down.

lrjball added 2 commits May 22, 2019 21:45
Links in the docs to part way down a page were being sent to the top of the page due to a generic redirect from pandas.pydata.org/pandas-doc/stable > pandas.pydata.org/pandas-doc/stable/user_guide. These links have been change to go straight to the .../user_guide/... version of the page to ensure the link goes to the correct part of the docs.
@pep8speaks
Copy link

pep8speaks commented May 22, 2019

Hello @lrjball! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-05-22 22:19:24 UTC

@codecov
Copy link

codecov bot commented May 22, 2019

Codecov Report

Merging #26497 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26497      +/-   ##
==========================================
- Coverage   91.75%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50761    50761              
==========================================
- Hits        46575    46570       -5     
- Misses       4186     4191       +5
Flag Coverage Δ
#multiple 90.25% <ø> (ø) ⬆️
#single 41.69% <ø> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/multi.py 95.62% <ø> (ø) ⬆️
pandas/core/indexing.py 90.53% <ø> (ø) ⬆️
pandas/core/groupby/grouper.py 98.53% <ø> (ø) ⬆️
pandas/core/reshape/concat.py 97.2% <ø> (ø) ⬆️
pandas/core/generic.py 93.49% <ø> (ø) ⬆️
pandas/core/indexes/timedeltas.py 90.96% <ø> (ø) ⬆️
pandas/core/window.py 96.41% <ø> (ø) ⬆️
pandas/core/dtypes/concat.py 96.56% <ø> (ø) ⬆️
pandas/core/indexes/period.py 92.58% <ø> (ø) ⬆️
pandas/core/arrays/interval.py 93.06% <ø> (ø) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d2398a...79aba22. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented May 22, 2019

Codecov Report

Merging #26497 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26497      +/-   ##
==========================================
- Coverage   91.75%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50761    50761              
==========================================
- Hits        46575    46570       -5     
- Misses       4186     4191       +5
Flag Coverage Δ
#multiple 90.25% <ø> (ø) ⬆️
#single 41.69% <ø> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/multi.py 95.62% <ø> (ø) ⬆️
pandas/core/indexing.py 90.53% <ø> (ø) ⬆️
pandas/core/groupby/grouper.py 98.53% <ø> (ø) ⬆️
pandas/core/reshape/concat.py 97.2% <ø> (ø) ⬆️
pandas/core/generic.py 93.49% <ø> (ø) ⬆️
pandas/core/indexes/timedeltas.py 90.96% <ø> (ø) ⬆️
pandas/core/window.py 96.41% <ø> (ø) ⬆️
pandas/core/dtypes/concat.py 96.56% <ø> (ø) ⬆️
pandas/core/indexes/period.py 92.58% <ø> (ø) ⬆️
pandas/core/arrays/interval.py 93.06% <ø> (ø) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d2398a...79aba22. Read the comment docs.

@gfyoung gfyoung added the Docs label May 23, 2019
Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the absolute URLs in the docstrings to refs?

The ones in error / warning messages will need to continue to be URLs.

@@ -272,7 +272,8 @@ class Categorical(ExtensionArray, PandasObject):
Notes
-----
See the `user guide
<http://pandas.pydata.org/pandas-docs/stable/categorical.html>`_ for more.
<http://pandas.pydata.org/pandas-docs/stable/user_guide/categorical.html>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use refs for these instead instead? I think this would be, e.g. :ref:`categorical`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the explicit urls in the doc strings: If in doubt after reading a doc string, I can just copy/paste the url into a browser....couldn't do that with a ref.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like both are used in various parts of the documentation, although :ref: does seem a bit more common now that I look. Is there an agreed best practice?

@TomAugspurger
Copy link
Contributor

TomAugspurger commented May 24, 2019 via email

@lrjball
Copy link
Contributor Author

lrjball commented May 26, 2019

This pull request is to fix the links which were going to the wrong place. It seems like whether :ref: or urls are used is a separate issue, as urls are used all over the documentation, not just in the places I have fixed here. Maybe replacing urls with :ref: could be raised as it's own issue.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with this as is and follow up PR to convert to ref.

@TomAugspurger

@WillAyd WillAyd added this to the 0.25.0 milestone May 30, 2019
@TomAugspurger
Copy link
Contributor

TomAugspurger commented May 31, 2019 via email

@WillAyd WillAyd merged commit 7f31865 into pandas-dev:master May 31, 2019
@WillAyd
Copy link
Member

WillAyd commented May 31, 2019

Thanks @lrjball !

@lrjball
Copy link
Contributor Author

lrjball commented Jun 3, 2019

Cheers
@TomAugspurger I'm happy to pick up a PR to change all links to refs unless you have already picked it up.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 3, 2019 via email

vaibhavhrt pushed a commit to vaibhavhrt/pandas that referenced this pull request Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants