-
-
Notifications
You must be signed in to change notification settings - Fork 47k
Travis CI: Run black, doctest, flake8, mypy, and pytest #964
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
Changes from 34 commits
bc437e4
5dd8090
d3d5a39
3f32aa8
ed1e00a
6950950
d612c3a
6846fcc
9c7f9da
d371f76
276b248
5ca5b43
5ad53a7
047216f
bd02765
9994794
86bdb71
19b45dd
5a1a398
a37327d
002287d
cec7e16
28d9e6d
1c27abc
704bf00
3456316
769f66d
122bf27
9ae08f3
03b4bdd
8b55aff
33a8723
32349c1
5bc5634
976f914
364014b
fab6bc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
language: python | ||
dist: xenial # required for Python >= 3.7 | ||
python: 3.7 | ||
install: pip install flake8 | ||
script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
cache: pip | ||
install: pip install -r requirements.txt | ||
before_script: | ||
- black --check . || true | ||
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
script: | ||
- mypy --ignore-missing-imports . | ||
- pytest --doctest-modules ./ciphers ./other ./searches ./sorts ./strings | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also it would be nice to add pytest-cov and generate coverage report? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I am not a fan of coverage tools. We do not mandate tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sirex It has been a busy two weeks but now we have 132 pytests passing so I think we could add pytest-cov to Travis CI as you suggested above. Please consider submitting a pull request that modifies .travis.yml so that it runs pytest-cov. |
||
after_success: | ||
- python ./~script.py | ||
cclauss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- cat DIRECTORY.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well if we want to change the directory while merging, do we need a bot? |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,6 @@ def Atbash(): | |
output+=i | ||
print(output) | ||
|
||
Atbash() | ||
|
||
if __name__ == '__main__': | ||
Atbash() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,7 @@ def main(): | |
elif choice == '4': | ||
print ("Goodbye.") | ||
break | ||
main() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
black | ||
flake8 | ||
matplotlib | ||
mypy | ||
numpy | ||
pytest | ||
poyea marked this conversation as resolved.
Show resolved
Hide resolved
|
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 these lines are in
before_script
and whyblack
has|| true
?Uh oh!
There was an error while loading. Please reload this page.
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.
Successful before_script results are hidden under twisties so they do not clutter the error log so contributors can go straight to the heart of the problems.
black will fail badly in the near term because we do not mandate formatted code. However, we want to be able to understand improvement as we make it without failing the build.