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: CONTRIBUTING.md
+14-9Lines changed: 14 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,22 +10,27 @@ Start by forking and cloning the FastAPI-boilerplate repository:
10
10
11
11
1.**Fork the Repository**: Begin by forking the project repository. You can do this by visiting https://github.com/igormagalhaesr/FastAPI-boilerplate and clicking the "Fork" button.
12
12
1.**Create a Feature Branch**: Once you've forked the repo, create a branch for your feature by running `git checkout -b feature/fooBar`.
13
-
1.**Testing Changes**: Ensure that your changes do not break existing functionality by running tests. In the root folder, execute poetry run `python -m pytest` to run the tests.
13
+
1.**Testing Changes**: Ensure that your changes do not break existing functionality by running tests. In the root folder, execute `uv run pytest` to run the tests.
14
14
15
-
### Using Poetry for Dependency Management
16
-
FastAPI-boilerplate uses Poetry for managing dependencies. If you don't have Poetry installed, follow the instructions on the [official Poetry website](https://python-poetry.org/docs/).
15
+
### Using uv for Dependency Management
16
+
FastAPI-boilerplate uses uv for managing dependencies. If you don't have uv installed, follow the instructions on the [official uv website](https://docs.astral.sh/uv/).
17
17
18
-
Once Poetry is installed, navigate to the cloned repository and install the dependencies:
18
+
Once uv is installed, navigate to the cloned repository and install the dependencies:
19
19
```sh
20
20
cd FastAPI-boilerplate
21
-
poetry install
21
+
uv sync
22
22
```
23
23
24
24
### Activating the Virtual Environment
25
-
Poetry creates a virtual environment for your project. Activate it using:
25
+
uv creates a virtual environment for your project. Activate it using:
26
26
27
27
```sh
28
-
poetry shell
28
+
source .venv/bin/activate
29
+
```
30
+
31
+
Alternatively, you can run commands directly with `uv run` without activating the environment:
32
+
```sh
33
+
uv run python your_script.py
29
34
```
30
35
31
36
## Making Contributions
@@ -37,7 +42,7 @@ poetry shell
37
42
### Testing with Pytest
38
43
FastAPI-boilerplate uses pytest for testing. Run tests using:
39
44
```sh
40
-
poetry run pytest
45
+
uv run pytest
41
46
```
42
47
43
48
### Linting
@@ -59,7 +64,7 @@ Ensure your code passes linting before submitting.
59
64
It helps in identifying simple issues before submission to code review. By running automated checks, pre-commit can ensure code quality and consistency.
60
65
61
66
1.**Install Pre-commit**:
62
-
-**Installation**: Install pre-commit in your development environment. Use the command `pip install pre-commit`.
67
+
-**Installation**: Install pre-commit in your development environment. Use the command `uv add --dev pre-commit` or `pip install pre-commit`.
63
68
-**Setting Up Hooks**: After installing pre-commit, set up the hooks with `pre-commit install`. This command will install hooks into your .git/ directory which will automatically check your commits for issues.
64
69
1.**Committing Your Changes**:
65
70
After making your changes, use `git commit -am 'Add some fooBar'` to commit them. Pre-commit will run automatically on your files when you commit, ensuring that they meet the required standards.
0 commit comments