Skip to content

DOC: Fixes to docstrings #28001

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

Closed
wants to merge 10 commits into from
Closed

Conversation

realjohnward
Copy link
Contributor

@realjohnward realjohnward commented Aug 18, 2019

Partially resolves issue

@pep8speaks
Copy link

pep8speaks commented Aug 18, 2019

Hello @realjohnward! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1178:89: E501 line too long (99 > 88 characters)

Comment last updated at 2019-08-22 17:01:41 UTC

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Good stuff, thanks for working on this @realjohnward.

Added some comments, and when you address them, please make sure that the CI is green, otherwise we can't merge the changes.

Also, please try to provide a more descriptive title and reference the issue you're working on in the description (you can edit the description, I'm changing the title myself).

@@ -4,7 +4,6 @@

from ..pandas_vb_common import BaseIO


Copy link
Member

Choose a reason for hiding this comment

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

Can you undo this please, besides probably being the reason to have the CI in green, we are strict about not including unrelated changes to PR, to keep the maintenance of the project under control.

@@ -422,6 +422,8 @@ def _read(filepath_or_buffer: FilePathOrBuffer, kwds):
if encoding is not None:
encoding = re.sub("_", "-", encoding).lower()
kwds["encoding"] = encoding
elif encoding is None and kwds.get("auto_encode"):
kwds["encoding"] = 'auto'
Copy link
Member

Choose a reason for hiding this comment

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

Can you have the code changes in a separate PR please?

Dict-like IO interface for storing pandas objects in PyTables
either Fixed or Table format.
Dict-like IO interface for storing pandas objects in PyTables.
Either Fixed or Table format.
Copy link
Member

Choose a reason for hiding this comment

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

Can you leave a blank line between the two paragraphs.

Return a (potentially unordered) list of the keys corresponding to the
objects stored in the HDFStore. These are ABSOLUTE path-names (e.g.
have the leading '/'
Return a (potentially unordered) list of the keys corresponding to the objects stored in the HDFStore.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is too long, can you check the CI please?

fixed(f) : Fixed format
Fast writing/reading. Not-appendable, nor searchable
table(t) : Table format
format : 'Fixed(f)|Table(t)', default is 'fixed'
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 don't mind, can you leave just one space in each side of the colon? I know it's from the original code, not your changed, but would be good to have this fixed.

format : 'Fixed(f)|Table(t)', default is 'fixed'
Fixed(f) : Fixed format
Fast writing/reading. Not-appendable, nor searchable.
Table(t) : Table format
Copy link
Member

Choose a reason for hiding this comment

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

I think this is incorrect, I know you did it to make the validation of the docstring not fail, but we'll have to find another solution, you can just restore how it was for now.

@@ -1202,18 +1213,17 @@ def walk(self, where="/"):

Parameters
----------
where : str, optional
where : str, optional, default "/"
Copy link
Member

Choose a reason for hiding this comment

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

you can remove the optional, we used it when the default is None

See Also
--------
dateutil.relativedelta.relativedelta
dateutil.relativedelta.relativedelta : The relativedelta type is designed to be applied to an existing datetime an can replace specific components of that datetime, or represents an interval of time.
Copy link
Member

Choose a reason for hiding this comment

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

You'll have to split the description in different lines, this is surely too long. Also, leave just one space after the colon.

@datapythonista datapythonista changed the title Docstrings DOC: Fixes to docstrings Aug 18, 2019
@datapythonista
Copy link
Member

just saw you did reference the issue in the PR, you can check how we usually do (the hash makes github create a link to this PR in the issue)

@realjohnward
Copy link
Contributor Author

Thank you @datapythonista for looking over this PR and requesting changes. I am creating another PR with the requested changes made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants