Skip to content

Commit 83b3e57

Browse files
jlevyclaude
andcommitted
Update dependencies, add Python 3.14, upgrade GitHub Actions.
- Dev deps: pytest 9.0.2, ruff 0.14.11, basedpyright 1.37.1, rich 14.2.0 - Add Python 3.14 to CI matrix and classifiers - GitHub Actions: checkout v6, setup-uv v7 - Add template maintenance workflow to README Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7bb8984 commit 83b3e57

4 files changed

Lines changed: 85 additions & 25 deletions

File tree

README.md

Lines changed: 74 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
[![As usual, XKCD has a comic for
2-
this](https://imgs.xkcd.com/comics/python_environment.png)](https://xkcd.com/1987/)
1+
[![As usual, XKCD has a comic for this](https://imgs.xkcd.com/comics/python_environment.png)](https://xkcd.com/1987/)
32

43
(As usual, XKCD has a comic for this.
54
Appropriately enough, the comic is out of date.)
@@ -9,13 +8,12 @@ Appropriately enough, the comic is out of date.)
98
[![image](https://img.shields.io/pypi/pyversions/uvtemplate.svg)](https://pypi.python.org/pypi/uvtemplate)
109
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
1110
[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-border.json)](https://github.com/copier-org/copier)
12-
[![X (formerly Twitter)
13-
Follow](https://img.shields.io/twitter/follow/ojoshe)](https://x.com/ojoshe)
11+
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/ojoshe)](https://x.com/ojoshe)
1412

1513
## What is This?
1614

1715
**simple-modern-uv** is a minimal, modern **Python project template** for new projects
18-
(Python 3.11–3.13) based on [**uv**](https://docs.astral.sh/uv/). This template aims to
16+
(Python 3.11–3.14) based on [**uv**](https://docs.astral.sh/uv/). This template aims to
1917
be a good base for serious work but also simple so it’s an easy option for any small
2018
project, like an open source library or tool.
2119

@@ -28,10 +26,11 @@ Try running:
2826
uvx uvtemplate
2927
```
3028

31-
The [uvtemplate](https://git.new/uvtemplate) tool now walks you through using this template.
29+
The [uvtemplate](https://git.new/uvtemplate) tool now walks you through using this
30+
template.
3231

33-
For more installation options, scroll down to [How to Use This
34-
Template](#how-to-use-this-template).
32+
For more installation options, scroll down to
33+
[How to Use This Template](#how-to-use-this-template).
3534

3635
## Why a New Python Project Template?
3736

@@ -236,9 +235,8 @@ This template **does not** handle:
236235

237236
- Using Docker
238237

239-
- Private or enterprise package repositories (but you can add this—see [uv’s docs on
240-
alternative
241-
indexes](https://docs.astral.sh/uv/guides/integration/alternative-indexes/))
238+
- Private or enterprise package repositories (but you can add this—see
239+
[uv’s docs on alternative indexes](https://docs.astral.sh/uv/guides/integration/alternative-indexes/))
242240

243241
- Building websites or docs, e.g. with [mkdocs](https://github.com/mkdocs/mkdocs)
244242

@@ -273,8 +271,8 @@ Option 3 is handy if you prefer a GitHub template.
273271

274272
### Option 1: Run `uvx uvtemplate`
275273

276-
I’ve now created a little tool, [uvtemplate](https://www.github.com/jlevy/uvtemplate) that
277-
copies this template for you and walks you through everything:
274+
I’ve now created a little tool, [uvtemplate](https://www.github.com/jlevy/uvtemplate)
275+
that copies this template for you and walks you through everything:
278276

279277
```shell
280278
uvx uvtemplate
@@ -311,8 +309,8 @@ You can enter names for the project, description, etc., or just press enter and
311309
look for `changeme` in the code.
312310

313311
Once you have the template set up, you will need to check the code into Git for uv to
314-
work. [Create a new GitHub
315-
repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository)
312+
work.
313+
[Create a new GitHub repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository)
316314
and add your initial code:
317315

318316
```shell
@@ -385,6 +383,67 @@ practices. It uses [Poetry](https://python-poetry.org/docs/basic-usage/),
385383
For [Conda](https://github.com/conda/conda) dependencies, also consider the newer
386384
[**pixi**](https://github.com/prefix-dev/pixi/) package manager.
387385

386+
## Maintaining This Template
387+
388+
If you’re contributing to this template or forking it for your own use, here’s the
389+
workflow for keeping dependencies up to date:
390+
391+
### Testing and Updating Dependencies
392+
393+
1. **Instantiate the template to a test directory:**
394+
395+
```shell
396+
mkdir -p /tmp/template-test
397+
cd /tmp/template-test
398+
copier copy --defaults /path/to/simple-modern-uv test-project
399+
cd test-project
400+
git init && git add . && git commit -m "Initial commit"
401+
```
402+
403+
2. **Install and test:**
404+
405+
```shell
406+
uv sync --all-extras
407+
uv run pytest
408+
uv run python devtools/lint.py
409+
```
410+
411+
3. **Check for newer versions:**
412+
413+
```shell
414+
# See what versions were actually installed
415+
cat uv.lock | grep -E "^name = |^version = "
416+
```
417+
418+
4. **Compare to template minimums and backfill updates:**
419+
420+
Compare the installed versions in `uv.lock` against the minimum versions specified in
421+
`template/pyproject.toml.jinja`. Update the template’s minimum versions to match the
422+
latest stable releases that pass all tests.
423+
424+
5. **Check for uv updates:**
425+
426+
```shell
427+
# Check your local version
428+
uv --version
429+
430+
# Check latest release
431+
curl -s https://api.github.com/repos/astral-sh/uv/releases/latest | grep tag_name
432+
```
433+
434+
Update the uv version in `template/.github/workflows/ci.yml` and
435+
`template/.github/workflows/publish.yml` if needed.
436+
437+
### Current Versions to Track
438+
439+
- **Python dev dependencies** in `template/pyproject.toml.jinja`:
440+
441+
- pytest, pytest-sugar, ruff, codespell, rich, basedpyright, funlog
442+
443+
- **uv version** in GitHub Actions workflows
444+
445+
- **Python version support** (currently 3.11–3.14)
446+
388447
## Contributing
389448

390449
I’m new to uv, so please help me improve this!

template/.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# Update this as needed:
2222
# Common platforms: ["ubuntu-latest", "macos-latest", "windows-latest"]
2323
os: ["ubuntu-latest"]
24-
python-version: ["3.11", "3.12", "3.13"]
24+
python-version: ["3.11", "3.12", "3.13", "3.14"]
2525

2626
# Linux only by default. Use ${{ matrix.os }} for other OSes.
2727
runs-on: ${{ matrix.os }}
@@ -31,13 +31,13 @@ jobs:
3131
# https://docs.astral.sh/uv/guides/integration/github/
3232

3333
- name: Checkout (official GitHub action)
34-
uses: actions/checkout@v4
34+
uses: actions/checkout@v6
3535
with:
3636
# Important for versioning plugins:
3737
fetch-depth: 0
3838

3939
- name: Install uv (official Astral action)
40-
uses: astral-sh/setup-uv@v5
40+
uses: astral-sh/setup-uv@v7
4141
with:
4242
# Update this as needed:
4343
version: "0.9.25"

template/.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
contents: read
1414
steps:
1515
- name: Checkout (official GitHub action)
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717
with:
1818
# Important for versioning plugins:
1919
fetch-depth: 0
2020

2121
- name: Install uv (official Astral action)
22-
uses: astral-sh/setup-uv@v5
22+
uses: astral-sh/setup-uv@v7
2323
with:
2424
version: "0.9.25"
2525
enable-cache: true

template/pyproject.toml.jinja

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ classifiers = [
2929
"Programming Language :: Python :: 3.11",
3030
"Programming Language :: Python :: 3.12",
3131
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: 3.14",
3233
"Typing :: Typed",
3334
# Include this to avoid accidentally publishing to PyPI:
3435
# "Private :: Do Not Upload",
@@ -45,12 +46,12 @@ dependencies = [
4546
4647
[dependency-groups]
4748
dev = [
48-
"pytest>=8.3.5",
49-
"pytest-sugar>=1.0.0",
50-
"ruff>=0.11.9",
49+
"pytest>=9.0.2",
50+
"pytest-sugar>=1.1.1",
51+
"ruff>=0.14.11",
5152
"codespell>=2.4.1",
52-
"rich>=14.0.0",
53-
"basedpyright>=1.29.1",
53+
"rich>=14.2.0",
54+
"basedpyright>=1.37.1",
5455
"funlog>=0.2.1",
5556
]
5657

0 commit comments

Comments
 (0)