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
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,9 @@ images can also be build with `docker compose build`.
28
28
## Developing
29
29
30
30
When developing, the required services can be run using [Docker](https://www.docker.com/). You can then run the backend
31
-
and frontend standalone from the command line or in your favorite IDE (to make debugging easier).
31
+
and frontend standalone from the command line or in your favorite IDE (to make debugging easier). We use Pycharm and have
32
+
made our run configurations available in the `.run` folder. Pycharm should automatically pick it up, but you will have
33
+
to change the path to the Python virtual environment to point to your path on your host.
32
34
33
35
### Required Services
34
36
@@ -42,14 +44,19 @@ and frontend standalone from the command line or in your favorite IDE (to make d
42
44
After starting up the required services, setup and run the backend.
43
45
44
46
The backend is developed using [Python](https://www.python.org/), [FastAPI](https://fastapi.tiangolo.com/), [Motor](https://motor.readthedocs.io/en/stable/).
47
+
We recommend using Python v3.9 and [pipenv](https://github.com/pypa/pipenv) for dependency management.
48
+
49
+
You can run the backend using the Pycharm run configuration provided under `.run` or from the command line using the
50
+
following steps.
45
51
46
52
1. Switch to backend directory `cd backend`.
47
-
2. Install dependencies using `pipenv install --dev`. See [pipenv](https://github.com/pypa/pipenv).
53
+
2. Install dependencies using `pipenv install --dev`.
48
54
3. Run app from command line (if you set it up in PyCharm you can use its debug functions):
49
55
```pipenv run uvicorn app.main:app --reload```
50
56
4. API docs are available at `http://localhost:8000/docs`. Default API is deployed at `http://localhost:8000/api/v2`.
51
57
5. Create a user using `POST /api/v2/users` and getting a JWT token by using `POST /api/v2/login`. Place the token in
52
58
header of requests that require authentications using the `Authorization: Bearer <your token>` HTTP header.
59
+
* You can also run the frontend below and use the Login link available there.
53
60
6. Manually run tests before pushing with `pipenv run pytest -v` or right-clicking on `test` folder and clicking `Run` in PyCharm.
54
61
7. Linting is done using [Black]((https://black.readthedocs.io/en/stable/)). You can set up PyCharm to automatically
55
62
run it when you save a file using these [instructions](https://black.readthedocs.io/en/stable/integrations/editors.html).
@@ -64,7 +71,10 @@ To run the frontend, both required services and backend must be running successf
64
71
65
72
The frontend is developed using [TypeScript](https://www.typescriptlang.org/), [React](https://reactjs.org/),
0 commit comments