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

DOC: Fix grammar and formatting typos #14803

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

mroeschke
Copy link
Member

One grammatical typo, and the rest address small formatting typos when rendering online.

@@ -3583,8 +3583,8 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
wrappers around the scipy interpolation methods of similar
names. These use the actual numerical values of the index. See
the scipy documentation for more on their behavior
`here <http://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation>`__ # noqa
`and here <http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html>`__ # noqa
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 will give a problem with out linter (that's the reason for the "#noqa"), but can wait on travis to confirm.
A way how I have solved this in other places is to ensure there are no spaces on the line that is too long (then the linter makes an exception). So you can do:

    ... `here
    <http://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation>`__ 

and then it does not complain about the too long line (this is also how it is done in some of the 'Notes' sections below

Copy link
Member

Choose a reason for hiding this comment

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

Content wise, it maybe also nicer instead of "See the scipy documention for more on their behaviour here and here" to read "For more on their behaviour see the scipy reference and tutorial documentation" (then the difference between the two 'here's is more clear)

@jorisvandenbossche
Copy link
Member

@mroeschke Thanks for the PR! Just one comment about the line length (our strict rules nowadays are sometimes a bit cumbersome for the docstrings ..)

@jorisvandenbossche jorisvandenbossche added this to the 0.20.0 milestone Dec 5, 2016
@mroeschke
Copy link
Member Author

Ah you were correct; Travis threw a linting error. Thanks for the tips and explanation about #noqa! I'll fix those tonight.

@codecov-io
Copy link

codecov-io commented Dec 6, 2016

Current coverage is 85.28% (diff: 100%)

Merging #14803 into master will increase coverage by <.01%

@@             master     #14803   diff @@
==========================================
  Files           144        144          
  Lines         50968      50968          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43466      43467     +1   
+ Misses         7502       7501     -1   
  Partials          0          0          

Powered by Codecov. Last update 2466ecb...e08d27e

@jorisvandenbossche
Copy link
Member

@mroeschke the linter is now complaining about some other lines:

pandas/core/generic.py:3638:80: E501 line too long (84 > 79 characters)
pandas/core/generic.py:3646:80: E501 line too long (80 > 79 characters)
pandas/core/generic.py:3660:80: E501 line too long (80 > 79 characters)
pandas/tools/plotting.py:2896:80: E501 line too long (80 > 79 characters)

(also lines that you didn't change, but I suppose that the #noqa suppressed them as well)

@mroeschke
Copy link
Member Author

Oops. Thanks for the heads up. I'll address those tonight as well.

@mroeschke
Copy link
Member Author

Hmm git diff master | flake8 --diff and pep8radius master --diff passed locally, but it seems Travis still threw a linting error? @jorisvandenbossche

@jorisvandenbossche
Copy link
Member

Yep (you can always look at the travis log (third build): https://travis-ci.org/pandas-dev/pandas/jobs/181861282, scroll to bottom):

pandas/core/generic.py:3662:80: E501 line too long (80 > 79 characters)

It's from lines that you didn't touch yourself (the full docstring was not checked before), so checking the diff didn't catch this. BTW, besides checking the diff manually, I would also advice to set up your IDE to check for this.

@mroeschke
Copy link
Member Author

Ah, thanks for the guidance! Still learning to navigate myself through the logs. I appreciate the help!

Fix broken hyperlink on resample

colon spacing

remove comment from printing to docstring

address linting errors

pep8 fixes

pep8 changes
@jorisvandenbossche jorisvandenbossche merged commit 3ac41ab into pandas-dev:master Dec 8, 2016
@jorisvandenbossche
Copy link
Member

@mroeschke Thanks!

yarikoptic added a commit to neurodebian/pandas that referenced this pull request Dec 12, 2016
* commit 'v0.19.0-174-g81a2f79': (156 commits)
  BLD: escape GH_TOKEN in build_docs
  TST: Correct results with np.size and crosstab (pandas-dev#4003) (pandas-dev#14755)
  Frame benchmarking sum instead of mean (pandas-dev#14824)
  CLN: lint of test_base.py
  BUG: Allow TZ-aware DatetimeIndex in merge_asof() (pandas-dev#14844)
  BUG: GH11847 Unstack with mixed dtypes coerces everything to object
  TST: skip testing on windows for specific formatting which sometimes hangs (pandas-dev#14851)
  BLD: try new gh token for pandas-docs
  CLN/PERF: clean-up of the benchmarks (pandas-dev#14099)
  ENH: add timedelta as valid type for interpolate with method='time' (pandas-dev#14799)
  DOC: add section on groupby().rolling/expanding/resample (pandas-dev#14801)
  TST: add test to confirm GH14606 (specify category dtype for empty) (pandas-dev#14752)
  BLD: use org name in build-docs.sh
  BF(TST): use = (native) instead of < (little endian) for target data types (pandas-dev#14832)
  ENH: Introduce UnsortedIndexError  GH11897 (pandas-dev#14762)
  ENH: Add the ability to have a separate title for each subplot when plotting (pandas-dev#14753)
  DOC: Fix grammar and formatting typos (pandas-dev#14803)
  BLD: try new build credentials for pandas-docs
  TST: Test pivot with categorical data
  MAINT: Cleanup pandas/src/parser (pandas-dev#14740)
  ...
yarikoptic added a commit to neurodebian/pandas that referenced this pull request Dec 12, 2016
release 0.19.1 was from release branch

* releases: (156 commits)
  BLD: escape GH_TOKEN in build_docs
  TST: Correct results with np.size and crosstab (pandas-dev#4003) (pandas-dev#14755)
  Frame benchmarking sum instead of mean (pandas-dev#14824)
  CLN: lint of test_base.py
  BUG: Allow TZ-aware DatetimeIndex in merge_asof() (pandas-dev#14844)
  BUG: GH11847 Unstack with mixed dtypes coerces everything to object
  TST: skip testing on windows for specific formatting which sometimes hangs (pandas-dev#14851)
  BLD: try new gh token for pandas-docs
  CLN/PERF: clean-up of the benchmarks (pandas-dev#14099)
  ENH: add timedelta as valid type for interpolate with method='time' (pandas-dev#14799)
  DOC: add section on groupby().rolling/expanding/resample (pandas-dev#14801)
  TST: add test to confirm GH14606 (specify category dtype for empty) (pandas-dev#14752)
  BLD: use org name in build-docs.sh
  BF(TST): use = (native) instead of < (little endian) for target data types (pandas-dev#14832)
  ENH: Introduce UnsortedIndexError  GH11897 (pandas-dev#14762)
  ENH: Add the ability to have a separate title for each subplot when plotting (pandas-dev#14753)
  DOC: Fix grammar and formatting typos (pandas-dev#14803)
  BLD: try new build credentials for pandas-docs
  TST: Test pivot with categorical data
  MAINT: Cleanup pandas/src/parser (pandas-dev#14740)
  ...
ischurov pushed a commit to ischurov/pandas that referenced this pull request Dec 19, 2016
@mroeschke mroeschke deleted the docstring_typos branch December 21, 2016 04:15
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