File tree Expand file tree Collapse file tree 5 files changed +400
-64
lines changed
actions/install_requirements Expand file tree Collapse file tree 5 files changed +400
-64
lines changed Original file line number Diff line number Diff line change 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
811runs :
912 using : composite
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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 ]
3839skipsdist = 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 ]
4150description = " Run pre-commit"
42- direct = true
4351allowlist_externals = [" pre-commit" ]
4452commands = [
4553 [
@@ -53,22 +61,22 @@ commands = [
5361
5462[tool .tox .env .tests ]
5563description = " Run tests"
56- direct = true
5764allowlist_externals = [" pytest" ]
5865commands = [[" pytest" , " {posargs}" ]]
5966
6067[tool .tox .env .docs ]
6168description = " Run docs"
62- direct = true
6369allowlist_externals = [" sphinx-build" , " sphinx-autobuild" ]
6470commands = [
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
You can’t perform that action at this time.
0 commit comments