Skip to content

Conversation

@mwoss
Copy link
Contributor

@mwoss mwoss commented Feb 5, 2019

@pep8speaks
Copy link

pep8speaks commented Feb 5, 2019

Hello @mwoss! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on February 11, 2019 at 01:06 Hours UTC
@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #25157 into master will decrease coverage by 49.5%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #25157 +/- ## =========================================== - Coverage 92.37% 42.86% -49.51%  =========================================== Files 166 166 Lines 52408 52408 =========================================== - Hits 48412 22467 -25945  - Misses 3996 29941 +25945
Flag Coverage Δ
#multiple ?
#single 42.86% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/formats/style.py 17.49% <ø> (-79.2%) ⬇️
pandas/core/algorithms.py 50.47% <ø> (-44.31%) ⬇️
pandas/io/parquet.py 20.19% <ø> (-64.43%) ⬇️
pandas/core/panel.py 42.02% <ø> (-55.89%) ⬇️
pandas/core/groupby/groupby.py 24.5% <ø> (-72.3%) ⬇️
pandas/core/resample.py 23.27% <ø> (-73.97%) ⬇️
pandas/core/groupby/grouper.py 18.31% <ø> (-79.86%) ⬇️
pandas/core/generic.py 39.89% <ø> (-56.74%) ⬇️
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/core/categorical.py 0% <0%> (-100%) ⬇️
... and 131 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3b0950...ae369ec. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #25157 into master will decrease coverage by 0.22%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #25157 +/- ## ========================================== - Coverage 92.15% 91.93% -0.23%  ========================================== Files 166 166 Lines 52294 52187 -107 ========================================== - Hits 48194 47978 -216  - Misses 4100 4209 +109
Flag Coverage Δ
#multiple 90.48% <ø> (-0.15%) ⬇️
#single 42.14% <ø> (-0.13%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/style.py 96.69% <ø> (ø) ⬆️
pandas/core/algorithms.py 94.77% <ø> (ø) ⬆️
pandas/io/parquet.py 84.61% <ø> (ø) ⬆️
pandas/core/panel.py 80.26% <ø> (-13.61%) ⬇️
pandas/core/groupby/groupby.py 96.8% <ø> (ø) ⬆️
pandas/core/resample.py 97.22% <ø> (ø) ⬆️
pandas/core/groupby/grouper.py 98.16% <ø> (ø) ⬆️
pandas/core/generic.py 94.68% <ø> (-1.71%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d1b14c...bffd111. Read the comment docs.

@jreback jreback added the Docs label Feb 6, 2019
Returns
-------
----------
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't nacessary change, but I thought matching separator in every section will looks good.

Copy link
Member

Choose a reason for hiding this comment

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

Please revert this - the length needs to match the title name for proper sphinx rendering

behavior is to try 'pyarrow', falling back to 'fastparquet' if
'pyarrow' is unavailable.
kwargs are passed to the engine
kwargs: Any additional kwargs are passed to the engine
Copy link
Member

Choose a reason for hiding this comment

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

Need a space after kwargs here I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

application.initialize(["--quiet"])

with tempfile.NamedTemporaryFile(mode='w') as file:
with tempfile.NamedTemporaryFile(mode='w', encoding="utf-8") as file:
Copy link
Member

Choose a reason for hiding this comment

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

Why are you changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without strict encoding I had a problem with creating validation_errors json.

Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be required here so please remove. If you are having some sort of issue without this please open as a separate issue

-------
A specification for a groupby instruction
Note
Copy link
Member

Choose a reason for hiding this comment

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

What does this have to do with the PR04 error? Changes should really be limited to one thing at a time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line

additional kwargs to control time-like groupers (when freq is passed)

was treated as parameter, so I had to move it somewhere else.

Copy link
Member

Choose a reason for hiding this comment

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

Kwargs is a parameter so it belongs there

Copy link
Member

Choose a reason for hiding this comment

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

Get rid of this section and just document kwargs as a parameter like everywhere else

-------
----------
y : same as input
asdadasd
Copy link
Member

Choose a reason for hiding this comment

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

Hmm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, deleted.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Please also post the output of the validation script for any docstrings changed here; I think some of the changes here are actually creating new issues so please be careful

Returns
-------
----------
Copy link
Member

Choose a reason for hiding this comment

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

Please revert this - the length needs to match the title name for proper sphinx rendering

If grouper is PeriodIndex
base, loffset
base : int, default 0
loffset : string / DateOffset / timedelta object
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
loffset : string / DateOffset / timedelta object
loffset : string, DateOffset, or timedelta
-------
A specification for a groupby instruction
Note
Copy link
Member

Choose a reason for hiding this comment

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

Kwargs is a parameter so it belongs there

copy : boolean, default False
Make a copy of the underlying data. Mixed-dtype data will
always result in a copy
kwargs : Additional keyword arguments will be passed to the function
Copy link
Member

Choose a reason for hiding this comment

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

There is a standard for args and kwargs so here you just want **kwargs on this line (no type require) and move the description down one line

'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'N'}
days, seconds, microseconds,
milliseconds, minutes, hours, weeks : numeric, optional
days,seconds,microseconds,milliseconds,minutes,hours,weeks : numeric, optional:
Copy link
Member

Choose a reason for hiding this comment

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

Does this pass LINTing? May or may not be an issue just not aware of combining parameters like this into one line anywhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked, there is one (only line to long atm), but I have no idea how to properly refactor that doc so PR04 error won't appear again

Copy link
Member

Choose a reason for hiding this comment

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

Hmm OK. Technically the signature for this class only accepts **kwargs, so I would use that as the type and then move everything about days, seconds, etc... down into the descption

axis : {'items', 'minor', 'major'}, or {0, 1, 2}, or a tuple with two
axes
Additional keyword arguments will be passed as keywords to the function
kwargs : Additional keyword arguments will be passed to the function
Copy link
Member

Choose a reason for hiding this comment

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

See above comment on kwargs

optional_mapper='', optional_axis='', optional_labels='')
_shared_doc_kwargs['args_transpose'] = (
"three positional arguments: each one of\n{ax_single}".format(
"{ax_single}\n\tthree positional arguments from given options".format(
Copy link
Member

Choose a reason for hiding this comment

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

How does this actually render? This doesn't appear to have a type so does this actually fix PR04?

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, it does fix PR04 error.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm OK - somewhat surprised by that since I don't know what the type is. Keep in mind that Panel is deprecated so any changes to this module will probably be stripped out in next release anyway. So don't put too much more effort into these if you don't have to

application.initialize(["--quiet"])

with tempfile.NamedTemporaryFile(mode='w') as file:
with tempfile.NamedTemporaryFile(mode='w', encoding="utf-8") as file:
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be required here so please remove. If you are having some sort of issue without this please open as a separate issue

behavior is to try 'pyarrow', falling back to 'fastparquet' if
'pyarrow' is unavailable.
kwargs are passed to the engine
kwargs : Any additional kwargs are passed to the engine
Copy link
Member

Choose a reason for hiding this comment

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

Same on kwargs

`**kwargs` : Any additional keyword arguments are passed through
to ``self.template.render``. This is useful when you need to provide
additional variables for a custom template.
kwargs : Any additional keyword arguments
Copy link
Member

Choose a reason for hiding this comment

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

Same on kwargs

'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'N'}
days, seconds, microseconds,
milliseconds, minutes, hours, weeks : numeric, optional
days,seconds,microseconds,milliseconds,minutes,hours,weeks : numeric, optional:
Copy link
Member

Choose a reason for hiding this comment

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

Hmm OK. Technically the signature for this class only accepts **kwargs, so I would use that as the type and then move everything about days, seconds, etc... down into the descption

optional_mapper='', optional_axis='', optional_labels='')
_shared_doc_kwargs['args_transpose'] = (
"three positional arguments: each one of\n{ax_single}".format(
"{ax_single}\n\tthree positional arguments from given options".format(
Copy link
Member

Choose a reason for hiding this comment

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

Hmm OK - somewhat surprised by that since I don't know what the type is. Keep in mind that Panel is deprecated so any changes to this module will probably be stripped out in next release anyway. So don't put too much more effort into these if you don't have to

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Can you post the output of the doctoring validation script every time you push going forward? I'm not sure these fixes are actually resolving issues without creating new ones, so having that output would be helpful

-------
A specification for a groupby instruction
Note
Copy link
Member

Choose a reason for hiding this comment

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

Get rid of this section and just document kwargs as a parameter like everywhere else

@mwoss
Copy link
Contributor Author

mwoss commented Feb 7, 2019

Should I post output as csv file, raw json or markdown table?

@WillAyd
Copy link
Member

WillAyd commented Feb 7, 2019 via email

@mwoss
Copy link
Contributor Author

mwoss commented Feb 7, 2019

name errors_delimited
pandas.Timedelta GL02,GL03,PR01,PR02,PR06,PR06,PR07,PR09,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07
pandas.Timedelta.max GL02,GL03,PR02,PR06,PR06,PR07,PR09,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07
pandas.Timedelta.min GL02,GL03,PR02,PR06,PR06,PR07,PR09,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07
pandas.factorize PR07,EX02
pandas.Grouper SS03,SS06,PR01,PR02,PR06,PR08,PR09,PR08,PR09,PR06,PR07,PR06,PR08,PR09,PR07,PR07,PR09,PR07,PR06,PR07,EX02
pandas.core.groupby.GroupBy.rank SS05,PR08,PR09,PR06,PR09,PR08,PR09,PR06,PR09,RT03,SA04,SA05,SA04,SA05,SA04,SA05
pandas.core.groupby.DataFrameGroupBy.rank SS05,PR08,PR09,PR06,PR09,PR08,PR09,PR06,PR09,RT03,SA04,SA05,SA04,SA05,SA04,SA05
pandas.read_parquet PR01,PR02,PR06,PR09,RT03
pandas.Panel.apply SS05,PR01,PR02,PR09,PR08,PR09,RT02,RT03,EX02
pandas.Panel.transpose L05,SS03,PR01,PR02,PR06,PR09,RT02,RT03,EX02
pandas.core.resample.Resampler.std PR01,PR06,RT01
pandas.io.formats.style.Styler.render PR01,PR02,RT02,RT04,RT05
@mwoss
Copy link
Contributor Author

mwoss commented Feb 7, 2019

I'll fix rest of the errors tomorrow

@mwoss
Copy link
Contributor Author

mwoss commented Feb 7, 2019

Validation errors script output after update.

name errors_delimited
pandas.Timedelta GL02,GL03,PR01,PR02,PR06,PR06,PR07,PR09,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07
pandas.Timedelta.max GL02,GL03,PR02,PR06,PR06,PR07,PR09,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07
pandas.Timedelta.min GL02,GL03,PR02,PR06,PR06,PR07,PR09,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07,PR10,PR07
pandas.factorize PR07,EX02
pandas.Grouper SS03,SS06,PR01,PR02,PR06,PR08,PR09,PR08,PR09,PR06,PR07,PR06,PR08,PR09,PR06,EX02
pandas.core.groupby.GroupBy.rank PR08,PR09,PR06,PR09,PR08,PR09,PR06,PR09,RT03,SA04,SA05,SA04,SA05,SA04,SA05
pandas.core.groupby.DataFrameGroupBy.rank PR08,PR09,PR06,PR09,PR08,PR09,PR06,PR09,RT03,SA04,SA05,SA04,SA05,SA04,SA05
pandas.read_parquet PR03,PR06,PR09,RT03
pandas.Panel.apply PR01,PR02,PR09,PR08,PR09,RT02,RT03,EX02
pandas.Panel.transpose GL05,SS03,PR01,PR02,PR06,PR09,RT02,RT03,EX02
pandas.core.resample.Resampler.std PR01,PR06,RT01
pandas.io.formats.style.Styler.render RT02,RT05
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

One comment then lgtm. @datapythonista do you mind taking a look?

application.initialize(["--quiet"])

with tempfile.NamedTemporaryFile(mode='w') as file:
with tempfile.NamedTemporaryFile(mode='w', encoding='utf-8') as file:
Copy link
Member

Choose a reason for hiding this comment

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

If you can revert this I think the rest looks good

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, i again commit this line. I should create github issue with coresponding PR for that.

additional kwargs to control time-like groupers (when `freq` is passed)
closed : closed end of interval; 'left' or 'right'
Only when `freq` parameter is passed.
Copy link
Member

Choose a reason for hiding this comment

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

Sorry just one last pass at all of these where Only when freq... is the description - not sure that's the best way of going about this.

It looks like the description for these is where the type should go. Can you move the description down to the line below and add a type for this and the 3 other parameters sharing this description? Also would be nice to revert removal of previous line if it doesn't cause PR04 failures

Copy link
Contributor Author

@mwoss mwoss Feb 9, 2019

Choose a reason for hiding this comment

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

What do you mean by sharing the description? Should I group those kwargs somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix it in few hours. Sorry, busy weekend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea how deal with line below (for all kwargs).

Additional kwargs to control time-like groupers (when freq is passed).

There is no description sharing functionality for Python docstrings.

@jreback jreback added this to the 0.25.0 milestone Feb 8, 2019
@jreback
Copy link
Contributor

jreback commented Feb 9, 2019

@WillAyd merge when good

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Just made one very minor tweak but otherwise lgtm. Ping on great and will merge

@mwoss
Copy link
Contributor Author

mwoss commented Feb 11, 2019

@WillAyd all green :)

@jreback jreback merged commit 147b923 into pandas-dev:master Feb 11, 2019
@jreback
Copy link
Contributor

jreback commented Feb 11, 2019

thanks @mwoss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants