Skip to content

Commit

Permalink
Coverage per python version (#22)
Browse files Browse the repository at this point in the history
* pre-commit autoupdate

* support 3.12

* fixed typo

* addressed deprecation

* added flag per python version

* skip interrogate from automated testing
  • Loading branch information
yarnabrina authored Oct 8, 2023
1 parent 16d9f94 commit 12c503d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
python-version:
- "3.10"
- "3.11"
- "3.12"
runs-on: ${{ matrix.runner-platform }}
steps:
- name: checkout commit
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
python-version:
- "3.10"
- "3.11"
- "3.12"
max-parallel: 2
runs-on: ${{ matrix.runner-platform }}
steps:
Expand All @@ -48,3 +49,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage_xml_report.xml
flags: ${{ matrix.python-version }}
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand All @@ -22,13 +22,13 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- --py310-plus
- repo: https://github.com/pycqa/autoflake
rev: v2.2.0
rev: v2.2.1
hooks:
- id: autoflake
args:
Expand All @@ -42,7 +42,7 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
args:
Expand Down Expand Up @@ -77,7 +77,7 @@ repos:
stages:
- manual
- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a7
rev: v3.0.1
hooks:
- id: pylint
args:
Expand All @@ -88,21 +88,21 @@ repos:
stages:
- manual
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.323
rev: v1.1.330.post0
hooks:
- id: pyright
pass_filenames: false
stages:
- manual
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.284
rev: v0.0.292
hooks:
- id: ruff
args:
- src
pass_filenames: false
- repo: https://github.com/jendrikseipp/vulture
rev: v2.8
rev: v2.10
hooks:
- id: vulture
pass_filenames: false
Expand Down Expand Up @@ -142,15 +142,15 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.13.1
rev: 1.2.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.13
rev: v0.14
hooks:
- id: validate-pyproject
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
default_language_version:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endef

## help
## list all wrapper targets
## show documentaions of wrapper targets
## show documentations of wrapper targets
.PHONY: help
help: Makefile
@sed -n 's/^## //p' $<
Expand Down
16 changes: 1 addition & 15 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import nox

PYTHON_DEFAULT_VERSION = "3.10"
PYTHON_VERSIONS = ["3.10", "3.11"]
PYTHON_VERSIONS = ["3.10", "3.11", "3.12"]

SOURCE_DIRECTORY = pathlib.Path("src")
DIST_DIRECTORY = pathlib.Path("dist")
Expand Down Expand Up @@ -157,20 +157,6 @@ def flake8(session: nox.Session) -> None:
)


@LINT_SESSION_DECORATOR
def interrogate(session: nox.Session) -> None:
"""Run interrogate.
Parameters
----------
session : nox.Session
nox Session object
"""
session.install("interrogate")

session.run("interrogate", str(SOURCE_DIRECTORY))


@FORMAT_SESSION_DECORATOR
def isort(session: nox.Session) -> None:
"""Run isort.
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ authors = [
{ name = "First Author", email = "[email protected]" },
{ name = "Second Author", email = "[email protected]" },
]
requires-python = ">=3.10"
requires-python = ">=3.10, <3.13"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Flake8",
Expand All @@ -42,6 +42,7 @@ classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries",
Expand Down Expand Up @@ -179,7 +180,6 @@ extend-exclude = [
"*.pyi",
]
fix = true
format = "grouped"
ignore = [
"ANN401",
"D203",
Expand All @@ -188,6 +188,7 @@ ignore = [
]
ignore-init-module-imports = true
line-length = 99
output-format = "grouped"
select = [
"F",
"E",
Expand Down

0 comments on commit 12c503d

Please sign in to comment.