Skip to content

Commit

Permalink
unify config structure with other python-hyper projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi authored and pgjones committed Jul 30, 2020
1 parent 1b172e3 commit 2082563
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 32 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- 3.6
- 3.7
- 3.8
- pypy3

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
Expand All @@ -33,6 +33,9 @@ jobs:
- name: Test with tox
run: |
tox --parallel 0
- uses: codecov/codecov-action@v1
with:
file: ./coverage.xml

autobahn:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ __pycache__
*.egg-info
.cache
.coverage
coverage.xml
*.pyc
*.pyo
.pytest_cache
Expand Down
8 changes: 5 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
graft src
graft compliance
graft example
graft docs
graft test
graft src/wsproto
prune docs/build
prune compliance/autobahntestsuite-venv
prune compliance/reports
prune compliance/auto-tests-server-config.json
prune compliance/auto-tests-client-config.json
prune compliance/autobahntestsuite-venv
include README.rst LICENSE CHANGELOG.rst tox.ini
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store .coverage
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Pure Python, pure state-machine WebSocket implementation

.. image:: https://github.com/python-hyper/wsproto/workflows/CI/badge.svg
:target: https://github.com/python-hyper/wsproto/actions
:alt: Build status
:alt: Build Status
.. image:: https://codecov.io/gh/python-hyper/wsproto/branch/master/graph/badge.svg
:target: https://codecov.io/gh/python-hyper/wsproto
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/wsproto/badge/?version=latest
:target: https://wsproto.readthedocs.io/en/latest/
:alt: Documentation Status
Expand Down
9 changes: 4 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ universal = 1

[tool:pytest]
testpaths = test
addopts = --capture=no --color=yes --showlocals

[coverage:run]
branch = False
branch = True
source = wsproto

[coverage:report]
show_missing = True
Expand All @@ -16,9 +16,8 @@ exclude_lines =

[coverage:paths]
source =
wsproto
.tox/*/lib/*/site-packages/wsproto
.tox/*/site-packages/wsproto
src
.tox/*/site-packages

[isort]
combine_as_imports=True
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
version=version,
description='WebSockets state-machine based protocol implementation',
long_description=long_description,
long_description_content_type="text/x-rst",
author='Benno Rice',
author_email='benno@jeamland.net',
url='https://github.com/python-hyper/wsproto/',
packages=find_packages("src"),
packages=find_packages(where="src"),
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
package_dir={"": "src"},
package_data={'': ['LICENSE', 'README.rst']},
python_requires=">=3.6.1",
include_package_data=True,
license='MIT',
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand Down
37 changes: 20 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
[tox]
envlist = py36, py37, py38, pypy, format, mypy, lint, docs, packaging
envlist = py36, py37, py38, pypy3, format, mypy, lint, docs, packaging

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, format, mypy, lint, docs, package
pypy: pypy
3.8: py38, format, mypy, lint, docs, packaging
pypy3: pypy3

[testenv]
passenv =
GITHUB_*
deps =
pytest==5.4.3
pytest-cov==2.10.0
pytest-xdist==1.33.0
commands =
pytest --cov=wsproto {posargs}
pytest --cov-report=xml --cov-report=term --cov=wsproto {posargs}

[testenv:pypy]
[testenv:pypy3]
# temporarily disable coverage testing on PyPy due to performance problems
commands = pytest {posargs}

Expand All @@ -30,14 +33,15 @@ deps =
black==19.10b0
isort==5.0.3
commands =
black --check --diff src/wsproto/ test/ example/ compliance/
isort --check --diff src/wsproto/ test/ example/ compliance/
black --check --diff src/ test/ example/ compliance/
isort --check --diff src/ test/ example/ compliance/

[testenv:mypy]
basepython = python3.8
deps = mypy
deps =
mypy==0.782
commands =
mypy src/wsproto/ test/ example/
mypy src/ test/ example/

[testenv:lint]
basepython = python3.8
Expand All @@ -56,13 +60,12 @@ commands =
make html

[testenv:packaging]
basepython=python3.8
basepython = python3.8
deps =
check-manifest==0.42
readme-renderer==26.0
twine==3.2.0
check-manifest==0.42
readme-renderer==26.0
twine==3.2.0
commands =
check-manifest
python setup.py check --metadata --strict
python setup.py sdist
twine check dist/*
check-manifest
python setup.py sdist
twine check dist/*

0 comments on commit 2082563

Please sign in to comment.