Open natmokval opened 2 months ago
take
Working on --i "pandas.Timedelta.asm8 SA01" \
Hey @natmokval I tried running 'scripts/validate_docstrings.py pandas.Timedelta.ceil' command on my terminal. But I dont know why it doesnt execute.
I would like to work on:
-i "pandas.TimedeltaIndex.nanoseconds SA01" \ -i "pandas.TimedeltaIndex.seconds SA01" \ -i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
I'll work on these:
-i "pandas.Timedelta.components SA01" \
-i "pandas.Timedelta.floor SA01" \
-i "pandas.Timedelta.max PR02" \
-i "pandas.Timedelta.min PR02" \
Hey @ivonastojanovic , could you please tell me how to solve this issue, I really want to be a contributor here but for some reason scripts/validate_docstrings.py
Hey @ivonastojanovic , could you please tell me how to solve this issue, I really want to be a contributor here but for some reason scripts/validate_docstrings.py command doesnt work. (I have tried to put different functions in place, if anyone could help me... :)
Hey @doshi-kevin, when you run scripts/validate_docstrings.py pandas.Timedelta.ceil
, what do you get as output? You should get something like this:
$ scripts/validate_docstrings.py pandas.Timedelta.ceil
+ /home/codespace/.python/current/bin/ninja
[1/1] Generating write_version_file with a custom command
################################################################################
###################### Docstring (pandas.Timedelta.ceil) ######################
################################################################################
Return a new Timedelta ceiled to this resolution.
Parameters
----------
freq : str
Frequency string indicating the ceiling resolution.
It uses the same units as class constructor :class:`~pandas.Timedelta`.
Examples
--------
>>> td = pd.Timedelta('1001ms')
>>> td
Timedelta('0 days 00:00:01.001000')
>>> td.ceil('s')
Timedelta('0 days 00:00:02')
################################################################################
################################## Validation ##################################
################################################################################
2 Errors found for `pandas.Timedelta.ceil`:
ES01 No extended summary found
SA01 See Also section not found
At the bottom you see 2 errors, you shouldn't do anything about ES01
, but you should fix SA01
. pandas.Timedelta.ceil
method is missing 'See Also' section which you should add. Try to locate the method first and then add references to related methods, classes, attributes to 'See Also' section.
That's what the problem is, I forked the repo, kept it upstream and ran this command. The thing is nothing happens after that, the terminal just stops .... Maybe I need to fork the repo once again
I don't understand why this is happening, the code does not give me any output.
Working on
"pandas.Timedelta.round SA01"
"pandas.Timedelta.to_timedelta64 SA01"
"pandas.Timedelta.total_seconds SA01"
"pandas.Timedelta.view SA01"
sorry i forgot to mention on which methods i was working but i have created pull request for this method "pandas.Timedelta.round SA01" @fbourgey
Working on
-i "pandas.Timedelta.to_numpy PR01" \
-i "pandas.TimedeltaIndex.components SA01" \
-i "pandas.TimedeltaIndex.microseconds SA01" \
Working on
-i "pandas.Timedelta.ceil SA01" \
I installed a whole operating system for this :).
Working on
-i "pandas.Timedelta.ceil SA01" \
I installed a whole operating system for this :).
I guess @uditbaliyan already completed this.
@ammar-qazi If you have time, could you take pandas.Timedelta.resolution
? I initially wanted to take it but I can't find its docstring.
Thank you, @amanlai. I'll take pandas.Timedelta.resolution
then.
@ivonastojanovic I might have resolved the following in my commit for pandas.Timedelta.resolution
.
-i "pandas.Timedelta.max PR02" \
-i "pandas.Timedelta.min PR02" \
That said, I'm not sure because there's no definitive docstring, as @amanlai already mentioned.
Min, max, and resolution are probably attributes being defined by cdef class _Timedelta(timedelta)
and MinMaxReso
. As a result, I don't know how to exactly handle it.
Alternatively, we can get the docs to show up after compilation by adding the docstring to timedeltas.pyi instead of timedeltas.pyx. However, I don't think that's the recommended way.
working on #59914
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
Working on -i "pandas.Timedelta.components SA01" \
@doshi-kevin I was having the same problem, but writing "python" before scripts/validate_docstrings.py
@ammar-qazi Are you still working on the following or can I take them -
-i "pandas.Timedelta.resolution PR02" \
-i "pandas.Timedelta.max PR02" \
-i "pandas.Timedelta.min PR02" \
It appears that your PR was waiting for review, then closed because you didn't update it with the suggested fixes.
@Ravenin7 It didn't receive a review for quite a while, so I forgot about it. I just tried once again.
@Ravenin7 On second thoughts, you can take it. I'm not 100% sure what's the right way to document attributes created by MinMaxReso, so I'd love to see how you approach it.
@ammar-qazi I couldn't push the requested changes to your PR due to lack of permissions, so I have created a new PR #60283 to address them.
@Ravenin7 Thank you. That said, it still leads to an error docstring validation — I don't know the solution to that. That's why I left it.
follow up on issues https://github.com/pandas-dev/pandas/issues/56804, https://github.com/pandas-dev/pandas/issues/59458 and https://github.com/pandas-dev/pandas/issues/58063 pandas has a script for validating docstrings:
https://github.com/pandas-dev/pandas/blob/2244402942dbd30bdf367ceae49937c179e42bcb/ci/code_checks.sh#L112-L128
Currently, some methods fail docstring validation check. The task here is:
scripts/validate_docstrings.py <method-name>
pytest pandas/tests/scalar/test_nat.py::test_nat_doc_strings
code_checks.sh
scriptExample:
pandas.Timedelta.ceil fails with the SA01 and ES01 errors
Please don't comment
take
as multiple people can work on this issue. You also don't need to ask for permission to work on this, just comment on which methods are you going to work.If you're new contributor, please check the contributing guide