|
1 | 1 | # Contributing to FastAPI-boilerplate
|
2 | 2 |
|
3 | 3 | Thank you for your interest in contributing to FastAPI-boilerplate! This guide is meant to make it easy for you to get started.
|
| 4 | +Contributions are appreciated, even if just reporting bugs, documenting stuff or answering questions. To contribute with a feature: |
4 | 5 |
|
5 | 6 | ## Setting Up Your Development Environment
|
6 | 7 |
|
7 | 8 | ### Cloning the Repository
|
8 | 9 | Start by forking and cloning the FastAPI-boilerplate repository:
|
9 | 10 |
|
10 |
| -```sh |
11 |
| -git clone https://github.com/igorbenav/FastAPI-boilerplate.git |
12 |
| -``` |
| 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 | +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 | 14 |
|
14 | 15 | ### Using Poetry for Dependency Management
|
15 | 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/).
|
@@ -53,6 +54,26 @@ ruff format
|
53 | 54 |
|
54 | 55 | Ensure your code passes linting before submitting.
|
55 | 56 |
|
| 57 | +### Using pre-commit for Better Code Quality |
| 58 | + |
| 59 | +It helps in identifying simple issues before submission to code review. By running automated checks, pre-commit can ensure code quality and consistency. |
| 60 | + |
| 61 | +1. **Install Pre-commit**: |
| 62 | + - **Installation**: Install pre-commit in your development environment. Use the command `pip install pre-commit`. |
| 63 | + - **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 | +1. **Committing Your Changes**: |
| 65 | + 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. |
| 66 | + Note: If pre-commit identifies issues, it may block your commit. Fix these issues and commit again. This ensures that all contributions are of high quality. |
| 67 | +1. **Pushing Changes and Creating Pull Request**: |
| 68 | + Push your changes to the branch using `git push origin feature/fooBar`. |
| 69 | + Visit your fork on GitHub and create a new Pull Request to the main repository. |
| 70 | + |
| 71 | +### Additional Notes |
| 72 | + |
| 73 | +**Stay Updated**: Keep your fork updated with the main repository to avoid merge conflicts. Regularly fetch and merge changes from the upstream repository. |
| 74 | +**Adhere to Project Conventions**: Follow the coding style, conventions, and commit message guidelines of the project. |
| 75 | +**Open Communication**: Feel free to ask questions or discuss your ideas by opening an issue or in discussions. |
| 76 | + |
56 | 77 | ## Submitting Your Contributions
|
57 | 78 |
|
58 | 79 | ### Creating a Pull Request
|
|
0 commit comments