Contributing to FastAPI-Endpoints
I am very eager to see what you can contribute to FastAPI-Endpoints! All contributors are welcomed here. Below is a guide to help you get started.
How to Contribute
Reporting Bugs
If you've found a bug, please open an issue and provide as much detail as possible:
- A clear and descriptive title.
- Steps to reproduce the bug.
- Expected and actual behavior.
- Any error messages or logs.
- Add the
bug
tag. - Assign the issue to a maintainer.
Suggesting Features
We appreciate feature suggestions! Please open an issue with the following:
- A clear and descriptive title.
- A detailed explanation of the feature.
- Potential use cases or examples.
- Any relevant screenshots or mockups.
- Add the
feature-request
tag. - Assign the issue to a maintainer.
Submitting Code Changes
If you want to contribute code:
- Fork the repository.
- Create a new branch (
git checkout -b feature/my-new-feature
). It is very important to use thefeature/
prefix to the branch. - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/my-new-feature
). - Open a pull request and provide details about What, Why, How things got changed.
Development Setup
Here’s how to set up the project on your local machine. The project is heavily using Poetry so its expected to have that installed.
Create a new environment using either venv or pyenv for all the supported python versions of fastapi-endpoints
.
- Clone the repository:
git clone https://github.com/yourusername/yourprojectname.git
- Navigate to the project directory:
cd yourprojectname
- Install dependencies:
poetry install
- Make changes to the project.
- Check formatting using
ruff format --check
if there are any issues resolve them withruff format
- Check lint using
ruff check
if there are any issues resolve them in the code. - Run the tests
pytest
Style Guide
- Imports:
- Place all imports at the top of the file, just after any module comments and docstrings.
- Use absolute imports whenever possible.
- Group imports into three sections, in this order: standard library imports, third-party imports, and local application/library-specific imports. Each group should be separated by a blank line.
- Example:
- Docstrings:
- Use docstrings to describe modules, classes, and functions.
-
Follow the PEP 257 conventions for docstrings.
-
Type Annotations:
- Use type annotations to specify the expected data types of function arguments and return values.
- Example:
Commit Messages
Use meaningful commit messages to describe the changes you have made. Follow this format: