-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Resolution docstring #21122
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
Resolution docstring #21122
Conversation
…solution-docstring
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 for the update! Certainly an improvement - just a minor comment from me but otherwise lgtm
I am new to contributing to
Are your requested changes to that I should tweak the PR to use the three commits marked above with the red IF yes... I would request some guidance on the matter of the Return values... When I look at the documentation guide produced for the recent Pandas Documentation Sprints, this guidance is present on how to handle single and multiple return values:
Lastly...
|
Not sure what happened to my comment so probably an error on my end, but I was just asking why you had the table and the information directly below it as bullet points. It's the same information (?) so if it's duplicated I would just stick with the table and delete the bullets Took a quick glance at the CI failures and they are LINT related to your change, so you will want to read through them and fix. The steps to reproduce are below: https://pandas.pydata.org/pandas-docs/stable/contributing.html#python-pep8 That said, if you have run that locally you probably aren't seeing any errors because the diff in that command is only run against ".py" files and not ".pyx" which you've modified (most users only modify the former). If feeling ambitious that could be another change to update the docs to make sure that that rule covers both Hope that helps but if you get stuck let me know |
Thanks. This helps. |
Codecov Report
@@ Coverage Diff @@
## master #21122 +/- ##
=======================================
Coverage 91.95% 91.95%
=======================================
Files 160 160
Lines 49858 49858
=======================================
Hits 45845 45845
Misses 4013 4013
Continue to review full report at Codecov.
|
Fixed the linting problems. Hope this works!
|
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.
Hmm well I am nitpicking but can we get rid of the double backquotes on the return values? Those are typically reserved for literals / code blocks which these technically are not
Removed the backticks. Let me know if we need any additional changes.
|
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.
pandas/_libs/tslibs/timedeltas.pyx
Outdated
most granular level of precision. Each level of resolution is | ||
represented by a short string as defined below: | ||
|
||
============ ============ |
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 don't think this will render in a doc-string, not really sure what the standard is for a table like list
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.
Do you have a suggestion?
Do bulleted lists work?
- Days: 'D'
- Hours: 'H'
- Minutes: 'T'
- Seconds: 'S'
- Milliseconds: 'L'
- Microseconds: 'U'
- Nanoseconds: 'N'
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.
yep that's prob ok
pandas/_libs/tslibs/timedeltas.pyx
Outdated
Returns | ||
------- | ||
str | ||
Time resolution. |
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.
Time -> Timedelta
pandas/_libs/tslibs/timedeltas.pyx
Outdated
|
||
Examples | ||
-------- | ||
**Using string input** |
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.
you don't need the 'Using string input' or numeric input section
pandas/_libs/tslibs/timedeltas.pyx
Outdated
@@ -770,7 +770,53 @@ cdef class _Timedelta(timedelta): | |||
|
|||
@property | |||
def resolution(self): | |||
""" return a string representing the lowest resolution that we have """ | |||
""" | |||
Return a string representing the lowest (i.e. smallest) time |
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.
this should be a single line
can you update for comments |
I will update the PR. |
can you update |
@jreback not deliberately ignoring this. will get this done, so this open item can be cleared off the books. |
Attempted to resolve the comments above.
|
I tried to look in the Travis CI logs and I am not sure what exactly caused the Travis build to fail. Can someone advise? |
@chalmerlowe There is a linting error:
After that fix, LGTM |
@mroeschke can you push that fix? |
thanks @chalmerlowe and @mroeschke for the fixup! |
git diff upstream/master -u -- "*.py" | flake8 --diff