Skip to content

Commit 59eab19

Browse files
committed
Update skel 2024-11-26
rev: 9f21ed7
1 parent 94dd4e5 commit 59eab19

File tree

7 files changed

+93
-33
lines changed

7 files changed

+93
-33
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ on:
99
- v*
1010
pull_request:
1111

12+
env:
13+
UV_SYSTEM_PYTHON: 1
14+
1215
jobs:
13-
checkdeps:
16+
test:
1417
runs-on: ${{ matrix.os }}
1518
strategy:
1619
fail-fast: false
1720
matrix:
18-
python-version: ["3.10", "3.11", "3.12"]
21+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1922
os: [macOS-latest, ubuntu-latest, windows-latest]
2023

2124
steps:
@@ -25,12 +28,46 @@ jobs:
2528
uses: actions/setup-python@v5
2629
with:
2730
python-version: ${{ matrix.python-version }}
31+
- uses: astral-sh/setup-uv@v3
2832
- name: Install
2933
run: |
30-
python -m pip install --upgrade pip
31-
make setup
32-
pip install -U .
34+
uv pip install -e .[test]
3335
- name: Test
3436
run: make test
3537
- name: Lint
36-
run: make lint
38+
run: |
39+
uv pip install -e .[test,dev]
40+
make lint
41+
if: ${{ matrix.python-version != '3.9' && matrix.python-version != '3.8'}}
42+
43+
build:
44+
needs: test
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-python@v5
49+
with:
50+
python-version: "3.12"
51+
- uses: astral-sh/setup-uv@v3
52+
- name: Install
53+
run: uv pip install build
54+
- name: Build
55+
run: python -m build
56+
- name: Upload
57+
uses: actions/upload-artifact@v3
58+
with:
59+
name: sdist
60+
path: dist
61+
62+
publish:
63+
needs: build
64+
runs-on: ubuntu-latest
65+
if: startsWith(github.ref, 'refs/tags/v')
66+
permissions:
67+
id-token: write
68+
steps:
69+
- uses: actions/download-artifact@v3
70+
with:
71+
name: sdist
72+
path: dist
73+
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,9 @@ venv.bak/
105105

106106
# Visual Studio Code
107107
.vscode/
108+
109+
# Vim swapfiles
110+
*.sw[op]
111+
112+
# Setuptools-scm
113+
_version.py

Makefile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
PYTHON?=python
22
SOURCES=checkdeps setup.py
33

4+
UV:=$(shell uv --version)
5+
ifdef UV
6+
VENV:=uv venv
7+
PIP:=uv pip
8+
else
9+
VENV:=python -m venv
10+
PIP:=python -m pip
11+
endif
12+
413
.PHONY: venv
514
venv:
6-
$(PYTHON) -m venv .venv
15+
$(VENV) .venv
716
source .venv/bin/activate && make setup
817
@echo 'run `source .venv/bin/activate` to use virtualenv'
918

@@ -12,7 +21,7 @@ venv:
1221

1322
.PHONY: setup
1423
setup:
15-
python -m pip install -Ue .[dev,test]
24+
$(PIP) install -Ue .[dev,test]
1625

1726
.PHONY: test
1827
test:
@@ -21,14 +30,14 @@ test:
2130

2231
.PHONY: format
2332
format:
24-
python -m ufmt format $(SOURCES)
33+
ruff format
34+
ruff check --fix
2535

2636
.PHONY: lint
2737
lint:
28-
python -m ufmt check $(SOURCES)
29-
python -m flake8 $(SOURCES)
38+
ruff check $(SOURCES)
3039
python -m checkdeps --allow-names checkdeps checkdeps
31-
mypy --strict --non-interactive checkdeps
40+
mypy --strict --install-types --non-interactive checkdeps
3241

3342
.PHONY: release
3443
release:

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# checkdeps
22

33

4+
# Version Compat
5+
6+
Usage of this library should work back to 3.7, but development (and mypy
7+
compatibility) only on 3.10-3.12. Linting requires 3.12 for full fidelity.
8+
9+
# Versioning
10+
11+
This library follows [meanver](https://meanver.org/) which basically means
12+
[semver](https://semver.org/) along with a promise to rename when the major
13+
version changes.
414

515
# License
616

717
checkdeps is copyright [Tim Hatch](https://timhatch.com/), and licensed under
8-
the MIT license. I am providing code in this repository to you under an open
9-
source license. This is my personal repository; the license you receive to
10-
my code is from me and not from my employer. See the `LICENSE` file for details.
18+
the MIT license. See the `LICENSE` file for details.

checkdeps/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
try:
2+
from ._version import __version__
3+
except ImportError: # pragma: no cover
4+
__version__ = "dev"

setup.cfg

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ author = Tim Hatch
99
author_email = [email protected]
1010

1111
[options]
12-
packages = checkdeps
12+
packages = find:
13+
python_requires = >=3.8
1314
setup_requires =
1415
setuptools_scm >= 8
1516
setuptools >= 65
16-
python_requires = >=3.10
1717
include_package_data = true
18+
install_requires =
1819

1920
[options.extras_require]
2021
dev =
21-
black == 23.12.1
22-
checkdeps == 0.0.2
23-
flake8 == 7.0.0
24-
mypy == 1.8.0
25-
tox == 4.12.1
26-
twine == 4.0.2
27-
ufmt == 2.3.0
28-
usort == 1.0.7
29-
wheel == 0.42.0
22+
ruff == 0.8.0
23+
checkdeps == 0.9.0
24+
mypy == 1.13.0
25+
tox == 4.23.2
3026
test =
3127
coverage >= 6
3228

29+
[options.entry_points]
30+
# console_scripts =
31+
# foo=foo:bar
32+
3333
[check]
3434
metadata = true
3535
strict = true
@@ -47,10 +47,9 @@ skip_covered = True
4747

4848
[mypy]
4949
ignore_missing_imports = True
50-
install_types = True
5150

5251
[tox:tox]
53-
envlist = py{310,311,312}, coverage
52+
envlist = py{38,39,310,311,312,313}, coverage
5453

5554
[testenv]
5655
deps = .[test]
@@ -68,8 +67,5 @@ commands =
6867
coverage combine
6968
coverage report
7069
depends =
71-
py{310,311,312}
70+
py{38,39,310,311,312,313}
7271

73-
[flake8]
74-
ignore = E203, E231, E266, E302, E501, W503
75-
max-line-length = 88

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from setuptools import setup
22

3-
setup(use_scm_version=True)
3+
setup(use_scm_version={"write_to": "checkdeps/_version.py"})

0 commit comments

Comments
 (0)