Skip to content

Commit faf26a2

Browse files
authored
docs: update contribution guide and fix tox compatibility with uv (#563)
1 parent 210b85a commit faf26a2

File tree

4 files changed

+83
-30
lines changed

4 files changed

+83
-30
lines changed

docs/contrib.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,7 @@ We use uv for managing dependencies. To install it, please follow the official g
2121
After you have cloned the taskiq repo, install dependencies using this command:
2222

2323
```bash
24-
uv sync
25-
```
26-
27-
It will install all required dependencies.
28-
If you want to run pytest against different python environments, please install `pyenv` using instructions from its [readme](https://github.com/pyenv/pyenv).
29-
30-
After pyenv is ready, you can install all python versions using this command:
31-
32-
```bash
33-
pyenv install
24+
uv sync --all-extras
3425
```
3526

3627
## Linting
@@ -43,7 +34,6 @@ But even without installation, you can run all lints manually:
4334
pre-commit run -a
4435
```
4536

46-
4737
## Testing
4838

4939
You can run `pytest` without any parameters and it will do the thing.
@@ -61,9 +51,29 @@ pytest -n 2
6151
Also we use `tox` to test against different environments. You can publish a PR to run pytest with different
6252
python versions, but if you want to do it locally, just run `tox` command.
6353

64-
6554
```bash
6655
tox
6756
```
6857

69-
Tox assumes that you've installed python versions using pyenv with command above.
58+
## Working with documentation
59+
60+
For documentation we use [VuePress 2](https://vuepress.vuejs.org/). To run documentation locally, use steps below.
61+
62+
First of all, install dependencies for documentation. We recommend to use `pnpm` for managing dependencies, but `package.json` is compatible with `npm` and `bun` for example as well:
63+
64+
```bash
65+
pnpm i
66+
```
67+
68+
After that, you can run documentation server with hot-reloading using:
69+
70+
```bash
71+
pnpm docs:dev
72+
```
73+
74+
If you want to check how documentation looks like in production mode, you can build it and then serve using:
75+
76+
```bash
77+
pnpm docs:build
78+
pnpm docs:serve
79+
```

pyproject.toml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ dev = [
6464
"pytest-cov>=7.0.0",
6565
"coverage>=7.11.3",
6666
"pytest-xdist[psutil]>=3.8.0",
67-
"tox>=4.32.0",
6867
"freezegun>=1.5.5",
6968
"tzdata>=2025.2; sys_platform == 'win32'",
7069
"opentelemetry-test-utils (>=0.59b0,<1)",
7170
"polyfactory>=3.1.0",
71+
# tests with all python versions
72+
"tox>=4.32.0",
73+
"tox-uv>=1.29.0",
7274
]
7375

7476
[project.urls]
@@ -122,7 +124,7 @@ omit = [
122124
]
123125

124126
[build-system]
125-
requires = ["uv_build>=0.8.14,<0.9.0"]
127+
requires = ["uv_build>=0.9.16,<0.10.0"]
126128
build-backend = "uv_build"
127129

128130
[tool.uv.build-backend]
@@ -213,3 +215,16 @@ extend-immutable-calls = ["taskiq_dependencies.Depends", "taskiq.TaskiqDepends"]
213215
extend-exclude = [
214216
"docs/README.md", # because of identifier in head section
215217
]
218+
219+
[tool.tox]
220+
requires = ["tox>=4"]
221+
isolated_build = true
222+
env_list = ["3.13", "3.12", "3.11", "3.10"]
223+
224+
[tool.tox.env_run_base]
225+
description = "Run tests with Python {base_python}"
226+
runner = "uv-venv-lock-runner"
227+
uv_sync_flags = ["--all-extras"]
228+
commands = [
229+
["pytest", "-vv", "-n", "auto"]
230+
]

tox.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

uv.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)