-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: fix punctuation in Timestamp/Timedelta docstrings #28053
DOC: fix punctuation in Timestamp/Timedelta docstrings #28053
Conversation
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.
lgtm, thanks for working on this @sparalic.
Can you update your branch with upstream (i.e. git fetch up && git merge upstream/master %% git push
) to rerun the CI, and see if it finishes green this time. Thanks!
@@ -1150,7 +1150,7 @@ cdef class _Timedelta(timedelta): | |||
""" | |||
Format Timedelta as ISO 8601 Duration like | |||
``P[n]Y[n]M[n]DT[n]H[n]M[n]S``, where the ``[n]`` s are replaced by the | |||
values. See https://en.wikipedia.org/wiki/ISO_8601#Durations | |||
values. See https://en.wikipedia.org/wiki/ISO_8601#Durations. |
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.
@datapythonista I'm never sure what to do with URLs at the end of a sentence. Has this been discussed?
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.
@jbrockmendel I wasn't sure either, but this seem to have trigger the error for the Timedelta.isoformat
docstring.
@datapythonista updated my branch and the CI still failed.
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.
@sparalic can you build the html page of that docstring? IIRC you can build that page only with ./doc/make.py --single=pandas.Timedelta.isoformat
(building all the docs takes some time). This way we can see if the dot is added to the url link and breaks it, or if Sphinx is smart enough and does what we want.
Looks like there are tests that check those docstrings, you'll have to update them to pass the CI. Let me know if you need help finding the errors in the CI logs...
Thanks!
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.
@datapythonista I was able to sucessfylly build the html page for Timedelta.isoformat
without any warnings. So it seems like Sphinx was smart enough to ignore the period on the end.
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 open it with a browser, and paste here a screenshot? I don't think Sphinx will warn, it could just create a link with the period in it, that is broken.
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.
The link is created correctly.
Looks like this is failing |
@WillAyd I am not sure what's happening now. I fixed the errors associated is mismatching of overlapping methods per the CI logs . However, it still seems to be failing. |
@sparalic the tests are failing because we have apparently tests that check that the docstring of |
@sparalic see my last comment about how to get this PR passing CI, if you have some time to update it, that would be welcome! |
@jorisvandenbossche I am sorry for the delay. I found the culprits and updated them all. I think it should be all set now. |
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.
Thanks a lot for the update! Now all passing CI
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Add periods to Timestamp and Timedelta doctrings for the following attributes and methods:
I did not find the method for
pandas.Timestamp.isoweekday
this in the Timestamp source code. Was this deprecated ? @datapythonista