We welcome contributions to Django-Ninja-CRUD! This document outlines how to contribute to this project and provides guidelines to make the process smoother for everyone involved.
For an overview of how to contribute to open-source projects on GitHub, see GitHub's official documentation.
- Setting up Development Environment
- Running Tests
- Coding and Commit Conventions
- Labels for Issues and PRs
- Updating an Existing Pull Request
-
Install Python 3.x: Make sure Python 3.x is installed on your machine.
-
Create a Virtual Environment:
python3 -m venv venv
-
Activate the Virtual Environment:
source venv/bin/activate
-
Install Poetry:
pip install poetry
-
Install Project Dependencies:
poetry install
-
Install Pre-commit Hooks: Set up the pre-commit hooks with:
pre-commit install
This will automatically run checks before each commit, helping you adhere to the coding and commit conventions.
After setting up your development environment, you can run tests to make sure everything is functioning as expected. To run the tests, use the following commands:
coverage run -m django test --settings=tests.test_settings
coverage report
- We adhere to the PEP 8 coding style guide.
- For commits, we follow the Conventional Commits specification.
We use a set of labels to categorize issues and pull requests. This helps in project management and prioritizing work.
- bug: For marking issues that are bugs.
- enhancement: For new features or improvements.
- documentation: Issues related to documentation.
- good first issue: Easier issues aimed at beginners.
- help wanted: Issues that need additional support.
-
Ensure Your Fork is Up-to-date:
git remote add upstream https://github.com/hbakri/django-ninja-crud.git git fetch upstream
-
Check Out Your Local Branch: Associated with the PR.
-
Rebase Your Branch:
git rebase upstream/main
-
Resolve Conflicts: If conflicts arise, resolve them.
-
Commit Your Changes.
-
Force Push to Update the PR:
git push origin <your-branch> --force
Thank you for contributing to django-ninja-crud
! Your efforts help make this project better for everyone.