Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 2.9 KB

CONTRIBUTING.md

File metadata and controls

95 lines (68 loc) · 2.9 KB

Contributing to Django Ninja CRUD

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.

Table of Contents

Setting up Development Environment

  1. Install Python 3.x: Make sure Python 3.x is installed on your machine.

  2. Create a Virtual Environment:

    python3 -m venv venv
  3. Activate the Virtual Environment:

    source venv/bin/activate
  4. Install Poetry:

    pip install poetry
  5. Install Project Dependencies:

    poetry install
  6. 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.

Running Tests

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

Coding and Commit Conventions

Labels for Issues and PRs

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.

Updating an Existing Pull Request

  1. Ensure Your Fork is Up-to-date:

    git remote add upstream https://github.com/hbakri/django-ninja-crud.git
    git fetch upstream
  2. Check Out Your Local Branch: Associated with the PR.

  3. Rebase Your Branch:

    git rebase upstream/main
  4. Resolve Conflicts: If conflicts arise, resolve them.

  5. Commit Your Changes.

  6. 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.