diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index f50e8aa9..fe654d9f 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -8,15 +8,20 @@ jobs: - uses: actions/setup-python@v4 with: python-version: 3.x - check-latest: true - run: pip install --upgrade pip setuptools wheel - - run: pip install black codespell mypy pytest ruff safety - - run: ruff --format=github . + - run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear + flake8-comprehensions isort mypy pytest pyupgrade safety + - run: bandit --recursive --skip B101,B105,B106,B107,B324 . - run: black --check . || true - - run: codespell # --ignore-words-list="" --skip="*.css,*.js,*.lock" - - run: pip install -r requirements-test.txt - - run: pip install --editable . + - run: codespell || true # --ignore-words-list="" --skip="*.css,*.js,*.lock" + - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + - run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 + --show-source --statistics + - run: isort --check-only --profile black . || true + - run: pip install -r requirements.txt || pip install --editable . || true - run: mkdir --parents --verbose .mypy_cache - run: mypy --ignore-missing-imports --install-types --non-interactive . || true - - run: pytest + - run: pytest . || true + - run: pytest --doctest-modules . || true + - run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true - run: safety check diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml new file mode 100644 index 00000000..c7af97ad --- /dev/null +++ b/.github/workflows/python-build.yml @@ -0,0 +1,41 @@ +name: Python Tests +run-name: Run Tests by ${{ github.actor }} +on: [push] +jobs: + tests: + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + strategy: + matrix: + python: ["3.8", "3.9", "3.10", "3.11"] + runs-on: ubuntu-latest + steps: + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Check out repository code + uses: actions/checkout@v3 + - name: Install prereq + run: pip install tox coveralls + - name: Run python tests + run: tox -e ${{ matrix.python }} + - name: Coveralls + run: coveralls + docs: + strategy: + matrix: + toxenv: ["docs", "readme"] + runs-on: ubuntu-latest + steps: + - run: sudo apt install -y graphviz + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Check out repository code + uses: actions/checkout@v3 + - name: Install prereq + run: pip install tox + - name: Run python tests + run: tox -e ${{ matrix.toxenv }} diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 00000000..89262709 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,32 @@ +name: Production deploy +on: + workflow_run: + workflows: ["Python Tests"] + types: + - completed +jobs: + pypi-publish: + if: | + ${{ github.event.workflow_run.conclusion == 'success' }} && + ${{ github.ref_type == 'tag' }} + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/oauthlib + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install prereq + run: pip install wheel + - name: Build python package + run: python setup.py build + - name: Package python package + run: python setup.py sdist bdist_wheel + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6b5e6e30..00000000 --- a/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -language: python -python: 3.8 -os: linux -dist: bionic -cache: pip -jobs: - include: - - python: "3.6" - env: TOXENV=py36 - - python: "3.7" - env: TOXENV=py37,docs - - python: "3.8" - env: TOXENV=py38,bandit,readme - - python: "3.9" - env: TOXENV=py39 - - python: "3.10.2" - env: TOXENV=py310 - - python: "3.11-dev" - env: TOXENV=py311 - - python: "pypy3" - env: TOXENV=pypy3 - allow_failures: - - python: "3.11-dev" -before_install: - - sudo apt-get install graphviz - - python -m pip install --upgrade pip "setuptools<60.9" - - python -m pip install tox coveralls - - if [ "$TOXENV" == "pypy3" ]; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && source $HOME/.cargo/env ; fi -script: tox -after_success: COVERALLS_PARALLEL=true coveralls -notifications: - webhooks: - urls: - - https://coveralls.io/webhook - - https://webhooks.gitter.im/e/6008c872bf0ecee344f4 - on_success: always - on_failure: always - on_start: never -deploy: - - provider: releases - token: - secure: "eqEWOzKWZCuvd1a77CA03OX/HCrsYlsu1/Sz/RhXQIEhKz6tKp10KGw9zr57bHAIl0OfJFK9k63lI2HOctAmwkKeeQ4HdNqw4pHFa8Gk3liGp31KSmshVtHX8Rtn0DuFA028Wm7w5n+fOVc8tJVU/UsKjsfsAzRHnQjMamckoXU=" - skip_cleanup: true - on: - tags: true - all_branches: true - condition: $TOXENV = py36 - repo: oauthlib/oauthlib - - provider: pypi - username: JonathanHuot - password: - secure: "OozNM16flVLvqDoNzmoTENchhS1w0/dEJZvXBQK2KWmh8fyGj2UZus1vkl6bA5V3Yu9MZLYFpDcltl/qraY3Up6iXQpwKz4q+ICygAudYM2kJ5l8ZEe+wy2FikWbD6LkXf5uKIJJnPNSC8AI86ZyxM/XZxbYjj/+jXyJ1YFZwwQ=" - distributions: sdist bdist_wheel - on: - tags: true - all_branches: true - condition: $TOXENV = py36 - repo: oauthlib/oauthlib diff --git a/Makefile b/Makefile index b1fbb39d..2d2e1ed7 100644 --- a/Makefile +++ b/Makefile @@ -81,4 +81,4 @@ dance: .DEFAULT_GOAL := all .PHONY: clean test bottle dance django flask requests -all: clean test bottle dance django flask requests +all: test bottle dance django flask requests diff --git a/tox.ini b/tox.ini index 4eb0813b..3195c771 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ +# require tox>=4 [tox] -envlist = py36,py37,py38,py39,py310,py311,pypy3,docs,readme,bandit,isort +envlist = py38,py39,py310,py311,pypy3,docs,readme,bandit,isort [testenv] deps= @@ -7,33 +8,32 @@ deps= commands= pytest --cov=oauthlib tests/ - # tox -e docs to mimic readthedocs build. # as of today, RTD is using python3.7 and doesn't run "setup.py install" [testenv:docs] -basepython=python3.7 +basepython=python3.11 skipsdist=True deps= sphinx sphinx_rtd_theme changedir=docs -whitelist_externals=make +allowlist_externals=make commands=make clean html # tox -e readme to mimic PyPI long_description check [testenv:readme] -basepython=python3.8 +basepython=python3.11 deps=twine>=1.12.0 -whitelist_externals=echo +allowlist_externals=echo commands= - twine check .tox/dist/* + twine check .tox/.pkg/dist/* [testenv:bandit] -basepython=python3.8 +basepython=python3.11 skipsdist=True deps=bandit commands=bandit -b bandit.json -r oauthlib/ -whitelist_externals=bandit +allowlist_externals=bandit [testenv:isort] basepython = python3.8 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy