-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
bc437e4
Travis CI: Add type checking with mypy
cclauss 5dd8090
Create requirements.txt
cclauss d3d5a39
script: mypy --ignore-missing-stubs=cv2,numpy .
cclauss 3f32aa8
Delete requirements.txt
cclauss ed1e00a
script: mypy --ignore-missing-imports .
cclauss 6950950
Run doctests
cclauss d612c3a
Disable doctest -v other/detecting_english_programmatically.py
cclauss 6846fcc
Pytest
cclauss 9c7f9da
No |
cclauss d371f76
pytest || true
cclauss 276b248
Run black doctest flake8 mypy pytest
cclauss 5ca5b43
after_success: Build Directory.md
cclauss 5ad53a7
Typo in filename: Dictionary.txt --> dictionary.txt'
cclauss 047216f
python -m doctest -v
cclauss bd02765
pip install black flake8 mypy pytest
cclauss 9994794
pytest --doctest-glob='*.py'
cclauss 86bdb71
pytest --doctest-modules
cclauss 19b45dd
pytest --doctest-modules ./sorts
cclauss 5a1a398
pytest --doctest-modules ./ciphers ./other ./searches ./sorts ./strin…
cclauss a37327d
if __name__ == "__main__":
cclauss 002287d
if __name__ == "__main__":
cclauss cec7e16
if __name__ == '__main__':
cclauss 28d9e6d
if __name__ == '__main__':
cclauss 1c27abc
if __name__ == '__main__':
cclauss 704bf00
Create requirements.txt
cclauss 3456316
Update requirements.txt
cclauss 769f66d
if __name__ == "__main__":
cclauss 122bf27
Lose the doctests
cclauss 9ae08f3
if __name__ == '__main__':
cclauss 03b4bdd
Remove print-a-tuple
cclauss 8b55aff
doctest: Added missing spaces
cclauss 33a8723
Update tabu_search.py
cclauss 32349c1
The >>> are not doctests so change to >>)
cclauss 5bc5634
Travis CI: Run black, doctest, flake8, mypy, and pytest
cclauss 976f914
Link to the separate DIRECTORY.md file
cclauss 364014b
Merge branch 'master' into mypy-on-Travis-CI
cclauss fab6bc2
Update README.md
poyea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
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 black flake8 mypy pytest | ||
before_script: | ||
- black --check . || true | ||
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# - python -m doctest -v other/detecting_english_programmatically.py | ||
- python -m doctest | ||
ciphers/affine_cipher.py | ||
cclauss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ciphers/brute_force_caesar_cipher.py | ||
ciphers/transposition_cipher.py | ||
other/frequency_finder.py | ||
searches/binary_search.py | ||
searches/linear_search.py | ||
searches/sentinel_linear_search.py | ||
sorts/bogo_sort.py | ||
sorts/comb_sort.py | ||
sorts/counting_sort.py | ||
sorts/heap_sort.py | ||
sorts/insertion_sort.py | ||
sorts/merge_sort.py | ||
sorts/quick_sort.py | ||
sorts/selection_sort.py | ||
sorts/shell_sort.py | ||
strings/levenshtein_distance.py | ||
script: | ||
- mypy --ignore-missing-imports . | ||
- pytest || true | ||
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
?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.