Skip to content

Commit

Permalink
update libraries, fix tests, and support py3.11
Browse files Browse the repository at this point in the history
update libraries, fix tests, and support py3.11
  • Loading branch information
jacobdonenfeld authored Dec 20, 2022
2 parents 0f4cb16 + fa5421f commit bac6496
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout code 🛎️
uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ build/*
*.egg-info
dist
.DS_Store
*/.DS_Store
*/.DS_Store
venv
45 changes: 24 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,27 @@ repos:
rev: 6.0.0
hooks:
- id: flake8
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
require_serial: true
language: system
types: [ python ]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Link to your config file
"--exit-zero"
]
- id: py.test
name: py.test
language: system
entry: sh -c py.test --cov
pass_filenames: false
always_run: true
# - repo: local
# hooks:
# - id: pylint
# stages: [commit]
# name: pylint
# entry: pylint
# require_serial: true
# language: system
# types: [ python ]
# args:
# [
# "-rn", # Only display messages
# "-sn", # Don't display the score
# "--rcfile=.pylintrc", # Link to your config file
# "--exit-zero"
# ]
# - id: py.test
# stages: [ commit ]
# name: py.test
# additional_dependencies: ['pytest']
# language: python
# entry: py.test
# pass_filenames: false
# always_run: true
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[pytest]
addopts = --cov=pre_commit_hooks --cov-report term-missing --cov-fail-under 65 --no-cov-on-fail
addopts = --cov=pre_commit_hooks --cov-fail-under 65 --no-cov-on-fail --cov-report term-missing
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
covdefaults
pre-commit
pylint==2.15.5
pylint
pytest
pytest-cov
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
GitPython==3.1.29
lenses~=1.1.0
pytest==7.2.0
python-gitlab==3.11.0
python-gitlab==3.12.0
PyYAML~=6.0
requests~=2.28.1
setuptools==65.5.0
setuptools==65.6.3
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ long_description=README.md
classifiers =
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -30,7 +29,7 @@ install_requires =
python-gitlab
requests
GitPython
python_requires = >=3.7
python_requires = >=3.8

[options.packages.find]
exclude =
Expand Down
18 changes: 12 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
[tox]
envlist = python3.7,py38,py39,py310,pre-commit
envlist = clean,py38,py39,py310,py311,pre-commit

[testenv]
deps =
-r requirements-dev.txt
-r requirements.txt

depends =
{py38,py39,py310}: clean
setenv =
GIT_AUTHOR_NAME = "test"
GIT_COMMITTER_NAME = "test"
GIT_AUTHOR_EMAIL = "[email protected]"
GIT_COMMITTER_EMAIL = "[email protected]"
commands =
coverage erase
coverage run -m pytest {posargs:tests}
coverage report
pytest --cov --cov-append --cov-report=term-missing {posargs:tests}

[testenv:clean]
deps = pytest-cov
covdefaults
coverage
skip_install = true
commands = coverage erase

[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
commands = pre-commit run --all-files --verbose

[pep8]
ignore=E265,E501,W504,E203,F841

0 comments on commit bac6496

Please sign in to comment.