-
-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align most of scripts of httpx here (#739)
* WIP switch to same layout as httpx * Align scripts on httpx layout * Added scripts, they were ignre by my global gitignore * Mimic httpx workflow better * version is in init file * Added twine and wheel for new scripts * Added mkdocs for win build * Putting the failing overage level to 80 to please windows CI, once this lands we're gonna grind coverage ! * Removed mypy from check * Removed useless marker * Removed check script
- Loading branch information
Showing
22 changed files
with
158 additions
and
52 deletions.
There are no files selected for viewing
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
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -e | ||
|
||
if [ -d 'venv' ] ; then | ||
PREFIX="venv/bin/" | ||
else | ||
PREFIX="" | ||
fi | ||
|
||
set -x | ||
|
||
${PREFIX}python setup.py sdist bdist_wheel | ||
${PREFIX}twine check dist/* | ||
${PREFIX}mkdocs build |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -e | ||
|
||
export PREFIX="" | ||
if [ -d 'venv' ] ; then | ||
export PREFIX="venv/bin/" | ||
fi | ||
export SOURCE_FILES="uvicorn tests" | ||
|
||
set -x | ||
|
||
${PREFIX}black --check --diff --target-version=py36 $SOURCE_FILES | ||
${PREFIX}flake8 $SOURCE_FILES | ||
${PREFIX}isort --check --diff --project=uvicorn $SOURCE_FILES |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh -e | ||
|
||
export PREFIX="" | ||
if [ -d 'venv' ] ; then | ||
export PREFIX="venv/bin/" | ||
fi | ||
export SOURCE_FILES="uvicorn tests" | ||
|
||
set -x | ||
|
||
${PREFIX}coverage report --show-missing --skip-covered --fail-under=80 |
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 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,14 +1,18 @@ | ||
#!/bin/sh -e | ||
#!/bin/sh | ||
|
||
export PREFIX="" | ||
if [ -d 'venv' ] ; then | ||
export PREFIX="venv/bin/" | ||
fi | ||
|
||
set -x | ||
set -ex | ||
|
||
PYTHONPATH=. ${PREFIX}pytest --ignore venv --cov=uvicorn --cov=tests --cov-report=term-missing ${@} | ||
${PREFIX}coverage html | ||
${PREFIX}autoflake --recursive uvicorn tests | ||
${PREFIX}flake8 uvicorn tests --ignore=W503,E203,E501,E731 | ||
${PREFIX}black uvicorn tests --check | ||
if [ -z $GITHUB_ACTIONS ]; then | ||
scripts/check | ||
fi | ||
|
||
${PREFIX}pytest $@ | ||
|
||
if [ -z $GITHUB_ACTIONS ]; then | ||
scripts/coverage | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[flake8] | ||
ignore = W503, E203, B305 | ||
max-line-length = 88 | ||
|
||
[mypy] | ||
disallow_untyped_defs = True | ||
ignore_missing_imports = True | ||
|
||
[mypy-tests.*] | ||
disallow_untyped_defs = False | ||
check_untyped_defs = True | ||
|
||
[tool:isort] | ||
profile = black | ||
combine_as_imports = True | ||
known_first_party = uvicorn,tests | ||
known_third_party = click,does_not_exist,gunicorn,h11,httptools,pytest,requests,setuptools,urllib3,uvloop,watchgod,websockets,wsproto | ||
|
||
[tool:pytest] | ||
addopts = --cov=uvicorn --cov=tests -rxXs |
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 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 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 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
Oops, something went wrong.