Skip to content

Commit 274aa08

Browse files
committed
Updated README
1 parent 87baf41 commit 274aa08

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

README.md

+19-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Note that this is a template project. You will need to make changes to this appl
88

99
## Development setup
1010

11+
### Prerequisites
12+
1113
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:
1214
```shell
1315
pyenv install
@@ -18,38 +20,47 @@ pyenv install
1820
> [!IMPORTANT]
1921
> You should **NOT** install poetry into your virtual environment as stated in their docs, as this may mess with your dependencies.
2022
21-
3. Create a virtual environment:
23+
### Setup
24+
25+
1. Create a virtual environment:
2226
```shell
2327
# Note: For POSIX, pyenv can create a named virtual environment which you can use instead.
2428
# For Windows, pyenv-win exists, but doesn't have this feature afaik.
2529

30+
# Create a local virtual environment (inside .venv/)
2631
python3 -m venv .venv
2732

33+
# Activate it:
34+
2835
# Windows
2936
./.venv/Scripts/activate
3037

3138
# POSIX
3239
source ./.venv/bin/activate
3340
```
3441

35-
4. [Windows] Run the `scripts/dev-setup.bat` script:
42+
2. Create development environment and install dependencies (pre-made script does it):
43+
3644
```shell
45+
# [Windows] Run the `scripts/dev-setup.bat` script:
3746
./scripts/dev-setup.bat
38-
```
3947

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:
4249
bash ./scripts/dev-setup.sh
4350
```
4451

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:
4657
```shell
4758
cp .env.example .env
4859

4960
# Open the new .env file in your favourite editor and make the required changes
5061
```
5162

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:
5364
```shell
5465
# Windows
5566
./scripts/dev-launch.bat
@@ -58,7 +69,7 @@ cp .env.example .env
5869
bash ./scripts/dev-launch.sh
5970
```
6071

61-
7. You can also run the cli script:
72+
5. You can also run the cli script:
6273
```shell
6374
sample-fastapi --help
6475
```

0 commit comments

Comments
 (0)