Skip to content

Commit ade8eb1

Browse files
committed
Bump deps and tools, use hatchling
Signed-off-by: Bernát Gábor <[email protected]>
1 parent c29d241 commit ade8eb1

File tree

12 files changed

+122
-151
lines changed

12 files changed

+122
-151
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: check
22
on:
33
push:
4+
tags-ignore: ["**"]
45
pull_request:
56
schedule:
67
- cron: "0 8 * * *"
@@ -19,7 +20,6 @@ jobs:
1920
py:
2021
- "3.11"
2122
- "3.10"
22-
- "pypy3.9" # ahead to start it earlier because takes longer
2323
- "3.9"
2424
- "3.8"
2525
- "3.7"
@@ -87,26 +87,3 @@ jobs:
8787
run: tox -vv --notest -e ${{ matrix.tox_env }}
8888
- name: Run test suite
8989
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}
90-
91-
publish:
92-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
93-
needs: [check, test]
94-
runs-on: ubuntu-latest
95-
steps:
96-
- name: Setup python to build package
97-
uses: actions/setup-python@v4
98-
with:
99-
python-version: "3.11"
100-
- name: Install build
101-
run: python -m pip install build
102-
- uses: actions/checkout@v3
103-
with:
104-
fetch-depth: 0
105-
- name: Build sdist and wheel
106-
run: python -m build -s -w . -o dist
107-
- name: Publish to PyPi
108-
uses: pypa/[email protected]
109-
with:
110-
skip_existing: true
111-
user: __token__
112-
password: ${{ secrets.pypi_password }}

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release to PyPI
2+
on:
3+
push:
4+
tags: ["*"]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-22.04
9+
environment:
10+
name: release
11+
url: https://pypi.org/p/devpi-process
12+
permissions:
13+
id-token: write
14+
steps:
15+
- name: Setup python to build package
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.11"
19+
- name: Install build
20+
run: python -m pip install build
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
- name: Build package
25+
run: pyproject-build -s -w . -o dist
26+
- name: Publish to PyPI
27+
uses: pypa/[email protected]

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
.idea
2-
*.egg-info/
3-
.tox/
1+
/.tox
42
.coverage*
53
coverage.xml
64
.*_cache
75
__pycache__
86
**.pyc
9-
build
10-
dist
11-
src/devpi_process/version.py
7+
src/devpi_process/_version.py

.pre-commit-config.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ repos:
1212
- id: end-of-file-fixer
1313
- id: trailing-whitespace
1414
- repo: https://github.com/asottile/pyupgrade
15-
rev: v3.3.1
15+
rev: v3.3.2
1616
hooks:
1717
- id: pyupgrade
18-
args: ["--py36-plus"]
18+
args: ["--py37-plus"]
1919
- repo: https://github.com/PyCQA/isort
2020
rev: 5.12.0
2121
hooks:
@@ -30,10 +30,10 @@ repos:
3030
hooks:
3131
- id: blacken-docs
3232
additional_dependencies: [black==23.3]
33-
- repo: https://github.com/asottile/setup-cfg-fmt
34-
rev: v2.2.0
33+
- repo: https://github.com/tox-dev/pyproject-fmt
34+
rev: "0.11.1"
3535
hooks:
36-
- id: setup-cfg-fmt
36+
- id: pyproject-fmt
3737
- repo: https://github.com/tox-dev/tox-ini-fmt
3838
rev: "1.3.0"
3939
hooks:
@@ -61,14 +61,10 @@ repos:
6161
- "@prettier/[email protected]"
6262
args: ["--print-width=120", "--prose-wrap=always"]
6363
- repo: https://github.com/igorshubovych/markdownlint-cli
64-
rev: v0.33.0
64+
rev: v0.34.0
6565
hooks:
6666
- id: markdownlint
6767
- repo: meta
6868
hooks:
6969
- id: check-hooks-apply
7070
- id: check-useless-excludes
71-
- repo: https://github.com/tox-dev/pyproject-fmt
72-
rev: "0.9.2"
73-
hooks:
74-
- id: pyproject-fmt

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ event. Representation of a project may be further defined and clarified by proje
4444
## Enforcement
4545

