Skip to content

Commit 698c40a

Browse files
Migrate project from Poetry to UV (#46)
* Migrate project from Poetry to UV * ruff format * use ruff --fix-only * fix ruff lints * uv sync * update gha * install uv
1 parent fff8072 commit 698c40a

File tree

13 files changed

+944
-120
lines changed

13 files changed

+944
-120
lines changed

.github/workflows/docs.yaml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,39 @@ name: Documentation
22

33
on:
44
push:
5-
branches: [ "develop" ]
6-
tags: [ "*" ]
5+
branches: ["develop"]
6+
tags: ["*"]
77
pull_request:
8-
branches: [ "develop" ]
8+
branches: ["develop"]
99

1010
jobs:
1111
docs:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: NiklasRosenstein/slap@gha/install/v1
16-
- run: slap install --only-extras docs --no-venv-check
17-
- run: slap run --no-venv-check docs:build
18-
- uses: actions/upload-artifact@v4
19-
with:
20-
name: docs
21-
path: docs/_site
14+
- uses: actions/checkout@v4
15+
- uses: NiklasRosenstein/slap@gha/install/v1
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
version: "0.5.25"
20+
- run: slap run --no-venv-check docs:build
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: docs
24+
path: docs/_site
2225

2326
docs-publish:
24-
needs: [ docs ]
27+
needs: [docs]
2528
runs-on: ubuntu-latest
2629
if: github.ref == 'refs/heads/develop'
2730
steps:
28-
- uses: actions/checkout@v4
29-
- uses: actions/download-artifact@v4
30-
with: { name: docs, path: docs/site }
31-
- uses: JamesIves/[email protected]
32-
with: { branch: gh-pages, folder: docs/site, ssh-key: "${{ secrets.DEPLOY_KEY }}" }
31+
- uses: actions/checkout@v4
32+
- uses: actions/download-artifact@v4
33+
with: { name: docs, path: docs/site }
34+
- uses: JamesIves/[email protected]
35+
with:
36+
{
37+
branch: gh-pages,
38+
folder: docs/site,
39+
ssh-key: "${{ secrets.DEPLOY_KEY }}",
40+
}

.github/workflows/python.yml

Lines changed: 79 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Python
22

33
on:
44
push:
5-
branches: [ "develop" ]
6-
tags: [ "*" ]
5+
branches: ["develop"]
6+
tags: ["*"]
77
pull_request:
8-
branches: [ "develop" ]
8+
branches: ["develop"]
99

1010
jobs:
1111
test:
@@ -15,26 +15,80 @@ jobs:
1515
matrix:
1616
# Generated with scripts/github_actions_get_python_versions.py
1717
python-version: [
18-
# NOTE: We do not check 3.8.0 because Flake8 does not run on it.
19-
"3.8.1", "3.8.2", "3.8.3", "3.8.4", "3.8.5", "3.8.6", "3.8.7", "3.8.8", "3.8.9", "3.8.10", "3.8.11",
20-
"3.8.12", "3.8.13", "3.8.14", "3.8.15", "3.8.16", "3.8.17", "3.8.18",
21-
"3.9.0", "3.9.1", "3.9.2", "3.9.3", "3.9.4", "3.9.5", "3.9.6", "3.9.7", "3.9.8", "3.9.9", "3.9.10", "3.9.11",
22-
"3.9.12", "3.9.13", "3.9.14", "3.9.15", "3.9.16", "3.9.17", "3.9.18",
23-
"3.10.0", "3.10.1", "3.10.2", "3.10.3", "3.10.4", "3.10.5", "3.10.6", "3.10.7", "3.10.8", "3.10.9", "3.10.10",
24-
"3.10.11", "3.10.12", "3.10.13",
25-
"3.11.0", "3.11.1", "3.11.2", "3.11.3", "3.11.4", "3.11.5", "3.11.6", "3.11.7", "3.11.8",
26-
"3.12.0", "3.12.1", "3.12.2",
27-
"3.x", "pypy-3.8", # "pypy-3.9", "pypy-3.10"
28-
]
18+
# NOTE: We do not check 3.8.0 because Flake8 does not run on it.
19+
"3.8.1",
20+
"3.8.2",
21+
"3.8.3",
22+
"3.8.4",
23+
"3.8.5",
24+
"3.8.6",
25+
"3.8.7",
26+
"3.8.8",
27+
"3.8.9",
28+
"3.8.10",
29+
"3.8.11",
30+
"3.8.12",
31+
"3.8.13",
32+
"3.8.14",
33+
"3.8.15",
34+
"3.8.16",
35+
"3.8.17",
36+
"3.8.18",
37+
"3.9.0",
38+
"3.9.1",
39+
"3.9.2",
40+
"3.9.3",
41+
"3.9.4",
42+
"3.9.5",
43+
"3.9.6",
44+
"3.9.7",
45+
"3.9.8",
46+
"3.9.9",
47+
"3.9.10",
48+
"3.9.11",
49+
"3.9.12",
50+
"3.9.13",
51+
"3.9.14",
52+
"3.9.15",
53+
"3.9.16",
54+
"3.9.17",
55+
"3.9.18",
56+
"3.10.0",
57+
"3.10.1",
58+
"3.10.2",
59+
"3.10.3",
60+
"3.10.4",
61+
"3.10.5",
62+
"3.10.6",
63+
"3.10.7",
64+
"3.10.8",
65+
"3.10.9",
66+
"3.10.10",
67+
"3.10.11",
68+
"3.10.12",
69+
"3.10.13",
70+
"3.11.0",
71+
"3.11.1",
72+
"3.11.2",
73+
"3.11.3",
74+
"3.11.4",
75+
"3.11.5",
76+
"3.11.6",
77+
"3.11.7",
78+
"3.11.8",
79+
"3.12.0",
80+
"3.12.1",
81+
"3.12.2",
82+
"3.x",
83+
"pypy-3.8", # "pypy-3.9", "pypy-3.10"
84+
]
2985
steps:
30-
- uses: actions/checkout@v4
31-
- uses: NiklasRosenstein/slap@gha/install/v1
32-
- uses: actions/setup-python@v5
33-
with: { python-version: "${{ matrix.python-version }}" }
34-
- run: slap install --link --no-venv-check
35-
36-
# NOTE(@niklas): Flake8 doesn't run on 3.12 yet, so we only run pytest here.
37-
- run: slap test
38-
if: ${{ !startsWith(matrix.python-version, '3.12.') && matrix.python-version != '3.x' }}
39-
- run: slap test pytest
40-
if: ${{ startsWith(matrix.python-version, '3.12.') || matrix.python-version == '3.x' }}
86+
- uses: actions/checkout@v4
87+
- uses: NiklasRosenstein/slap@gha/install/v1
88+
- name: Install uv
89+
uses: astral-sh/setup-uv@v5
90+
with:
91+
version: "0.5.25"
92+
- uses: actions/setup-python@v5
93+
with: { python-version: "${{ matrix.python-version }}" }
94+
- run: slap test

docs/mksync-hook.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
import os
32
from pathlib import Path
4-
import subprocess as sp
5-
from mkdocs.structure.pages import Page
3+
64
from mkdocs.config.defaults import MkDocsConfig
5+
from mkdocs.structure.pages import Page
76
from mksync import mksync_file
87

98

docs/pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[project]
2+
name = "docs"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = [
8+
"mkdocs>=1.6.1",
9+
"mkdocs-material>=9.5.50",
10+
"mkdocstrings[python]>=0.27.0",
11+
"mksync>=0.1.4",
12+
]

0 commit comments

Comments
 (0)