-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
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.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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>`_ |
There was a problem hiding this comment.
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`.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
I prefer the :ref: syntax, as it will be updated if the section title
changes. Though it does have the the downside mentioned
by @topper-123 when viewing the raw docstring.
…On Thu, May 23, 2019 at 3:04 PM lrjball ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pandas/core/arrays/categorical.py
<#26497 (comment)>:
> @@ -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>`_
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?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26497?email_source=notifications&email_token=AAKAOITDXZKISWMDURTSWKLPW32GJA5CNFSM4HOX6KM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZR5DPI#discussion_r287112750>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIQHIDHP6KBW7MLDKOLPW32GJANCNFSM4HOX6KMQ>
.
|
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. |
There was a problem hiding this 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.
Sure.
…On Thu, May 30, 2019 at 10:25 AM William Ayd ***@***.***> wrote:
***@***.**** approved this pull request.
I'm OK with this as is and follow up PR to convert to ref.
@TomAugspurger <https://github.com/TomAugspurger>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26497?email_source=notifications&email_token=AAKAOIQHJA44L3CRYNW7LI3PX7WVJA5CNFSM4HOX6KM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2EQFFY#pullrequestreview-243860119>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIX2IJZHN7UJWA7BECLPX7WVJANCNFSM4HOX6KMQ>
.
|
Thanks @lrjball ! |
Cheers |
I don't think anyone is working on that.
…On Mon, Jun 3, 2019 at 1:27 PM lrjball ***@***.***> wrote:
Cheers
@TomAugspurger <https://github.com/TomAugspurger> I'm happy to pick up a
PR to change all links to refs unless you have already picked it up.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26497?email_source=notifications&email_token=AAKAOISIJNCALG2RRTW52J3PYVPAZA5CNFSM4HOX6KM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW2I3DA#issuecomment-498371980>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOISBYVTANL5C2HPGN43PYVPAZANCNFSM4HOX6KMQ>
.
|
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.