-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1249 from gboeing/tests
streamline tests
- Loading branch information
Showing
6 changed files
with
29 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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,21 +1,24 @@ | ||
#!/bin/bash | ||
set -e # exit on error | ||
set -e | ||
|
||
# delete temp files and folders | ||
rm -r -f .pytest_cache .temp ./dist/ ./docs/build osmnx/__pycache__ tests/__pycache__ | ||
find . -type f -name "*.vrt" -delete | ||
find . -type f -name ".coverage*" -delete | ||
rm -r -f ./.coverage* ./.pytest_cache ./.temp ./dist ./docs/build ./*/__pycache__ | ||
|
||
# lint | ||
# run the pre-commit hooks for linting/formatting | ||
pre-commit run --all-files | ||
|
||
# build the docs | ||
make -C ./docs html SPHINXOPTS="-E -W --keep-going" | ||
# build and validate the package | ||
python -m validate_pyproject ./pyproject.toml | ||
python -m hatch build --clean | ||
python -m twine check --strict ./dist/* | ||
|
||
# build the docs and test that links are alive | ||
python -m sphinx -E -W --keep-going -b html ./docs/source ./docs/build/html | ||
python -m sphinx -E -W --keep-going -b linkcheck ./docs/source ./docs/build/linkcheck | ||
|
||
# run the tests and report the test coverage | ||
pytest --verbose --maxfail=1 --typeguard-packages=osmnx --cov=osmnx --cov-report=term-missing:skip-covered | ||
python -m pytest --verbose --maxfail=1 --typeguard-packages=osmnx --cov=osmnx --cov-report=term-missing:skip-covered | ||
|
||
# delete temp files and folders | ||
rm -r -f .pytest_cache .temp ./dist/ ./docs/build osmnx/__pycache__ tests/__pycache__ | ||
find . -type f -name "*.vrt" -delete | ||
find . -type f -name ".coverage*" -delete | ||
sleep 1 | ||
rm -r -f ./.coverage* ./.pytest_cache ./.temp ./dist ./docs/build ./*/__pycache__ |
This file contains 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
This file was deleted.
Oops, something went wrong.