Skip to content

Fix SS03 Issues in Docstrings #29315

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
22 tasks
deepandas11 opened this issue Nov 1, 2019 · 6 comments
Closed
22 tasks

Fix SS03 Issues in Docstrings #29315

deepandas11 opened this issue Nov 1, 2019 · 6 comments
Labels

Comments

@deepandas11
Copy link

deepandas11 commented Nov 1, 2019

Running the following:
scripts/validate_docstrings.py --errors=SS03
returns the following instances of cases where the Summary doesn't end with a period.
SS03 is one of the pending docstring-related errors as mentioned in #27977

  • pandas.tseries.frequencies.to_offset: 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.IntervalIndex.left: Summary does not end with a period
  • pandas.IntervalIndex.right: Summary does not end with a period
  • pandas.IntervalIndex.mid: Summary does not end with a period
  • pandas.IntervalIndex.closed: Summary does not end with a period
  • pandas.IntervalIndex.length: Summary does not end with a period
  • pandas.io.stata.StataReader.data: Summary does not end with a period
  • pandas.plotting.plot_params: Summary does not end with a period
  • pandas.io.formats.style.Styler.loader: Summary does not end with a period
  • pandas.Timestamp.combine: Summary does not end with a period
  • pandas.Timestamp.fromordinal: Summary does not end with a period
  • pandas.Timestamp.isoweekday: Summary does not end with a period
  • pandas.Timestamp.weekday: Summary does not end with a period
  • pandas.Period.strftime: Summary does not end with a period
  • pandas.Interval.closed: Summary does not end with a period
  • pandas.Interval.left: Summary does not end with a period
  • pandas.Interval.length: Summary does not end with a period
  • pandas.Interval.mid: Summary does not end with a period
  • pandas.Interval.right: Summary does not end with a period

The way to go about resolving this issue with such a large number of files has been nicely setup by @datapythonista in #27977 itself. Quoting from the issue:

> VERY IMPORTANT
The main challenge will be not repeating the same work as other sprinters, which is very frustrating, and happened massively at every sprint. My recommendation is BEFORE doing any work, to create an issue for the error code you plan to work on (check that it hasn't already been created). In the error write the list of errors that validate_docstrings.py returns. Then in a comment, take 10 of them, and write that you're going to fix them. Other people can work on a different 10. When opening a PR, reference the issue.

[UPDATE 1]
List has been updated after @datapythonista's recommendation to remove the ones starting with pandas.tseries.offsets .

@SebStrug
Copy link
Contributor

SebStrug commented Nov 1, 2019

I'll work on the bottom 10:

  • pandas.Timestamp.combine: Summary does not end with a period
  • pandas.Timestamp.fromordinal: Summary does not end with a period
  • pandas.Timestamp.isoweekday: Summary does not end with a period
  • pandas.Timestamp.weekday: Summary does not end with a period
  • pandas.Period.strftime: Summary does not end with a period
  • pandas.Interval.closed: Summary does not end with a period
  • pandas.Interval.left: Summary does not end with a period
  • pandas.Interval.length: Summary does not end with a period
  • pandas.Interval.mid: Summary does not end with a period
  • pandas.Interval.right: Summary does not end with a period

@datapythonista
Copy link
Member

Afaik all the ones starting with pandas.tseries.offsets are false positives, we're working on fixing the script so they are not mistakenly reported.

@SebStrug
Copy link
Contributor

SebStrug commented Nov 2, 2019

Sorry for the delay @deepandas11 @datapythonista .
As a first-time contributor I'm trying to follow the example of @sparalic in #28053 editing pandas\_libs\tslibs\nattype.pyx and pandas\_libs\tslibs\timestamps.pyx (for the timestamps SS03 error), but the error still keeps coming up.

Am I looking in the wrong place? Should I submit a preliminary PR and go from there?

@datapythonista
Copy link
Member

When changing .pyx files, you need to recompile pandas with python setup.py build_ext --inplace -j 0 for the script to see the changes. If that's not the problem, please send me a link to of the docstring you're changing, and the output of the script, and I'll have a look.

@SebStrug SebStrug mentioned this issue Nov 5, 2019
5 tasks
@SebStrug
Copy link
Contributor

SebStrug commented Nov 6, 2019

I'll take the remaining 12.

  • pandas.tseries.frequencies.to_offset: 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.IntervalIndex.left: Summary does not end with a period
  • pandas.IntervalIndex.right: Summary does not end with a period
  • pandas.IntervalIndex.mid: Summary does not end with a period
  • pandas.IntervalIndex.closed: Summary does not end with a period
  • pandas.IntervalIndex.length: Summary does not end with a period
  • pandas.io.stata.StataReader.data: Summary does not end with a period
  • pandas.plotting.plot_params: Summary does not end with a period
  • pandas.io.formats.style.Styler.loader: Summary does not end with a period

@SebStrug SebStrug mentioned this issue Nov 11, 2019
5 tasks
@mroeschke
Copy link
Member

Closing as a duplicate of #25306

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

5 participants