Skip to content

Commit

Permalink
Minor housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Aug 15, 2022
1 parent f685328 commit a7724a1
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CI

on:
push:
branches: ["main"]
branches: [main]
pull_request:
branches: ["main"]
branches: [main]

env:
FORCE_COLOR: "1" # Make tools pretty.
Expand All @@ -20,11 +20,11 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-beta - 3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
# Use latest Python, so it understands all syntax.
python-version: ${{env.PYTHON_LATEST}}
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}

Expand All @@ -105,7 +105,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}
- run: python -m pip install -e .[dev]
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
*.egg-info
*.pyc
.DS_Store
.cache
.coverage
.coverage.*
.direnv
.tox
.vscode
build
dist
docs/_build
htmlcov
pip-wheel-metadata
14 changes: 12 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---

ci:
autoupdate_schedule: monthly

default_language_version:
python: python3.10

repos:
- repo: https://github.com/psf/black
rev: 22.6.0
Expand All @@ -20,15 +24,21 @@ repos:
- id: isort
additional_dependencies: [toml]

- repo: https://github.com/asottile/yesqa
rev: v1.4.0
hooks:
- id: yesqa

- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
rev: 5.0.4
hooks:
- id: flake8
language_version: python3.10

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: check-toml
- id: check-yaml
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"


[tool.pytest.ini_options]
addopts = "-ra --strict-markers"
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
testpaths = "tests"
filterwarnings = [
Expand All @@ -22,6 +22,7 @@ source = ["src", ".tox/*/site-packages"]

[tool.coverage.report]
show_missing = true
skip_covered = true


[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down Expand Up @@ -145,5 +146,4 @@ def find_meta(meta):
python_requires=PYTHON_REQUIRES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
options={"bdist_wheel": {"universal": "1"}},
)
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ python =
3.7: py37
3.8: py38
3.9: py39, manifest
3.10: py310, docs, lint
3.10: py310, docs, pre-commit
3.11: py311


[tox]
envlist = lint,py37,py38-oldestAttrs,py38,py39,py310,manifest,docs,pypi-description,coverage-report
envlist = pre-commit,py37,py38-oldestAttrs,py38,py39,py310,manifest,docs,pypi-description,coverage-report
isolated_build = true

[testenv:lint]
description = Run all pre-commit hooks.
basepython = python3.10
skip_install = true
deps = pre-commit
passenv = HOMEPATH # needed on Windows
commands = pre-commit run --all-files
commands = pre-commit run --all-files --show-diff-on-failure

[testenv]
description = Run tests.
Expand Down

0 comments on commit a7724a1

Please sign in to comment.