Skip to content

Commit 2082563

Browse files
Kriechipgjones
authored andcommitted
unify config structure with other python-hyper projects
1 parent 1b172e3 commit 2082563

File tree

7 files changed

+44
-32
lines changed

7 files changed

+44
-32
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
- 3.6
1717
- 3.7
1818
- 3.8
19+
- pypy3
1920

2021
steps:
21-
- uses: actions/checkout@master
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v1
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-python@v2
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install tox
@@ -33,6 +33,9 @@ jobs:
3333
- name: Test with tox
3434
run: |
3535
tox --parallel 0
36+
- uses: codecov/codecov-action@v1
37+
with:
38+
file: ./coverage.xml
3639

3740
autobahn:
3841
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ __pycache__
44
*.egg-info
55
.cache
66
.coverage
7+
coverage.xml
78
*.pyc
89
*.pyo
910
.pytest_cache

MANIFEST.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
graft src
12
graft compliance
23
graft example
34
graft docs
45
graft test
5-
graft src/wsproto
66
prune docs/build
7-
prune compliance/autobahntestsuite-venv
87
prune compliance/reports
8+
prune compliance/auto-tests-server-config.json
9+
prune compliance/auto-tests-client-config.json
10+
prune compliance/autobahntestsuite-venv
911
include README.rst LICENSE CHANGELOG.rst tox.ini
10-
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
12+
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store .coverage

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Pure Python, pure state-machine WebSocket implementation
44

55
.. image:: https://github.com/python-hyper/wsproto/workflows/CI/badge.svg
66
:target: https://github.com/python-hyper/wsproto/actions
7-
:alt: Build status
7+
:alt: Build Status
8+
.. image:: https://codecov.io/gh/python-hyper/wsproto/branch/master/graph/badge.svg
9+
:target: https://codecov.io/gh/python-hyper/wsproto
10+
:alt: Code Coverage
811
.. image:: https://readthedocs.org/projects/wsproto/badge/?version=latest
912
:target: https://wsproto.readthedocs.io/en/latest/
1013
:alt: Documentation Status

setup.cfg

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ universal = 1
33

44
[tool:pytest]
55
testpaths = test
6-
addopts = --capture=no --color=yes --showlocals
76

87
[coverage:run]
9-
branch = False
8+
branch = True
9+
source = wsproto
1010

1111
[coverage:report]
1212
show_missing = True
@@ -16,9 +16,8 @@ exclude_lines =
1616

1717
[coverage:paths]
1818
source =
19-
wsproto
20-
.tox/*/lib/*/site-packages/wsproto
21-
.tox/*/site-packages/wsproto
19+
src
20+
.tox/*/site-packages
2221

2322
[isort]
2423
combine_as_imports=True

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@
3232
version=version,
3333
description='WebSockets state-machine based protocol implementation',
3434
long_description=long_description,
35+
long_description_content_type="text/x-rst",
3536
author='Benno Rice',
3637
author_email='[email protected]',
3738
url='https://github.com/python-hyper/wsproto/',
38-
packages=find_packages("src"),
39+
packages=find_packages(where="src"),
40+
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
3941
package_dir={"": "src"},
40-
package_data={'': ['LICENSE', 'README.rst']},
4142
python_requires=">=3.6.1",
4243
include_package_data=True,
43-
license='MIT',
44+
license='MIT License',
4445
classifiers=[
4546
'Development Status :: 5 - Production/Stable',
4647
'Intended Audience :: Developers',

tox.ini

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
[tox]
2-
envlist = py36, py37, py38, pypy, format, mypy, lint, docs, packaging
2+
envlist = py36, py37, py38, pypy3, format, mypy, lint, docs, packaging
33

44
[gh-actions]
55
python =
66
3.6: py36
77
3.7: py37
8-
3.8: py38, format, mypy, lint, docs, package
9-
pypy: pypy
8+
3.8: py38, format, mypy, lint, docs, packaging
9+
pypy3: pypy3
1010

1111
[testenv]
12+
passenv =
13+
GITHUB_*
1214
deps =
1315
pytest==5.4.3
1416
pytest-cov==2.10.0
17+
pytest-xdist==1.33.0
1518
commands =
16-
pytest --cov=wsproto {posargs}
19+
pytest --cov-report=xml --cov-report=term --cov=wsproto {posargs}
1720

18-
[testenv:pypy]
21+
[testenv:pypy3]
1922
# temporarily disable coverage testing on PyPy due to performance problems
2023
commands = pytest {posargs}
2124

@@ -30,14 +33,15 @@ deps =
3033
black==19.10b0
3134
isort==5.0.3
3235
commands =
33-
black --check --diff src/wsproto/ test/ example/ compliance/
34-
isort --check --diff src/wsproto/ test/ example/ compliance/
36+
black --check --diff src/ test/ example/ compliance/
37+
isort --check --diff src/ test/ example/ compliance/
3538

3639
[testenv:mypy]
3740
basepython = python3.8
38-
deps = mypy
41+
deps =
42+
mypy==0.782
3943
commands =
40-
mypy src/wsproto/ test/ example/
44+
mypy src/ test/ example/
4145

4246
[testenv:lint]
4347
basepython = python3.8
@@ -56,13 +60,12 @@ commands =
5660
make html
5761

5862
[testenv:packaging]
59-
basepython=python3.8
63+
basepython = python3.8
6064
deps =
61-
check-manifest==0.42
62-
readme-renderer==26.0
63-
twine==3.2.0
65+
check-manifest==0.42
66+
readme-renderer==26.0
67+
twine==3.2.0
6468
commands =
65-
check-manifest
66-
python setup.py check --metadata --strict
67-
python setup.py sdist
68-
twine check dist/*
69+
check-manifest
70+
python setup.py sdist
71+
twine check dist/*

0 commit comments

Comments
 (0)