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
Define xrange in python3 #15
Conversation
Add [flake8](http://flake8.pycqa.org) tests to find Python syntax errors and undefined names. __E901,E999,F821,F822,F823__ are the "_showstopper_" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety. * F821: undefined name `name` * F822: undefined name `name` in `__all__` * F823: local variable name referenced before assignment * E901: SyntaxError or IndentationError * E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
56e2e98
to
4fb4e0d
Compare
The remaining undefined names in Python 3 are covered in #16 and resolved in the commit below. |
The relevant files here are actually written by the original author and most of them are not necessary for our code. I recommend we do a couple things:
|
I believed that the four runs were a feature not a bug. Two runs do flake8 static analysis while in parallel two other runs do pytest. By doing it all in parallel, we fail faster. Also, perhaps it is better for you to delete the unnecessary files in a separate PR first. Then after that PR is merged, we can retool this PR around those changes |
Okay, I think I understand. Are you able to run a different script for different builds then? It looks like they all skip pytest right now. Also, is it necessary to install the pip requirements for the flake tests to run? If so, I'm not sure it saves any time to run in parallel. However, it might still be useful to run both flake and pytest separately so flake errors don't cause pytest not to run BTW, I submitted a PR (#26) which removes the files |
Another attempt at Trusted-AI#15 which also tries to consolidate repetitive parts of the __.travis.yml__ file. Add [flake8](http://flake8.pycqa.org) tests to find Python syntax errors and undefined names. __E901,E999,F821,F822,F823__ are the "_showstopper_" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety. * F821: undefined name `name` * F822: undefined name `name` in `__all__` * F823: local variable name referenced before assignment * E901: SyntaxError or IndentationError * E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
…#29) * Travis CI: Add flake8 tests to find syntax errors and undefined names Another attempt at #15 which also tries to consolidate repetitive parts of the __.travis.yml__ file. Add [flake8](http://flake8.pycqa.org) tests to find Python syntax errors and undefined names. __E901,E999,F821,F822,F823__ are the "_showstopper_" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety. * F821: undefined name `name` * F822: undefined name `name` in `__all__` * F823: local variable name referenced before assignment * E901: SyntaxError or IndentationError * E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree * Undefined Name -- Typo: typeError --> typeError * Move non-vital flake8 run to Python3 before_script This run is merely about "style violations" that do not adversely effect Python runtime behavior. Putting it in the __before_script_ keeps the output under a twisty. We get quite similar results when running the style tests under Py2 and Py3 so just run them once. * env: MLDB_URL="ftp://ftp.ics.uci.edu/pub/machine-learning-databases" * Reinsert branches: only: - master
…Trusted-AI#29) * Travis CI: Add flake8 tests to find syntax errors and undefined names Another attempt at Trusted-AI#15 which also tries to consolidate repetitive parts of the __.travis.yml__ file. Add [flake8](http://flake8.pycqa.org) tests to find Python syntax errors and undefined names. __E901,E999,F821,F822,F823__ are the "_showstopper_" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety. * F821: undefined name `name` * F822: undefined name `name` in `__all__` * F823: local variable name referenced before assignment * E901: SyntaxError or IndentationError * E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree * Undefined Name -- Typo: typeError --> typeError * Move non-vital flake8 run to Python3 before_script This run is merely about "style violations" that do not adversely effect Python runtime behavior. Putting it in the __before_script_ keeps the output under a twisty. We get quite similar results when running the style tests under Py2 and Py3 so just run them once. * env: MLDB_URL="ftp://ftp.ics.uci.edu/pub/machine-learning-databases" * Reinsert branches: only: - master
…Trusted-AI#29) * Travis CI: Add flake8 tests to find syntax errors and undefined names Another attempt at Trusted-AI#15 which also tries to consolidate repetitive parts of the __.travis.yml__ file. Add [flake8](http://flake8.pycqa.org) tests to find Python syntax errors and undefined names. __E901,E999,F821,F822,F823__ are the "_showstopper_" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety. * F821: undefined name `name` * F822: undefined name `name` in `__all__` * F823: local variable name referenced before assignment * E901: SyntaxError or IndentationError * E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree * Undefined Name -- Typo: typeError --> typeError * Move non-vital flake8 run to Python3 before_script This run is merely about "style violations" that do not adversely effect Python runtime behavior. Putting it in the __before_script_ keeps the output under a twisty. We get quite similar results when running the style tests under Py2 and Py3 so just run them once. * env: MLDB_URL="ftp://ftp.ics.uci.edu/pub/machine-learning-databases" * Reinsert branches: only: - master
xrange(i) was removed in Python 3 in favor of range(i) so for small values of i, use range() in both versions of Python and for larger values of i, define xrange() in Python 3 to be identical to range().
Also: