Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 19, 2022
2 parents e05a087 + 47c2cb3 commit b6962ce
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 27 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
omit =
# leading `*/` for pytest-dev/pytest-cov#456
*/.tox/*
*/pep517-build-env-*

[report]
show_missing = True
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ max_line_length = 88
[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.rst]
indent_style = space
35 changes: 25 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,53 @@ jobs:
strategy:
matrix:
python:
- 3.6
- 3.9
- "3.10"
- 3.7
- '3.10'
- '3.11'
platform:
- ubuntu-latest
- macos-latest
# disabled due to #58
# - windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python }}-dev
- name: Install tox
run: |
python -m pip install tox
- name: Run tests
run: tox

check: # This job does nothing and is only used for the branch protection
if: always()

needs:
- test

runs-on: ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

release:
needs: test
needs:
- check
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11-dev"
- name: Install tox
run: |
python -m pip install tox
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.6.0
hooks:
- id: black
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.. image:: https://readthedocs.org/projects/configparser/badge/?version=latest
:target: https://configparser.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/badge/skeleton-2021-informational
.. image:: https://img.shields.io/badge/skeleton-2022-informational
:target: https://blog.jaraco.com/skeleton

.. image:: https://tidelift.com/badges/package/pypi/configparser
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
),
dict(
pattern=r'PEP[- ](?P<pep_number>\d+)',
url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
url='https://peps.python.org/pep-{pep_number:0>4}/',
),
dict(
pattern=r'Python #(?P<python>\d+)',
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ skip-string-normalization = true

[tool.setuptools_scm]

[pytest.enabler.black]
[tool.pytest-enabler.black]
addopts = "--black"

[pytest.enabler.mypy]
[tool.pytest-enabler.mypy]
addopts = "--mypy"

[pytest.enabler.flake8]
[tool.pytest-enabler.flake8]
addopts = "--flake8"

[pytest.enabler.cov]
[tool.pytest-enabler.cov]
addopts = "--cov"
12 changes: 10 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ doctest_optionflags=ALLOW_UNICODE ELLIPSIS
filterwarnings=
# Suppress deprecation warning in flake8
ignore:SelectableGroups dict interface is deprecated::flake8
# Suppress deprecation warning in pypa/packaging#433
ignore:The distutils package is deprecated::packaging.tags

# shopkeep/pytest-black#55
ignore:<class 'pytest_black.BlackItem'> is not using a cooperative constructor:pytest.PytestDeprecationWarning
ignore:The \(fspath. py.path.local\) argument to BlackItem is deprecated.:pytest.PytestDeprecationWarning
ignore:BlackItem is an Item subclass and should not be a collector:pytest.PytestWarning

# tholo/pytest-flake8#83
ignore:<class 'pytest_flake8.Flake8Item'> is not using a cooperative constructor:pytest.PytestDeprecationWarning
ignore:The \(fspath. py.path.local\) argument to Flake8Item is deprecated.:pytest.PytestDeprecationWarning
ignore:Flake8Item is an Item subclass and should not be a collector:pytest.PytestWarning

# workaround for https://github.com/jaraco/configparser/issues/42
ignore:You passed a bytestring:DeprecationWarning:backports.configparser
Expand Down
10 changes: 6 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package_dir =
=src
py_modules = configparser
include_package_data = true
python_requires = >=3.6
python_requires = >=3.7
install_requires =

[options.packages.find]
Expand All @@ -41,22 +41,24 @@ testing =
pytest >= 6
pytest-checkdocs >= 2.4
pytest-flake8
# workaround for tholo/pytest-flake8#87
flake8 < 5
pytest-black >= 0.3.7; \
# workaround for jaraco/skeleton#22
python_implementation != "PyPy"
pytest-cov
pytest-mypy; \
pytest-mypy >= 0.9.1; \
# workaround for jaraco/skeleton#22
python_implementation != "PyPy"
pytest-enabler >= 1.0.1
pytest-enabler >= 1.3

# local
types-backports

docs =
# upstream
sphinx
jaraco.packaging >= 8.2
jaraco.packaging >= 9
rst.linker >= 1.9
jaraco.tidelift >= 1.4

Expand Down
4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit b6962ce

Please sign in to comment.