4646
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47-
[email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems
48-
appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter
49-
of an incident. Further details of specific enforcement policies may be posted separately.
47+
`[email protected]`. The project team will review and investigate all complaints, and will respond in a way that it
48+
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
49+
reporter of an incident. Further details of specific enforcement policies may be posted separately.
5050

5151
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
5252
repercussions as determined by other members of the project's leadership.

codecov.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,100 @@
11
[build-system]
2-
build-backend = 'setuptools.build_meta'
2+
build-backend = "hatchling.build"
33
requires = [
4-
"setuptools>=67.6.1",
5-
"setuptools_scm>=7.1",
4+
"hatch-vcs>=0.3",
5+
"hatchling>=1.14.1",
66
]
77

8-
[tool.setuptools_scm]
9-
write_to = "src/devpi_process/version.py"
10-
write_to_template = """
11-
\"\"\" Version information \"\"\"
8+
[project]
9+
name = "devpi-process"
10+
description = "devpi process provides a programmatic API to create and use a devpi server process"
11+
readme.content-type = "text/markdown"
12+
readme.file = "README.md"
13+
keywords = [
14+
"environments",
15+
"isolated",
16+
"testing",
17+
"virtual",
18+
]
19+
license = "MIT"
20+
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }]
21+
authors = [{ name = "Bernát Gábor", email = "[email protected]" }]
22+
requires-python = ">=3.7"
23+
classifiers = [
24+
"Development Status :: 5 - Production/Stable",
25+
"Framework :: tox",
26+
"Intended Audience :: Developers",
27+
"License :: OSI Approved :: MIT License",
28+
"Operating System :: MacOS :: MacOS X",
29+
"Operating System :: Microsoft :: Windows",
30+
"Operating System :: POSIX",
31+
"Programming Language :: Python :: 3 :: Only",
32+
"Programming Language :: Python :: 3.7",
33+
"Programming Language :: Python :: 3.8",
34+
"Programming Language :: Python :: 3.9",
35+
"Programming Language :: Python :: 3.10",
36+
"Programming Language :: Python :: 3.11",
37+
"Topic :: Software Development :: Libraries",
38+
"Topic :: Software Development :: Testing",
39+
"Topic :: Utilities",
40+
]
41+
dynamic = [
42+
"version",
43+
]
44+
dependencies = [
45+
"devpi-client>=6.0.4",
46+
"devpi-server>=6.8",
47+
]
48+
optional-dependencies.test = [
49+
"covdefaults>=2.3",
50+
"httpx>=0.24",
51+
"pytest>=7.3.1",
52+
"pytest-cov>=4",
53+
]
54+
urls.Homepage = "https://github.com/tox-dev/devpi-process#readme"
55+
urls.Source = "https://github.com/tox-dev/devpi-process"
56+
urls.Tracker = "https://github.com/tox-dev/devpi-process/issues"
1257

13-
__version__ = "{version}"
14-
"""
58+
[tool.hatch]
59+
build.hooks.vcs.version-file = "src/devpi_process/_version.py"
60+
version.source = "vcs"
1561

1662
[tool.black]
1763
line-length = 120
1864

1965
[tool.isort]
2066
profile = "black"
2167
known_first_party = ["devpi_process"]
68+
line_length = 120
69+
add_imports = ["from __future__ import annotations"]
2270

2371
[tool.flake8]
2472
max-complexity = 22
2573
max-line-length = 120
2674
unused-arguments-ignore-abstract-functions = true
2775
noqa-require-code = true
2876
dictionaries = ["en_US", "python", "technical", "django"]
29-
ignore = [
30-
"E203", # whitespace before ':'
77+
78+
[tool.coverage]
79+
html.show_contexts = true
80+
html.skip_covered = false
81+
paths.source = [
82+
"src",
83+
".tox*/*/lib/python*/site-packages",
84+
".tox*/pypy*/site-packages",
85+
".tox*\\*\\Lib\\site-packages",
86+
"*/src",
87+
"*\\src",
3188
]
89+
report.fail_under = 98
90+
report.omit = []
91+
run.parallel = true
92+
run.plugins = ["covdefaults"]
93+
94+
[tool.mypy]
95+
python_version = "3.11"
96+
show_error_codes = true
97+
strict = true
3298

3399
[tool.pep8]
34100
max-line-length = "120"

setup.cfg

Lines changed: 0 additions & 77 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/devpi_process/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from types import TracebackType
1313
from typing import IO, Iterator, Sequence, cast
1414

15-
from .version import __version__
15+
from ._version import __version__
1616

1717

1818
def _check_call(cmd: list[str]) -> None:
19-
run(cmd, check=True, stdout=PIPE, stderr=PIPE)
19+
run(cmd, check=True, capture_output=True)
2020

2121

2222
class Index:

0 commit comments

Comments
 (0)