Skip to content

Commit 4cbc0bb

Browse files
committed
Update doc
1 parent 0e0c745 commit 4cbc0bb

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

dev-docs/configuring-test-deps.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@
1616

1717
## Python
1818

19-
- Install `pyenv`
20-
- Install a specic version e.g `pyenv install 3.12.1`
21-
- Configure `tests` to use a specific version
19+
- Install `uv`
20+
21+
About uv: https://docs.astral.sh/uv/
22+
23+
`uv` will handle the python versions and virtual environments based on the `.python-version` we have in `tests/` folder.
24+
25+
To set the version to use to
2226

2327
```
2428
cd tests
25-
pyenv local 3.12.1
29+
echo '3.12.7' > .python-version
2630
```
2731

28-
This way when calling `python` in `tests` folder it will always be Python 3.12.1 version
32+
This `uv run` and `uv sync` will create the right virtual environment and use it.
2933

3034
## R
3135

@@ -43,4 +47,35 @@
4347

4448
# Installing the dependencies in each languages packages
4549

46-
- From `tests` folder, run `configure-test-env` scripts to restore dependencies for each tools
50+
- From `tests` folder, run `configure-test-env.sh` or `configure-test-env.ps1` scripts to restore dependencies for each tools
51+
52+
# Adding some tests dependencies
53+
54+
## Python
55+
56+
- Use `uv add` to add the deps to `pyproject.toml`, install related dependencies in the virtual environment and lock the versions in `uv.lock`.
57+
Example:
58+
```
59+
cd tests
60+
uv add jupyter
61+
```
62+
63+
## R
64+
65+
- Add the dependencies in `DESCRIPTION` file
66+
- Run `renv::install(<package>)` to install the dependencies
67+
- Run `renv::snapshot()` to lock the versions in `renv.lock`
68+
69+
## Julia
70+
71+
- Run Julia in the `tests/` project and add the dependencies
72+
Example:
73+
```bash
74+
cd tests
75+
julia --project=.
76+
```
77+
then in Julia console
78+
```julia
79+
using Pkg
80+
Pkg.add("DataFrames")
81+
```

0 commit comments

Comments
 (0)