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: README.md
+19-8
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ Note that this is a template project. You will need to make changes to this appl
8
8
9
9
## Development setup
10
10
11
+
### Prerequisites
12
+
11
13
1. (Optional) Install Pyenv ([Linux](https://github.com/pyenv/pyenv), [Windows](https://github.com/pyenv-win/pyenv-win)) and the [Python installation](.python-version) needed for this project:
12
14
```shell
13
15
pyenv install
@@ -18,38 +20,47 @@ pyenv install
18
20
> [!IMPORTANT]
19
21
> You should **NOT** install poetry into your virtual environment as stated in their docs, as this may mess with your dependencies.
20
22
21
-
3. Create a virtual environment:
23
+
### Setup
24
+
25
+
1. Create a virtual environment:
22
26
```shell
23
27
# Note: For POSIX, pyenv can create a named virtual environment which you can use instead.
24
28
# For Windows, pyenv-win exists, but doesn't have this feature afaik.
25
29
30
+
# Create a local virtual environment (inside .venv/)
26
31
python3 -m venv .venv
27
32
33
+
# Activate it:
34
+
28
35
# Windows
29
36
./.venv/Scripts/activate
30
37
31
38
# POSIX
32
39
source ./.venv/bin/activate
33
40
```
34
41
35
-
4.[Windows] Run the `scripts/dev-setup.bat` script:
42
+
2. Create development environment and install dependencies (pre-made script does it):
43
+
36
44
```shell
45
+
# [Windows] Run the `scripts/dev-setup.bat` script:
37
46
./scripts/dev-setup.bat
38
-
```
39
47
40
-
4.[POSIX] Run the `scripts/dev-setup.sh` shell script using any bash-compatible shell:
41
-
```shell
48
+
# [POSIX] Run the `scripts/dev-setup.sh` shell script using any bash-compatible shell:
42
49
bash ./scripts/dev-setup.sh
43
50
```
44
51
45
-
5. Create a `.env` file from the given example and edit it:
52
+
> [!NOTE]
53
+
> This scripts does the following:
54
+
> Creates a `dev/` folder needed to save log files and other persistent files used by the app, installs the requirements of the app using poetry, installs `pre-commit` hooks to this repository and also runs the pre-commit hooks.
55
+
56
+
3. Create a `.env` file from the given example and edit it:
46
57
```shell
47
58
cp .env.example .env
48
59
49
60
# Open the new .env file in your favourite editor and make the required changes
50
61
```
51
62
52
-
6. Run the dev server using `F5` key in VSCode. You can also use the `dev-launch` shell script:
63
+
4. Run the dev server using `F5` key in VSCode. You can also use the `dev-launch` shell script:
0 commit comments