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

Feature/pep8 #607

Merged
merged 6 commits into from
Dec 3, 2019
Merged

Feature/pep8 #607

merged 6 commits into from
Dec 3, 2019

Conversation

nils-braun
Copy link
Collaborator

I know. This is the PR basically everyone hates.

But, for a modern python package we should also comply to pep8, so I added a github action to check exactly this + some settings (line length = 120).

I also pep8-ified everything, which means we have a large PR but no changes except whitespace and alike.
Tests will hopefully show that :-)

@github-actions
Copy link

You have style errors. See them below.

./tests/integrations/test_full_pipeline.py:53:55: W292 no newline at end of file
./tests/integrations/test_notebooks.py:31:5: E722 do not use bare 'except'
./tests/integrations/test_notebooks.py:34:76: W291 trailing whitespace
./tests/integrations/test_notebooks.py:39:1: W293 blank line contains whitespace
./tests/integrations/test_notebooks.py:51:45: E502 the backslash is redundant between brackets
./tests/integrations/test_relevant_feature_extraction.py:14:1: E302 expected 2 blank lines, found 1
./tests/integrations/test_relevant_feature_extraction.py:113:1: W391 blank line at end of file
./tests/integrations/examples/test_driftbif_simulation.py:33:9: E731 do not assign a lambda expression, use a def
./tests/integrations/examples/test_driftbif_simulation.py:58:121: E501 line too long (122 > 120 characters)
./tests/integrations/examples/test_har_dataset.py:9:1: E302 expected 2 blank lines, found 1
./tests/integrations/examples/test_har_dataset.py:23:67: W292 no newline at end of file
./tests/units/utilities/test_dataframe_functions.py:44:121: E501 line too long (131 > 120 characters)
./tests/units/utilities/test_dataframe_functions.py:45:121: E501 line too long (131 > 120 characters)
./tests/units/utilities/test_dataframe_functions.py:58:121: E501 line too long (131 > 120 characters)
./tests/units/utilities/test_dataframe_functions.py:141:121: E501 line too long (137 > 120 characters)
./tests/units/utilities/test_dataframe_functions.py:144:121: E501 line too long (137 > 120 characters)
./tests/units/utilities/test_dataframe_functions.py:145:1: W293 blank line contains whitespace
./tests/units/utilities/test_dataframe_functions.py:155:5: E303 too many blank lines (2)
./tests/units/utilities/test_dataframe_functions.py:174:5: E303 too many blank lines (2)
./tests/units/utilities/test_dataframe_functions.py:191:1: E302 expected 2 blank lines, found 1
./tests/units/utilities/test_dataframe_functions.py:267:9: E303 too many blank lines (2)
./tests/units/utilities/test_dataframe_functions.py:284:5: E303 too many blank lines (2)
./tests/units/utilities/test_dataframe_functions.py:292:23: W291 trailing whitespace
./tests/units/utilities/test_dataframe_functions.py:370:26: W291 trailing whitespace
./tests/units/utilities/test_dataframe_functions.py:389:83: E225 missing whitespace around operator
./tests/units/utilities/test_dataframe_functions.py:405:18: W291 trailing whitespace
./tests/units/utilities/test_dataframe_functions.py:419:30: W291 trailing whitespace
./tests/units/utilities/test_dataframe_functions.py:420:1: W293 blank line contains whitespace
./tests/units/utilities/test_dataframe_functions.py:454:18: W291 trailing whitespace
./tests/units/utilities/test_dataframe_functions.py:465:30: W291 trailing whitespace
./tests/units/utilities/test_dataframe_functions.py:640:9: E303 too many blank lines (2)
./tests/units/utilities/test_dataframe_functions.py:716:121: E501 line too long (121 > 120 characters)
./tests/units/utilities/test_dataframe_functions.py:724:121: E501 line too long (125 > 120 characters)
./tests/units/utilities/test_distribution.py:66:5: E303 too many blank lines (2)
./tests/units/utilities/test_distribution.py:84:1: W391 blank line at end of file
./tests/units/scripts/test_run_tsfresh.py:96:121: E501 line too long (150 > 120 characters)
./tests/units/scripts/test_run_tsfresh.py:105:63: W292 no newline at end of file
./tests/units/feature_extraction/test_extraction.py:286:53: E225 missing whitespace around operator
./tests/units/feature_extraction/test_extraction.py:287:121: E501 line too long (121 > 120 characters)
./tests/units/feature_extraction/test_extraction.py:290:55: E225 missing whitespace around operator
./tests/units/feature_extraction/test_feature_calculations.py:49:121: E501 line too long (122 > 120 characters)
./tests/units/feature_extraction/test_feature_calculations.py:102:44: E127 continuation line over-indented for visual indent
./tests/units/feature_extraction/test_feature_calculations.py:244:5: E303 too many blank lines (2)
./tests/units/feature_extraction/test_feature_calculations.py:305:38: E261 at least two spaces before inline comment
./tests/units/feature_extraction/test_feature_calculations.py:475:103: E202 whitespace before ']'
./tests/units/feature_extraction/test_feature_calculations.py:549:21: E702 multiple statements on one line (semicolon)
./tests/units/feature_extraction/test_feature_calculations.py:549:34: E702 multiple statements on one line (semicolon)
./tests/units/feature_extraction/test_feature_calculations.py:890:9: E303 too many blank lines (2)
./tests/units/feature_extraction/test_feature_calculations.py:1137:1: W293 blank line contains whitespace
./tests/units/feature_extraction/test_settings.py:44:30: E128 continuation line under-indented for visual indent
./tests/units/feature_extraction/test_settings.py:77:30: E128 continuation line under-indented for visual indent
./tests/units/feature_extraction/test_settings.py:198:65: E127 continuation line over-indented for visual indent
./tests/units/transformers/test_feature_augmenter.py:11:1: E302 expected 2 blank lines, found 1
./tests/units/transformers/test_feature_augmenter.py:24:57: E251 unexpected spaces around keyword / parameter equals
./tests/units/transformers/test_feature_augmenter.py:24:59: E251 unexpected spaces around keyword / parameter equals
./tests/units/transformers/test_feature_augmenter.py:60:57: E251 unexpected spaces around keyword / parameter equals
./tests/units/transformers/test_feature_augmenter.py:60:59: E251 unexpected spaces around keyword / parameter equals
./tests/units/transformers/test_feature_selector.py:13:1: E302 expected 2 blank lines, found 1
./tests/units/transformers/test_feature_selector.py:18:5: E303 too many blank lines (2)
./tests/units/transformers/test_feature_selector.py:101:1: W293 blank line contains whitespace
./tests/units/transformers/test_feature_selector.py:105:1: W293 blank line contains whitespace
./tests/units/transformers/test_feature_selector.py:119:1: W293 blank line contains whitespace
./tests/units/transformers/test_feature_selector.py:131:1: W391 blank line at end of file
./tests/units/transformers/test_per_column_imputer.py:56:9: E265 block comment should start with '# '
./tests/units/transformers/test_per_column_imputer.py:169:41: E231 missing whitespace after ':'
./tests/units/transformers/test_per_column_imputer.py:170:35: E231 missing whitespace after ':'
./tests/units/transformers/test_per_column_imputer.py:170:48: E231 missing whitespace after ':'
./tests/units/transformers/test_per_column_imputer.py:178:42: E231 missing whitespace after ','
./tests/units/transformers/test_per_column_imputer.py:184:34: E231 missing whitespace after ':'
./tests/units/transformers/test_per_column_imputer.py:194:34: E231 missing whitespace after ':'
./tests/units/transformers/test_per_column_imputer.py:204:37: E231 missing whitespace after ':'
./tests/units/feature_selection/test_checks.py:10:121: E501 line too long (121 > 120 characters)
./tests/units/feature_selection/test_relevance.py:21:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_relevance.py:61:22: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./tests/units/feature_selection/test_relevance.py:66:42: E128 continuation line under-indented for visual indent
./tests/units/feature_selection/test_relevance.py:79:42: E128 continuation line under-indented for visual indent
./tests/units/feature_selection/test_relevance.py:99:121: W291 trailing whitespace
./tests/units/feature_selection/test_relevance.py:103:1: E302 expected 2 blank lines, found 1
./tests/units/feature_selection/test_relevance.py:146:51: W292 no newline at end of file
./tests/units/feature_selection/test_selection.py:15:57: E231 missing whitespace after ','
./tests/units/feature_selection/test_selection.py:15:60: E231 missing whitespace after ','
./tests/units/feature_selection/test_selection.py:15:62: E231 missing whitespace after ','
./tests/units/feature_selection/test_significance_tests.py:44:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:45:70: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:46:70: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:55:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:56:74: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:57:74: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:67:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:68:74: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:69:74: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:77:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:78:78: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:79:78: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:94:67: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:108:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:109:76: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:125:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:126:76: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:142:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:143:71: E127 continuation line over-indented for visual indent
./tests/units/feature_selection/test_significance_tests.py:154:5: E303 too many blank lines (2)
./tests/units/feature_selection/test_significance_tests.py:155:75: E127 continuation line over-indented for visual indent

