Skip to content

DOC: Remove absolute urls from the docs #32539

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 24 commits into from
Mar 12, 2020

Conversation

ArkadeepAdhikari
Copy link
Contributor

@ArkadeepAdhikari ArkadeepAdhikari commented Mar 8, 2020

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see this link:
:ref:`Timeseries <timeseries.offset_aliases>`
Copy link
Member

Choose a reason for hiding this comment

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

This one should be kept as is (or with updated url if needed), as the docstrings are otherwise not useful as plain text

Copy link
Member

Choose a reason for hiding this comment

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

(and the same for the other changes below in .py files)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, Reverting these changes

@ArkadeepAdhikari ArkadeepAdhikari force-pushed the remove_abs_url branch 2 times, most recently from 28066af to addffc1 Compare March 8, 2020 23:15
@ArkadeepAdhikari
Copy link
Contributor Author

Hi @jorisvandenbossche , I have updated my PR, it would be great if you can review once again. Thanks.

@ArkadeepAdhikari ArkadeepAdhikari marked this pull request as ready for review March 9, 2020 06:27
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Some more cases where we need to keep the absolute url .. (in practice, it seems that mostly there were good reasons we were doing that)

@@ -75,7 +75,7 @@ Filtering in SQL is done via a WHERE clause.
LIMIT 5;

DataFrames can be filtered in multiple ways; the most intuitive of which is using
`boolean indexing <https://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing>`_.
:ref:`Boolean indexing <indexing.boolean>`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
:ref:`Boolean indexing <indexing.boolean>`
:ref:`boolean indexing <indexing.boolean>`

@@ -237,7 +237,7 @@ new column. In 0.21.0 and later, this will raise a ``UserWarning``:

In [1]: df = pd.DataFrame({'one': [1., 2., 3.]})
In [2]: df.two = [4, 5, 6]
UserWarning: Pandas doesn't allow Series to be assigned into nonexistent columns - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute_access
Copy link
Member

Choose a reason for hiding this comment

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

Can you revert this one as well? (it's in the output of code, which should still return the absolute url)

@@ -676,7 +676,7 @@ Current behavior
KeyError in the future, you can use .reindex() as an alternative.

See the documentation here:
https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
:ref:`Deprecation doc <indexing.deprecate_loc_reindex_listlike>`
Copy link
Member

Choose a reason for hiding this comment

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

You can make the "here" the text of the reference (and remove the colon), I think.

@@ -470,7 +470,7 @@ Current behavior
KeyError in the future, you can use .reindex() as an alternative.

See the documentation here:
https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member

Choose a reason for hiding this comment

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

This is also code output that should be left alone

@@ -31,7 +31,7 @@ Check the :ref:`API Changes <whatsnew_0230.api_breaking>` and :ref:`deprecations
.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See `Dropping Python 2.7 <https://pandas.pydata.org/pandas-docs/version/0.24/install.html#install-dropping-27>`_ for more.
See :ref:`Dropping Python 2.7 <install>` for more.
Copy link
Member

Choose a reason for hiding this comment

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

You will need to keep the absolute reference here as well, since this needs to refer to the versioned docs (that page doesn't exist anymore on the stable docs)

@@ -12,7 +12,7 @@ and bug fixes. We recommend that all users upgrade to this version.
.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See `Dropping Python 2.7 <https://pandas.pydata.org/pandas-docs/version/0.24/install.html#install-dropping-27>`_ for more.
See :ref:`Dropping Python 2.7 <install>` for more.
Copy link
Member

Choose a reason for hiding this comment

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

same here

@@ -17,7 +17,7 @@ and bug fixes. We recommend that all users upgrade to this version.
.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See `Dropping Python 2.7 <https://pandas.pydata.org/pandas-docs/version/0.24/install.html#install-dropping-27>`_ for more.
See :ref:`Dropping Python 2.7 <install>` for more.
Copy link
Member

Choose a reason for hiding this comment

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

same here

@@ -12,7 +12,7 @@ and bug fixes. We recommend that all users upgrade to this version.
.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See `Dropping Python 2.7 <https://pandas.pydata.org/pandas-docs/version/0.24/install.html#install-dropping-27>`_ for more.
See :ref:`Dropping Python 2.7 <install>` for more.
Copy link
Member

Choose a reason for hiding this comment

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

same here (and others below)

@ArkadeepAdhikari
Copy link
Contributor Author

Hi @jorisvandenbossche , I have made the changes, it would be great if you can look into once again. Thanks.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

One last remaining comment!

@@ -470,7 +470,7 @@ Current behavior
KeyError in the future, you can use .reindex() as an alternative.

See the documentation here:
https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
Copy link
Member

Choose a reason for hiding this comment

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

This is also code output that should be left alone

@datapythonista
Copy link
Member

Sorry for the poor issue description from my side @ArkadeepAdhikari. Looks good, there is just one case that needs to be reverted.

Also, if you can add to ci/code_checks.sh a check to make sure the pattern pandas.pydata.org doesn't exist in doc/source anymore that would be very useful.

@ArkadeepAdhikari
Copy link
Contributor Author

Hi @datapythonista, should I be adding the check to not keep pandas.pydata.org in doc/source? Some of the files like the one I would be reverting are in the same path (for example: doc/source/whatsnew/v0.21.0.rst)

@datapythonista
Copy link
Member

Good point. Let's leave it for later, as we'll need to think whether it's worth validating it and how.

@jorisvandenbossche
Copy link
Member

Also, if you can add to ci/code_checks.sh a check to make sure the pattern pandas.pydata.org doesn't exist in doc/source anymore that would be very useful.

Since there are actually cases where we have this url in doc/source (several ones we reverted here in the PR), and given that there were not that much occurences to fix, I personally don't think it is worth the effort to make a code check for this

@ArkadeepAdhikari
Copy link
Contributor Author

Hi @datapythonista, @jorisvandenbossche, thanks for the clarifications. I have reverted the final case. Please take a look again. Thanks.

@@ -675,8 +675,7 @@ Current behavior
Passing list-likes to .loc with any non-matching elements will raise
KeyError in the future, you can use .reindex() as an alternative.

See the documentation here:
https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
See the documentation :ref:`here <indexing.deprecate_loc_reindex_listlike>`
Copy link
Member

Choose a reason for hiding this comment

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

I think this is also an output from pandas, not an actual link that we want to change, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this looks like a similar case, @jorisvandenbossche can you confirm?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

@jreback jreback added this to the 1.1 milestone Mar 11, 2020
@ArkadeepAdhikari
Copy link
Contributor Author

Hi @datapythonista, I have updated my PR, please feel free to review once again.

@jorisvandenbossche jorisvandenbossche merged commit ec77341 into pandas-dev:master Mar 12, 2020
@jorisvandenbossche
Copy link
Member

Thanks @ArkadeepAdhikari !

@ArkadeepAdhikari
Copy link
Contributor Author

Thanks for reviewing @jorisvandenbossche, @datapythonista!

SeeminSyed pushed a commit to CSCD01-team01/pandas that referenced this pull request Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Remove absolute urls from the docs
4 participants