Skip to content

Commit 6c79a59

Browse files
committed
Fix actions build, and updates to pyproject.toml
1 parent 39b07b8 commit 6c79a59

File tree

5 files changed

+400
-63
lines changed

5 files changed

+400
-63
lines changed

.github/actions/install_requirements/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ runs:
2424
enable-cache: true
2525
cache-dependency-glob: "uv.lock"
2626

27+
- name: Set up uv venv
28+
run: uv venv ./venv
29+
shell: bash
30+
2731
- name: Install dependencies
2832
run: uv sync --extra dev
2933
shell: bash
@@ -33,7 +37,7 @@ runs:
3337
shell: bash
3438

3539
- name: Add venv path to Github environment
36-
run: echo "VENV_PATH=.venv" >> $GITHUB_ENV
40+
run: echo "VENV_PATH=./venv" >> $GITHUB_ENV
3741
shell: bash
3842

3943
- name: Add venv path to Github Path

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- if: inputs.python-version == 'dev'
3636
name: Write the requirements as an artifact
37-
run: pip freeze --exclude-editable > /tmp/dev-requirements.txt
37+
run: uv pip freeze --exclude-editable > /tmp/dev-requirements.txt
3838

3939
- if: inputs.python-version == 'dev'
4040
name: Upload dev-requirements.txt

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
- id: ruff
2222
name: lint with ruff
2323
language: system
24-
entry: ruff check --force-exclude
24+
entry: ruff check --force-exclude --fix
2525
types: [python]
2626
require_serial: true
2727

pyproject.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ optional-dependencies = { dev = [
1717
"sphinx-copybutton",
1818
"sphinx-design",
1919
"tox-uv",
20+
"twine>=6.1.0",
2021
] }
2122

2223
# # Without this, setuptools apparently try to scan the whole image's filesystem while working in /
@@ -36,10 +37,17 @@ testpaths = "tests"
3637

3738
[tool.tox]
3839
skipsdist = true
40+
requires = ["tox-uv>=1.25.0"]
41+
# envs to runs automatically with tox -p
42+
env_list = ["pre-commit", "tests", "docs"]
43+
44+
[tool.tox.env]
45+
passenv = { "*" = "" }
46+
# Include setuptools, pip, ... in the tox envs
47+
uv_seed = { enabled = true }
3948

4049
[tool.tox.env.pre-commit]
4150
description = "Run pre-commit"
42-
direct = true
4351
allowlist_externals = ["pre-commit"]
4452
commands = [
4553
[
@@ -53,22 +61,22 @@ commands = [
5361

5462
[tool.tox.env.tests]
5563
description = "Run tests"
56-
direct = true
5764
allowlist_externals = ["pytest"]
5865
commands = [["pytest", "{posargs}"]]
5966

6067
[tool.tox.env.docs]
6168
description = "Run docs"
62-
direct = true
6369
allowlist_externals = ["sphinx-build", "sphinx-autobuild"]
6470
commands = [
6571
[
66-
"sphinx-{posargs:build}",
67-
"-EW",
68-
"--keep-going",
72+
"sphinx-build",
6973
"-T",
7074
"docs",
7175
"build/html",
76+
{ replace = "posargs", default = [
77+
"-EW",
78+
"--keep-going",
79+
], extend = true },
7280
],
7381
]
7482

0 commit comments

Comments
 (0)