Skip to content

DOC: Fix flake8 issues in doc/source/whatsnew/v0.13.*.rst #24256

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
saurav2608 opened this issue Dec 13, 2018 · 2 comments · Fixed by #24322
Closed

DOC: Fix flake8 issues in doc/source/whatsnew/v0.13.*.rst #24256

saurav2608 opened this issue Dec 13, 2018 · 2 comments · Fixed by #24322

Comments

@saurav2608
Copy link

xref: #24177

We didn't start validating the format of PEP8 and other code standards in the documentation examples until recently. We still have some files with errors, that we need to skip, and that we should fix, so we can start validating them.

Two steps are required to replicate the issue

  1. Edit setup.cfg in the pandas home, and in the flake8-rst section, remove from the exclude list the file doc/source/whatsnew/v0.13.0.rst & doc/source/whatsnew/v0.13.1.rst

  2. Remove the import block ( from pandas import *) from the lines (8-11) of the file v0.13.*.rst.

After that, running the next command will report the errors in the file (note that syntax error usually prevent to validate other errors, and the list of errors to fix can become much longer when the syntax error is fixed (please make sure that you are using flake8-rst version 0.7.0 or higher):

$ flake8-rst doc/source/whatsnew/v0.13.*
doc/source/whatsnew/v0.13.0.rst:107:47: E261 at least two spaces before inline comment
doc/source/whatsnew/v0.13.0.rst:124:10: E111 indentation is not a multiple of four
doc/source/whatsnew/v0.13.0.rst:124:13: E999 SyntaxError: invalid syntax
doc/source/whatsnew/v0.13.0.rst:149:26: E231 missing whitespace after ':'
doc/source/whatsnew/v0.13.0.rst:149:33: E231 missing whitespace after ','
...
doc/source/whatsnew/v0.13.1.rst:33:28: E251 unexpected spaces around keyword / parameter equals
doc/source/whatsnew/v0.13.1.rst:33:30: E251 unexpected spaces around keyword / parameter equals
doc/source/whatsnew/v0.13.1.rst:33:46: E231 missing whitespace after ','
doc/source/whatsnew/v0.13.1.rst:33:52: E231 missing whitespace after ','
doc/source/whatsnew/v0.13.1.rst:33:58: E231 missing whitespace after ','
...

Once all the errors are addressed, please open a pull request with the fixes in the file, and removing the file from setup.cfg. If you need to do something that feels wrong to fix an error, please ask in a comment to this issue. Please avoid other unrelated changes, which can be addressed in a separate pull request.
cc: @datapythonista

@Seuss27
Copy link
Contributor

Seuss27 commented Dec 14, 2018

May I work on this one?

@datapythonista
Copy link
Member

sure, thanks @Seuss27

Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 16, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 16, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 16, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 17, 2018
Added the flake8-group: ignore to fix the intentional E999 errors and
fixed the remaining flake8 issues in v0.13.0.rst
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 17, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 17, 2018
Updated setup.cfg to the most recent version before PR
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 17, 2018
Added missing space in setup.cfg exclusion section.
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 17, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Another attempt to get the conflicts resolved with setup.cfg
Incorporated the requested changes.
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Rollback strange changes to setup.cfg and hopefully resolve
the merge conflict.
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Another attempt to fix the merge conflict with setup.cfg
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Fixed merge errors with setup.cfg, reapplying changes in this version
Seuss27 added a commit to Seuss27/pandas that referenced this issue Dec 18, 2018
Implemented remaining requested changes...
@jreback jreback added this to the 0.24.0 milestone Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants