Skip to content
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

Fix RangeIndex and other docstrings for missing period in summary #136

Open
datapythonista opened this issue Aug 18, 2019 · 8 comments
Open
Assignees
Labels

Comments

@datapythonista
Copy link
Member

Same as #132 but for other docstrings:

pandas.Categorical.dtype: Summary does not end with a period
pandas.merge_ordered: Summary does not end with a period
pandas.bdate_range: Summary does not end with a period
pandas.period_range: Summary does not end with a period
pandas.timedelta_range: Summary does not end with a period
pandas.interval_range: Summary does not end with a period
pandas.util.hash_pandas_object: Summary does not end with a period
pandas.Grouper: Summary does not end with a period
pandas.Index.memory_usage: Summary does not end with a period
pandas.Index.fillna: Summary does not end with a period
pandas.Index.dropna: Summary does not end with a period
pandas.Int64Index: Summary does not end with a period
pandas.UInt64Index: Summary does not end with a period
pandas.Float64Index: Summary does not end with a period
pandas.RangeIndex.start: Summary does not end with a period
pandas.RangeIndex.stop: Summary does not end with a period
pandas.RangeIndex.step: Summary does not end with a period
@bhuvanakundumani
Copy link
Contributor

I'd like to work on this

@datapythonista
Copy link
Member Author

great, thanks. Martina already opened a PR in pandas for a similar issue. I'm sure you know how to take care of this, but you can take care at what she did if that helps.

@bhuvanakundumani
Copy link
Contributor

sure . will look into it as well.

@bhuvanakundumani
Copy link
Contributor

@datapythonista - have trouble with the following -

pandas.Int64Index: Summary does not end with a period
pandas.UInt64Index: Summary does not end with a period
pandas.Float64Index: Summary does not end with a period

The summary ends with a period. Have attached the screenshot for pandas.Int64Index here.
Screenshot 2019-08-21 at 9 05 00 AM

I tried running validate_docstrings.py to see if it had been fixed. It gives the error messages -
7 Errors found:
Summary does not end with a period
Summary should fit in a single line
Parameters {fastpath} not documented
Parameter "data" has no description
Parameter "dtype" has no description
Parameter "copy" description should finish with "."
Parameter "name" description should finish with "."
1 Warnings found:
No examples section found
Am i missing something here?

@martinagvilas
Copy link
Member

Could it be that in the cases that you mention the summary in the code ends with %(extra)s? This could make validate_docstrings.py throw an error.

@datapythonista
Copy link
Member Author

I haven't seen this happening before. May be it's what @martinagvilas mention.

When you run the validate_docstrings.py script, the script will print the docstring that is analyzed, that should help. You can also debug (add some print to the script locally) to see what is the value of the summary... If the script is wrong, you can open an issue about it, and work on a PR.

Thanks!

@jorisvandenbossche
Copy link

It might be because the first sentence does not end on the first line (" Summary should fit in a single line" is another error listed in the output). It might be that you can't fix the period one without fixing the other (due to how the validation script works)

@bhuvanakundumani
Copy link
Contributor

Will look into the script

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

No branches or pull requests

4 participants