Skip to content

Commit 8cbea57

Browse files
authored
Add an independent contribution document (#971)
1 parent 7845e1f commit 8cbea57

File tree

2 files changed

+62
-63
lines changed

2 files changed

+62
-63
lines changed

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Backend
2+
3+
1. Prerequisites
4+
5+
- Python >= 3.10
6+
- Git
7+
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
8+
- Fork this repository to your GitHub account
9+
10+
2. Installation and setup
11+
12+
Clone your forked repository:
13+
14+
```shell
15+
git clone https://github.com/<your account>/fastapi_best_architecture.git
16+
```
17+
18+
Go to the root directory of the project, open the terminal, and run the following command:
19+
20+
```sh
21+
uv sync
22+
```
23+
24+
3. Checkout
25+
26+
Checkout a new branch and make your changes
27+
28+
```shell
29+
git checkout -b your-new-feature-branch
30+
```
31+
32+
4. Format and Lint
33+
34+
Auto-formatting and lint via `prek`
35+
36+
```shell
37+
prek run --all-files
38+
```
39+
40+
5. Commit and push
41+
42+
Commit your changes and push your branch to the GitHub.
43+
44+
6. PR
45+
46+
Create a PR via GitHub
47+
48+
## Scripts
49+
50+
> [!WARNING]
51+
>
52+
> The following script may not apply to the Windows platform
53+
>
54+
> It is recommended to execute under the backend directory, and chmod authorization may be required
55+
56+
- `migrate.sh`: Perform automatic database migration
57+
58+
- `scripts/format.sh`: Perform ruff format check
59+
60+
- `scripts/lint.sh`: Perform prek formatting
61+
62+
- `scripts/export.sh`: Execute uv export dependency package

backend/README.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -16,66 +16,3 @@
1616
```shell
1717
docker run -d -p 8000:8000 --name fba_server fba_backend_independent
1818
```
19-
20-
## Contributing
21-
22-
1. Prerequisites
23-
24-
- Python >= 3.10
25-
- Git
26-
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
27-
- Fork this repository to your GitHub account
28-
29-
2. Installation and setup
30-
31-
Clone your forked repository:
32-
33-
```shell
34-
git clone https://github.com/<your account>/fastapi_best_architecture.git
35-
```
36-
37-
Go to the root directory of the project, open the terminal, and run the following command:
38-
39-
```sh
40-
uv sync --frozen
41-
```
42-
43-
3. Checkout
44-
45-
Checkout a new branch and make your changes
46-
47-
```shell
48-
git checkout -b your-new-feature-branch
49-
```
50-
51-
4. Format and Lint
52-
53-
Auto-formatting and lint via `prek`
54-
55-
```shell
56-
prek run --all-files
57-
```
58-
59-
5. Commit and push
60-
61-
Commit your changes and push your branch to the GitHub.
62-
63-
6. PR
64-
65-
Create a PR via GitHub
66-
67-
## Scripts
68-
69-
> [!WARNING]
70-
>
71-
> The following script may not apply to the Windows platform
72-
>
73-
> It is recommended to execute under the backend directory, and chmod authorization may be required
74-
75-
- `pre_start.sh`: Perform automatic database migration
76-
77-
- `scripts/format.sh`: Perform ruff format check
78-
79-
- `scripts/lint.sh`: Perform prek formatting
80-
81-
- `scripts/export.sh`: Execute uv export dependency package

0 commit comments

Comments
 (0)