You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization.qmd
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,23 @@ title: "Customization"
4
4
5
5
## Development workflow
6
6
7
-
### Dependency management with Poetry
7
+
### Dependency management with `uv`
8
8
9
-
The project uses Poetry to manage dependencies:
9
+
The project uses `uv` to manage dependencies:
10
10
11
-
- Add new dependency: `poetry add <dependency>`
12
-
- Add development dependency: `poetry add --dev <dependency>`
13
-
- Remove dependency: `poetry remove <dependency>`
14
-
- Update lock file: `poetry lock`
15
-
- Install dependencies: `poetry install`
16
-
- Update all dependencies: `poetry update`
11
+
- Add new dependency: `uv add <dependency>`
12
+
- Add development dependency: `uv add --dev <dependency>`
13
+
- Remove dependency: `uv remove <dependency>`
14
+
- Update lock file: `uv lock`
15
+
- Install all dependencies: `uv sync`
16
+
- Install only production dependencies: `uv sync --no-dev`
17
+
- Upgrade dependencies: `uv lock --upgrade`
17
18
18
-
If you are using VSCode or Cursor as your IDE, you will need to select the Poetry-managed Python version as your interpreter for the project. To find the location of the Poetry-managed Python interpreter, run `poetry env info` and look for the `Path` field. Then, in VSCode, go to `View > Command Palette`, search for `Python: Select Interpreter`, and either select Poetry's Python version from the list (if it has been auto-detected) or "Enter interpreter path" manually.
19
+
### IDE configuration
20
+
21
+
If you are using VSCode or Cursor as your IDE, you will need to select the `uv`-managed Python version as your interpreter for the project. Go to `View > Command Palette`, search for `Python: Select Interpreter`, and select the Python version labeled `('.venv':venv)`.
22
+
23
+
If your IDE does not automatically detect and display this option, you can manually select the interpreter by selecting "Enter interpreter path" and then navigating to the `.venv/bin/python` subfolder in your project directory.
See the [uv installation docs](https://docs.astral.sh/uv/getting-started/installation/) for more information.
45
+
46
+
### Python
47
+
48
+
Install Python 3.12 or higher from either the official [downloads page](https://www.python.org/downloads/) or using uv:
49
+
50
+
```bash
51
+
# Installs the latest version
52
+
uv python install
53
+
```
54
+
55
+
### Docker and Docker Compose
56
+
57
+
Install Docker Desktop and Docker Compose for your operating system by following the [instructions in the documentation](https://docs.docker.com/compose/install/).
31
58
32
59
### PostgreSQL headers
33
60
@@ -49,31 +76,25 @@ For Windows:
49
76
50
77
### Python dependencies
51
78
52
-
1. Install Poetry
79
+
From the root directory, run:
53
80
54
81
```bash
55
-
pipx install poetry
82
+
uv venv
56
83
```
57
84
58
-
2. Install project dependencies
85
+
This will create an in-project virtual environment. Then run:
59
86
60
87
```bash
61
-
poetry install
88
+
uv sync
62
89
```
63
90
64
-
(Note: if `psycopg2` installation fails with a `ChefBuildError`, you just need to install the PostgreSQL headers first and then try again.)
65
-
66
-
3. Activate shell
67
-
68
-
```bash
69
-
poetry shell
70
-
```
91
+
This will install all dependencies.
71
92
72
-
(Note: You will need to activate the shell every time you open a new terminal session. Alternatively, you can use the `poetry run` prefix before other commands to run them without activating the shell.)
93
+
(Note: if `psycopg2` installation fails, you probably just need to install the PostgreSQL headers first and then try again.)
73
94
74
95
### Configure IDE
75
96
76
-
If you are using VSCode or Cursor as your IDE, you will need to select the Poetry-managed Python version as your interpreter for the project. To find the location of the Poetry-managed Python interpreter, run `poetry env info` and look for the `Path` field. Then, in VSCode, go to `View > Command Palette`, search for `Python: Select Interpreter`, and either select Poetry's Python version from the list (if it has been auto-detected) or "Enter interpreter path" manually.
97
+
If you are using VSCode or Cursor as your IDE, you will need to select the `uv`-managed Python version as your interpreter for the project. Go to `View > Command Palette`, search for `Python: Select Interpreter`, and select the Python version labeled `('.venv':venv)`.
77
98
78
99
It is also recommended to install the [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) and [Quarto](https://marketplace.visualstudio.com/items?itemName=quarto.quarto) IDE extensions.
0 commit comments