Updated the backend contribution guide (#544)

This commit is contained in:
Wu Clan
2025-03-12 18:15:10 +08:00
committed by GitHub
parent d28f152d78
commit 18ffa06d70

View File

@ -1,4 +1,4 @@
# FBA Project - Backend # FastAPI Best Architecture - Backend
## Docker ## Docker
@ -21,41 +21,48 @@
1. Prerequisites 1. Prerequisites
You'll need the following prerequisites: - Python >= 3.10
- Any python version between Python >= 3.10
- Git - Git
- [uv](https://docs.astral.sh/uv/getting-started/installation/) - [uv](https://docs.astral.sh/uv/getting-started/installation/)
- Fork this repository to your GitHub account - Fork this repository to your GitHub account
2. Installation and setup 2. Installation and setup
Clone your fork and cd into the repo directory Clone your forked repository:
```shell ```shell
git clone https://github.com/<your username>/fastapi_best_architecture.git git clone https://github.com/<your account>/fastapi_best_architecture.git
```
cd fastapi_best_architecture/backend
Go to the root directory of the project, open the terminal, and run the following command:
```sh
uv sync --frozen uv sync --frozen
``` ```
3. Checkout a new branch and make your changes 3. Checkout
Checkout a new branch and make your changes
```shell ```shell
# Checkout a new branch and make your changes
git checkout -b your-new-feature-branch git checkout -b your-new-feature-branch
``` ```
4. Run linting 4. Format and Lint
Auto-formatting and lint via `pre-commit`
```shell ```shell
# Run automated code formatting and linting
pre-commit run --all-files pre-commit run --all-files
``` ```
5. Commit and push your changes 5. Commit and push
Commit your changes, push your branch to GitHub, and create a pull request. Commit your changes and push your branch to the GitHub.
6. PR
Create a PR via GitHub
## Scripts ## Scripts