-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf8ebe0
commit 0176357
Showing
25 changed files
with
232 additions
and
198 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,2 @@ | ||
[run] | ||
source = aiohttp_devtools | ||
branch = True | ||
concurrency = multiprocessing | ||
omit = | ||
# __main__ is trivial and hard to test properly | ||
*/__main__.py | ||
|
||
[report] | ||
precision = 2 | ||
exclude_lines = | ||
pragma: no cover | ||
|
||
raise NotImplementedError | ||
raise NotImplemented |
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,130 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '[0-9].[0-9]+' # matches to backport branches, e.g. 3.6 | ||
tags: [ 'v*' ] | ||
pull_request: | ||
branches: | ||
- master | ||
- '[0-9].[0-9]+' | ||
schedule: | ||
- cron: '0 6 * * *' # Daily 6AM UTC build | ||
|
||
|
||
jobs: | ||
|
||
lint: | ||
name: Linter | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Cache PyPI | ||
uses: actions/cache@v2 | ||
with: | ||
key: pip-lint-${{ hashFiles('requirements-dev.txt') }} | ||
path: ~/.cache/pip | ||
restore-keys: | | ||
pip-lint- | ||
- name: Install dependencies | ||
uses: py-actions/py-dependency-install@v2 | ||
with: | ||
path: requirements-dev.txt | ||
- name: Install itself | ||
run: | | ||
pip install . | ||
- name: Lint | ||
run: | | ||
make lint | ||
- name: Prepare twine checker | ||
run: | | ||
pip install -U twine wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Run twine checker | ||
run: | | ||
twine check dist/* | ||
test: | ||
name: Test | ||
needs: lint | ||
strategy: | ||
matrix: | ||
pyver: [3.6, 3.7] | ||
os: [ubuntu, macos] | ||
#include: | ||
# - pyver: pypy3 | ||
# os: ubuntu | ||
runs-on: ${{ matrix.os }}-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Python ${{ matrix.pyver }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" # - name: Cache | ||
- name: Cache PyPI | ||
uses: actions/cache@v2 | ||
with: | ||
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-${{ hashFiles('requirements-dev.txt') }} | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
restore-keys: | | ||
pip-ci-${{ runner.os }}-${{ matrix.pyver }}- | ||
- name: Install dependencies | ||
uses: py-actions/py-dependency-install@v2 | ||
with: | ||
path: requirements-dev.txt | ||
- name: Install JS dependencies | ||
run: grablib | ||
- name: Run unittests | ||
env: | ||
COLOR: 'yes' | ||
run: | | ||
pytest | ||
python -m coverage xml | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
flags: unit | ||
fail_ci_if_error: false | ||
|
||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
needs: test | ||
# Run only on pushing a tag | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | ||
python -m pip install -U pip wheel twine | ||
- name: Install JS dependencies | ||
run: grablib | ||
- name: Make dists | ||
run: | ||
python setup.py sdist bdist_wheel | ||
- name: PyPI upload | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: pAzJhAD5HNzxvbNg/UwquwPXOp6V27gi4MpqCs6mK2Hy9h3Ii8vVWzEUx06v2aqT5b3P7FDBRW8+t9oL+aS/dZxeOtA/jNzROxMhFtRbpv1F/Mvd6ocz7yb3yg9WUlc7bhuyN6GUxsw4esATElQygqZucXRGsg+yauiTTd2X1CK6zrTz7/5lhF5H41oMzBKBZgvEUjDzaTs+C+B0bEifADVsI8QDa4EUTzCc93qf2z1jllDd/Jww9MK6xdBJJCoXjfBtWSjnoBANN/Ikthy8yY2PXvbLKH7K4Ri+ED72tLXThuTEsmquj20TnR30Hpm0LjwfdZ1+2O0X0PMyjMIRoATR0D9XdSP36FZs19zyRRFwHYKxZvXKSv+rZxz1rZYbbPojNW/498zlWcI8R9TxqPg/6dnrO1StnltLmN784AVBQr172CX/Ji3BF1bVytgdKqstGVN6d1JJWPuFVNfGpVHJJZEEuOBndK7yoSSV4zMva5wXplETVyGWfPiqvQCtylq8IatXbFxA0trCMW1kQEwBMBLbYrqx6ZIHQJ4Z46ng7OIYdRPod7fkK7e0lXU7OexfXad/UOWfkayOG1C93MWxeVho8ZQrBCdrHd1a5iujAfW8pk7Al8f2gS8L7nZTXUlkWK2ppX9PDOv1O0frtFc1prje+9AzROFC8UXxJk8= | ||
run: | | ||
twine upload dist/* |
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,46 @@ | ||
[mypy] | ||
files = aiohttp_devtools, tests | ||
check_untyped_defs = True | ||
follow_imports_for_stubs = True | ||
#disallow_any_decorated = True | ||
disallow_any_generics = True | ||
#disallow_incomplete_defs = True | ||
disallow_subclassing_any = True | ||
#disallow_untyped_calls = True | ||
disallow_untyped_decorators = True | ||
#disallow_untyped_defs = True | ||
implicit_reexport = False | ||
no_implicit_optional = True | ||
show_error_codes = True | ||
strict_equality = True | ||
warn_incomplete_stub = True | ||
warn_redundant_casts = True | ||
warn_unreachable = True | ||
warn_unused_ignores = True | ||
disallow_any_unimported = True | ||
warn_return_any = True | ||
|
||
[mypy-tests.*] | ||
ignore_errors = True | ||
disallow_any_decorated = False | ||
disallow_untyped_calls = False | ||
disallow_untyped_defs = False | ||
|
||
[mypy-aiohttp_devtools.start.*] | ||
ignore_errors = True | ||
|
||
[mypy-aiohttp_devtools.logs] | ||
ignore_errors = True | ||
|
||
[mypy-aiohttp_devtools.runserver.*] | ||
ignore_errors = True | ||
|
||
|
||
[mypy-aiohttp_debugtoolbar.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-devtools.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pygments.*] | ||
ignore_missing_imports = True |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
from .version import VERSION | ||
|
||
# to match aiohttp | ||
__version__ = str(VERSION) | ||
__version__ = "0.13.1" |
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,3 +1,4 @@ | ||
# flake8: noqa | ||
from .config import INFER_HOST | ||
from .main import run_app, runserver, serve_static | ||
|
||
__all__ = ("INFER_HOST", "run_app", "runserver", "serve_static") |
Oops, something went wrong.