-
Notifications
You must be signed in to change notification settings - Fork 162
Add tox.ini and configure coverage and flake runs #80
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
* Add more unit tests * Configure unit tests to run with both py2 and py3 * Add flake checks * Fix broken integ tests
tox.ini
Outdated
3.6: py36, flake8 | ||
|
||
[flake8] | ||
max-line-length = 120 |
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.
we may or may not be moving to 100 - I'll chat with you offline
python = | ||
3.6: py36, flake8 | ||
|
||
[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.
should we also include stuff for the import statements? e.g. https://github.com/aws/sagemaker-containers/blob/master/.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.
I will do that.
# Can be used to specify which tests to run, e.g.: tox -- -s | ||
commands = | ||
coverage run -m pytest {posargs} | ||
{env:IGNORE_COVERAGE:} coverage report --fail-under=90 --include *sagemaker_tensorflow_container* --omit */tensorflow/tensorflow_serving/* |
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.
You can separate code coverage between python 2 and python 3 following this example here https://github.com/aws/sagemaker-containers/blob/master/.coveragerc_py27
https://github.com/aws/sagemaker-containers/blob/master/tox.ini#L32
This file here configures codecov https://github.com/aws/sagemaker-containers/blob/master/codecov.yml
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.
don't forget a newline at the end of the file for the first 3...is there a flake configuration for that too?
I think flake8 ignores the hidden files. But I can't find the documentation. Will add the newlines. |
* Add tox.ini and configure coverage and flake runs * Add more unit tests * Configure unit tests to run with both py2 and py3 * Add flake checks * Fix broken integ tests * Add import style check * Add .flake8 * Add source module in coverage command * Add newlines
* Add tox.ini and configure coverage and flake runs * Add more unit tests * Configure unit tests to run with both py2 and py3 * Add flake checks * Fix broken integ tests * Add import style check * Add .flake8 * Add source module in coverage command * Add newlines
* Add tox.ini and configure coverage and flake runs * Add more unit tests * Configure unit tests to run with both py2 and py3 * Add flake checks * Fix broken integ tests * Add import style check * Add .flake8 * Add source module in coverage command * Add newlines
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.