-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
Showing
59 changed files
with
1,352 additions
and
1,470 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,6 +1,3 @@ | ||
[flake8] | ||
ignore = E203, E266, E501, W503 | ||
max-line-length = 80 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4,B9 | ||
exclude = docs/conf.py,.tox | ||
max-line-length = 79 | ||
extend-ignore = E203, E501 |
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,40 +1,87 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pip install pytest | ||
pytest | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
# Allow rebuilds via API. | ||
repository_dispatch: | ||
types: rebuild | ||
|
||
jobs: | ||
tests: | ||
name: "Python ${{ matrix.python-version }}" | ||
runs-on: "ubuntu-latest" | ||
env: | ||
USING_COVERAGE: '3.8' | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.5", "3.6", "3.7", "3.8"] | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v1" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "Install dependencies" | ||
run: | | ||
set -xe | ||
python -VV | ||
python -m site | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions | ||
- name: "Run tox targets for ${{ matrix.python-version }}" | ||
run: "python -m tox" | ||
|
||
- name: "Combine coverage" | ||
run: | | ||
set -xe | ||
python -m coverage combine | ||
python -m coverage xml | ||
if: "contains(env.USING_COVERAGE, matrix.python-version)" | ||
- name: "Upload coverage to Codecov" | ||
if: "contains(env.USING_COVERAGE, matrix.python-version)" | ||
uses: "codecov/codecov-action@v1" | ||
with: | ||
fail_ci_if_error: true | ||
|
||
package: | ||
name: "Build & verify package" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v1" | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: "Install pep517 and twine" | ||
run: "python -m pip install pep517 twine" | ||
- name: "Build package" | ||
run: "python -m pep517.build --source --binary ." | ||
- name: "List result" | ||
run: "ls -l dist" | ||
- name: "Check long_description" | ||
run: "python -m twine check dist/*" | ||
|
||
install-dev: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
|
||
name: "Verify dev env" | ||
runs-on: "${{ matrix.os }}" | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v1" | ||
with: | ||
python-version: "3.8" | ||
- name: "Install in dev mode" | ||
run: "python -m pip install -e .[dev]" | ||
- name: "Import package" | ||
run: "python -c 'import jwt; print(jwt.__version__)'" |
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,61 +1,12 @@ | ||
# Created by https://www.gitignore.io | ||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
*.egg-info | ||
*.pyc | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
.pytest_cache | ||
.coverage* | ||
.mypy_cache | ||
.pytest_cache | ||
.tox | ||
build | ||
dist | ||
docs/_build/ | ||
htmlcov | ||
pip-wheel-metadata |
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,11 @@ | ||
--- | ||
version: 2 | ||
python: | ||
# Keep version in sync with tox.ini (docs and gh-actions). | ||
version: 3.7 | ||
|
||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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.