-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
validate PR09 errors #44524
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
validate PR09 errors #44524
Conversation
soumyasomasundaran
commented
Nov 19, 2021
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
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 @soumyas567 , looks good to me pending green
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.
Actually, looks like there's still a few of these validations which need fixing up:
Error: /home/runner/work/pandas/pandas/pandas/core/frame.py:7703:PR09:pandas.DataFrame.groupby:Parameter "dropna" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/core/generic.py:10955:PR09:pandas.DataFrame.rolling:Parameter "closed" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style.py:82:PR09:pandas.io.formats.style.Styler:Parameter "escape" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style_render.py:786:PR09:pandas.io.formats.style.Styler.format:Parameter "decimal" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style_render.py:786:PR09:pandas.io.formats.style.Styler.format:Parameter "thousands" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style_render.py:983:PR09:pandas.io.formats.style.Styler.format_index:Parameter "decimal" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style_render.py:983:PR09:pandas.io.formats.style.Styler.format_index:Parameter "thousands" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style.py:3136:PR09:pandas.io.formats.style.Styler.highlight_quantile:Parameter "color" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style.py:2760:PR09:pandas.io.formats.style.Styler.bar:Parameter "props" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/formats/style.py:466:PR09:pandas.io.formats.style.Styler.to_latex:Parameter "position" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/parquet.py:437:PR09:pandas.read_parquet:Parameter "path" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/io/sql.py:330:PR09:pandas.read_sql_query:Parameter "dtype" description should finish with "."
Error: None:None:PR09:pandas.Timestamp:Parameter "fold" description should finish with "."
Error: None:None:PR09:pandas.Timestamp.max:Parameter "fold" description should finish with "."
Error: None:None:PR09:pandas.Timestamp.min:Parameter "fold" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/core/series.py:1787:PR09:pandas.Series.groupby:Parameter "dropna" description should finish with "."
Error: /home/runner/work/pandas/pandas/pandas/core/generic.py:10955:PR09:pandas.Series.rolling:Parameter "closed" description should finish with "."
Do you want to add those full stops, so that the validation script passes?
Yes I will do that. |
I have added full stops. But Sorry not able to find 5 of them. Don't know where to look for the following. could not find a description for parameter 'closed' in the particular file. |
First three are in timestamps.pyx |
The others are probably in rolling.py in for class Window |
Yeah, groupby is here pandas/pandas/core/shared_docs.py Lines 126 to 129 in 945c9ed
Window: pandas/pandas/core/window/rolling.py Lines 895 to 909 in 59d031f
Admittedly these aren't the easiest to find |
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.
Looks good to me, thanks @soumyas567 !
cc @attack68 in case you have comments on the to_latex
change
pandas/io/formats/style.py
Outdated
@@ -504,7 +504,7 @@ def to_latex( | |||
position : str, optional | |||
The LaTeX positional argument (e.g. 'h!') for tables, placed in location: | |||
|
|||
\\begin{table}[<position>] | |||
\\begin{table}[<position>]. |
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 like this because this line is structured to reflect a console output and shouldn't include the period. The colons are the punctuation indicating a figure that follows (even if the figure is text)
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.
Perhaps it should be written as:
``\begin{table}[<position>]``.
(with 2 backticks before and after) then, to make clear that the full stop isn't part of the console output?
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. Sure I will do it.
One comment made, all others are fine with me. |
pls also merge master |
@soumyas567 in case it's not clear:
|
I am not sure if the merging was correct. Hopefully, I did not mess it up. @MarcoGorelli |
@soumyas567 Thanks for the PR. Can you fix up the merge conflict? We'll get it merged afterwards. |
Yup, the merging was correct! There have since been new changes upstream, so you'll need to pull these too:
and then resolve the merge conflicts (if it's not something you're familiar with, check out https://youtu.be/xNVM5UxlFSA) |
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 isn't quite right - if you click "files changed", you see
<<<<<<< HEAD
MSG='Validate docstrings (GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS01, SS02, SS04, SS05, PR03, PR04, PR05, PR09, PR10, EX04, RT01, RT04, RT05, SA02, SA03)' ; echo $MSG
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS02,SS04,SS05,PR03,PR04,PR05,PR09,PR10,EX04,RT01,RT04,RT05,SA02,SA03
=======
MSG='Validate docstrings (GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS01, SS02, SS03, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA02, SA03)' ; echo $MSG
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS02,SS03,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA02,SA03
>>>>>>> upstream/master
RET=$(($RET + $?)) ; echo $MSG "DONE"
I'd suggest removing the top part (between <<<<<<< HEAD
and =======
), adding PR09
to the lines below them, and then removing the >>>>>>> upstream/master
line
Shall I do this from GitHub itself? I think I did "'keep both changes" while resolving conflicts . My local repository seems up-to-date now. |
Up to you, if you want to do it from the GitHub UI or in your editor If you do it on GitHub, make sure to then do |
Is it OK 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.
looks good to me, let's just wait on @attack68 to confirm if the to_latex
output looks alright like this
lgtm |
Thanks @soumyas567 |
Thank you all. :) Thank you for the help @MarcoGorelli |