-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Run flake8 in a separate travis environment #12708
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
Conversation
0d7db82
to
60bccc7
Compare
60bccc7
to
7266a79
Compare
Works now. Maybe the environment for flake8 can be stripped down further to speed up more. However, I'm not that much into the build process, to know what could be left out. |
Would it make sense to remove flake8 testing from the python3.6 environment then? Else flake is tested twice. |
flake8 is removed from python3.6. See the .travis.yml:80 in the changes. What may confuse you is the log:
Travis is quite verbose in repeating the command, which in this case is the conditional. Since the output "Flake8 passed without any issues!" is not there, you can see that it has not run. One could add an else echo "Flake8 skipped." clause, but I doubt that it would significantly improve the situation as the command gets more verbose. The only way to make this more readable would be to move the commands into separte script files. However, there was some opposition last time that came up. |
|
||
flake8 | ||
flake8-per-file-ignores | ||
ipykernel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need these last 4 dependencies to run flake8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely, we don't need these. I just replicated the 3.6 environment to be on the safe side. Removed now.
Am I correct, that flake8 just parses the source but does not import it? In that case we probably wouldn't need a lot of the apt packages as well for this environment. However that would require some reorganization of the .travis.yml
config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be interest in reorganizing this stuff (likely need to move some things into files in requirements/testing
) or should I leave .travis.yml
as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is interest in re-organizing, particularly if the flake8 build can be made faster. We merged to move it along, but further refinement welcome...
7266a79
to
2cb4b55
Compare
…708-on-v3.0.x Backport PR #12708 on branch v3.0.x (Run flake8 in a separate travis environment)
PR Summary
Follow up to #12523. Discussion at #12523 (comment)
This PR sets up a separate travis environment to run flake8 independently of the tests. The issue with the current behavior of running flake8 after the tests results is that a flake8 issue only becomes visible after the long test run.