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
This commit enhances the developer experience by:
- Updating the main README.md with a "Getting Started / Local Development Setup" section, providing clear instructions for running your project locally using Docker Compose.
- Adding a "Useful Scripts" section to the main README.md, documenting key scripts for building, testing, linting, formatting, and client generation.
- Reviewing and updating `development.md` to ensure clarity on Docker Compose usage, local development workflows, and service URLs.
- Reviewing and updating `backend/README.md` and `frontend/README.md` to ensure accuracy of setup, development, and testing instructions.
- Reviewing and adding comments to various scripts in `scripts/` and `backend/scripts/` for better understanding and maintainability.
- Ensuring consistency in commands (e.g., `fastapi dev` vs `fastapi run --reload`).
These changes aim to make it easier for new developers to get started with your project and for existing developers to utilize available scripts and documentation effectively.
@@ -230,6 +240,18 @@ General development docs: [development.md](./development.md).
230
240
231
241
This includes using Docker Compose, custom local domains, `.env` configurations, etc.
232
242
243
+
## Useful Scripts
244
+
245
+
Here's a list of scripts available in the project to help with common development tasks:
246
+
247
+
-`scripts/build.sh`: Builds the Docker images for the project.
248
+
-`scripts/test.sh`: Runs the complete test suite in a Dockerized environment. This typically includes backend tests and can be expanded to include frontend end-to-end tests.
249
+
-`scripts/test-local.sh`: Runs backend tests directly on the host. It assumes the backend services (like the database) are already running (e.g., via `docker compose watch` or a similar local setup).
250
+
-`scripts/generate-client.sh`: Generates or updates the frontend client based on the backend's OpenAPI schema. This usually involves fetching the schema and running a code generation tool.
251
+
-`backend/scripts/format.sh`: Formats the backend Python code using Ruff to ensure consistent code style.
252
+
-`backend/scripts/lint.sh`: Lints the backend Python code using MyPy for static type checking and Ruff for identifying potential errors and style issues.
253
+
-`backend/scripts/test.sh`: Runs backend tests directly on the host (similar to `scripts/test-local.sh` but often focused only on backend unit/integration tests) and generates a test coverage report.
254
+
233
255
## Release Notes
234
256
235
257
Check the file [release-notes.md](./release-notes.md).
Copy file name to clipboardExpand all lines: backend/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,16 +71,16 @@ root@7f2607af31c3:/app#
71
71
72
72
that means that you are in a `bash` session inside your container, as a `root` user, under the `/app` directory, this directory has another directory called "app" inside, that's where your code lives inside the container: `/app/app`.
73
73
74
-
There you can use the `fastapi run --reload` command to run the debug live reloading server.
74
+
There you can use the `fastapi dev` command to run the debug live reloading server.
75
75
76
76
```console
77
-
$ fastapi run --reload app/main.py
77
+
$ fastapi dev app/main.py
78
78
```
79
79
80
80
...it will look like:
81
81
82
82
```console
83
-
root@7f2607af31c3:/app# fastapi run --reload app/main.py
83
+
root@7f2607af31c3:/app# fastapi dev app/main.py
84
84
```
85
85
86
86
and then hit enter. That runs the live reloading server that auto reloads when it detects code changes.
0 commit comments