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.
54Appropriately 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
1917be a good base for serious work but also simple so it’s an easy option for any small
2018project, like an open source library or tool.
2119
@@ -28,10 +26,11 @@ Try running:
2826uvx 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
280278uvx uvtemplate
@@ -311,8 +309,8 @@ You can enter names for the project, description, etc., or just press enter and
311309look for ` changeme ` in the code.
312310
313311Once 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 )
316314and add your initial code:
317315
318316``` shell
@@ -385,6 +383,67 @@ practices. It uses [Poetry](https://python-poetry.org/docs/basic-usage/),
385383For [ 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
390449I’m new to uv, so please help me improve this!
0 commit comments