Skip to content

Commit ee1ce44

Browse files
committed
docs: update virtualenv set up
1 parent 291926e commit ee1ce44

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

project/docs/index.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The dependencies are broken into groups:
2020

2121
* Development dependencies: required for development, testing, and documentation.
2222

23-
The specified python version in `pyproject.toml` is `3.11`, and so a **python 3.11** interpreter should be used.
23+
The specified python version in `pyproject.toml` is `>=3.11`, and so a **python 3.11** interpreter should be used.
2424

2525
#### Conda
2626

@@ -34,27 +34,26 @@ $ pdm use -f $(which python3)
3434
$ pdm install
3535
```
3636

37-
#### Pyenv
37+
#### Vitualenv
3838

39-
To do so with [pyenv](https://github.com/pyenv/pyenv):
39+
To do so with [virtualenv](https://github.com/pypa/virtualenv), use the [pdm venv](https://pdm-project.org/en/latest/reference/cli/#venv) command:
4040

4141
```bash
42-
$ pyenv install --list | grep " 3\.\(10\|11\|12\)\."
43-
$ pyenv install 3.11.9
44-
# See https://pdm-project.org/latest/reference/cli/#use
45-
$ pdm use -f $(pyenv shell 3.11.9; pyenv which python3)
42+
$ pdm venv create --name text_summarizer_api --with virtualenv 3.11.9
43+
# To activate the virtual environment
44+
$ eval $(pdm venv activate text_summarizer_api)
4645
$ pdm install
4746
```
4847

4948
---
5049

5150
## Docker Compose
5251

53-
The development environment is set up using [Docker Compose](https://docs.docker.com/compose/). This setup defines two services--- `web` (for the FastAPI application) and `web-db` (for the PostgreSQL database).
52+
The development environment is set up using [Docker Compose](https://docs.docker.com/compose/). This setup defines two services:
5453

5554
* **web**: sets up the application based on `dev.Dockerfile`.
5655

57-
* **wev-db**: sets up a PostgreSQL database based on `db.Dockerfile`, which simply [add](https://docs.docker.com/reference/dockerfile/#add)s a `.sql` file to the container at `/docker-entrypoint-initdb.d/`.
56+
* **wev-db**: sets up a PostgreSQL database based on `db.Dockerfile`, which simply [Add](https://docs.docker.com/reference/dockerfile/#add)s a `.sql` file to the container at `/docker-entrypoint-initdb.d/`. Two databases are created: `web_dev` for development and `web_test` for testing; neither is used in production.
5857

5958
### Build and Run the Services
6059

@@ -157,7 +156,7 @@ See the aerich's [usage](https://github.com/tortoise/aerich?tab=readme-ov-file#u
157156

158157
## PSQL
159158

160-
The PostgreSQL database can be accessed using [psql](https://www.postgresql.org/docs/current/app-psql.html), which is a terminal-based front-end to PostgreSQL.
159+
The PostgreSQL database can be accessed using [psql](https://www.postgresql.org/docs/current/app-psql.html), a terminal-based front-end to PostgreSQL.
161160

162161
```bash
163162
$ docker exec -it <service-name> psql -U postgres

0 commit comments

Comments
 (0)