@coveralls
Copy link

coveralls commented Nov 26, 2019

Coverage Status

Coverage remained the same at 98.516% when pulling 28461df on feature/pep8 into ea61188 on master.

@dbarbier
Copy link
Contributor

Another option is to use https://github.com/psf/black, it makes life easier IMHO.

@nils-braun
Copy link
Collaborator Author

I guess in the end it boils down to a matter of taste and I (personally) do not like the black decisions that much 🤷‍♂️
But of course, if people like it - I have no strong objections :-)

@nils-braun
Copy link
Collaborator Author

My suggestion: lets start with that (which is "easier" to digest) and see how people like it.
And then move to black maybe later.

@dbarbier
Copy link
Contributor

Feel free to merge it when it is ready, I will take care of rebasing my branches.

@MaxBenChrist
Copy link
Collaborator

I used flake8 and pylint in the past. Pylint is super aggressive. Flake8 was nice. We could add it to the travis build?

@nils-braun
Copy link
Collaborator Author

This PR adds a github action (which is the CI tool of github) to do a pycodestyle check (which is exactly pep8 with some additional 120 column size setting).

@nils-braun
Copy link
Collaborator Author

@MaxBenChrist Any more thoughts or can I merge?
I want to merge this as quickly as possible because it affects so many other PRs...

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

Successfully merging this pull request may close these issues.

4 participants