First off, thanks for taking the time to contribute!
Before submitting
- Check that your issue does not already exist in the issue tracker
If you have any question about fastapi-mvc, or you are seeking for help you are encouraged to open question or a new discussion.
Feel free to open enhancement so we can discuss it. Bringing new ideas and pointing out elements needing clarification allows to make this project better!
If you encountered an unexpected behavior using fastapi-mvc, please open bug report and provide the necessary information by filling in the template.
The project could always use more documentation, whether as part of the official project docs, or even on the web in blog posts, articles, and such.
Feel free to discuss with community through discussion channel.
This project is made of two things:
- Package: fastapi-mvc - implementation, tests, etc.
- Builtin copier templates:
- fastapi-mvc/copier-project for scaffolding new fastapi-mvc project.
- fastapi-mvc/copier-controller for scaffolding new controller upon fastapi-mvc project.
- fastapi-mvc/copier-generator for scaffolding new generator for fastapi-mvc.
- fastapi-mvc/copier-script for scaffolding new shell script.
The project template (copier-project) has their own tests and checks. However, since template isn't a valid Python code until its generated, all checks are done on the default (full) generated project in fastapi-mvc/copier-project CI workflow.
Git Commit Messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Reference issues and pull requests liberally after the first line
Metrics stage ensure following rules are followed:
This project provides two ways of setting up the project for local development. Feel free to choose one that suits you the most.
Poetry | Nix (recommended) |
---|---|
Prerequisites:
|
Prerequisites:
|
You will first need to fork fastapi-mvc and clone repository: git clone git@github.com:your_username/fastapi-mvc.git
cd fastapi-mvc |
|
Now, you will need to install the required dependencies for fastapi-mvc with make install By default export PYTHON=/path/to/my/python
make install If export POETRY_HOME=/custom/poetry/path
export POETRY_CACHE_DIR=/custom/poetry/path/cache
export POETRY_VIRTUALENVS_IN_PROJECT=true
make install |
First enable Nix flakes if needed. (Optional) Setup fastapi-mvc Nix binary cache to speed up the build process: nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use fastapi-mvc Build fastapi-mvc development environment with Nix: nix build .#fastapi-mvc-dev --print-build-logs NOTE! On first run this may take a while. To spawn shell with complete development environment form Nix: nix develop |
Create a branch for local development: git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. When you're done making changes, check that your changes pass all tests: |
|
make metrics
make test |
nix run .#metrics
nix run .#test |
Commit your changes and push your branch to GitHub: git add .
git commit -m "Meaningfull commit message"
git push origin name-of-your-bugfix-or-feature |
Before you submit a pull request, check that it meets these guidelines:
- Updated the
CHANGELOG.md
file with your changes. - Added tests for changed code where applicable.
- Documentation reflects the changes where applicable.
- Open a new pull request
If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!