Skip to content

Commit ab7094b

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

File tree

5 files changed

+400
-64
lines changed

5 files changed

+400
-64
lines changed

.github/actions/install_requirements/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
python-version:
55
description: Python version to install, default is from Dockerfile
66
default: "dev"
7+
pip-install:
8+
description: Parameters to pass to uv pip install
9+
default: "$([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e .[dev]"
710

811
runs:
912
using: composite
@@ -24,8 +27,8 @@ runs:
2427
enable-cache: true
2528
cache-dependency-glob: "uv.lock"
2629

27-
- name: Install dependencies
28-
run: uv sync --extra dev
30+
- name: Install packages
31+
run: uv pip install ${{ inputs.pip-install }}
2932
shell: bash
3033

3134
- name: Report what was installed

.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)