Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 13, 2022
2 parents e229041 + fea1e7c commit 5be8a05
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 238 deletions.
5 changes: 4 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[run]
omit = .tox/*
omit =
# leading `*/` for pytest-dev/pytest-cov#456
*/.tox/*
*/pep517-build-env-*

[report]
show_missing = True
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
insert_final_newline = true
end_of_line = lf

[*.py]
indent_style = space
max_line_length = 88

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.rst]
indent_style = space
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
27 changes: 0 additions & 27 deletions .github/workflows/automerge.yml

This file was deleted.

39 changes: 31 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ jobs:
test:
strategy:
matrix:
python: [3.6, 3.8, 3.9]
platform: [ubuntu-latest, macos-latest, windows-latest]
python:
# Build on pre-releases until stable, then stable releases.
# actions/setup-python#213
- ~3.7.0-0
- ~3.10.0-0
- ~3.11.0-0
platform:
- ubuntu-latest
- macos-latest
- 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@v3
with:
python-version: ${{ matrix.python }}
- name: Install tox
Expand All @@ -21,17 +29,32 @@ jobs:
- 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@v3
with:
python-version: 3.9
python-version: "3.10"
- name: Install tox
run: |
python -m pip install tox
Expand Down
7 changes: 1 addition & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.6.0
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: v1.9.1
hooks:
- id: blacken-docs
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@

.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest
.. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest
.. image:: https://img.shields.io/badge/skeleton-2022-informational
:target: https://blog.jaraco.com/skeleton
12 changes: 11 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@
),
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}/',
),
],
)
}

# Be strict about any broken references:
nitpicky = True

# Include Python intersphinx mapping to prevent failures
# jaraco/skeleton#51
extensions += ['sphinx.ext.intersphinx']
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
}
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"

[tool.black]
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"
16 changes: 12 additions & 4 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
norecursedirs=dist build .tox .eggs
addopts=--doctest-modules
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
# workaround for warning pytest-dev/pytest#6178
junit_family=xunit2
filterwarnings=
# https://github.com/pytest-dev/pytest/issues/6928
ignore:direct construction of .*Item has been deprecated:DeprecationWarning
# Suppress deprecation warning in flake8
ignore:SelectableGroups dict interface is deprecated::flake8

# 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
21 changes: 11 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[metadata]
license_files =
LICENSE
name = jaraco.classes
author = Jason R. Coombs
author_email = [email protected]
Expand All @@ -17,10 +15,9 @@ classifiers =
[options]
packages = find_namespace:
include_package_data = true
python_requires = >=3.6
python_requires = >=3.7
install_requires =
more_itertools
setup_requires = setuptools_scm[toml] >= 3.4.1

[options.packages.find]
exclude =
Expand All @@ -32,20 +29,24 @@ exclude =
[options.extras_require]
testing =
# upstream
pytest >= 3.5, !=3.7.3
pytest-checkdocs >= 1.2.3
pytest >= 6
pytest-checkdocs >= 2.4
pytest-flake8
pytest-black >= 0.3.7; python_implementation != "PyPy"
pytest-black >= 0.3.7; \
# workaround for jaraco/skeleton#22
python_implementation != "PyPy"
pytest-cov
pytest-mypy; python_implementation != "PyPy"
pytest-enabler
pytest-mypy >= 0.9.1; \
# workaround for jaraco/skeleton#22
python_implementation != "PyPy"
pytest-enabler >= 1.3

# local

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

# local
Expand Down
6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

Loading

0 comments on commit 5be8a05

Please sign in to comment.