Skip to content

Contributing🔗

Contribution is always welcome.

  1. First, either fork or branch the main repo.

  2. Clone your forked/branched repo.

  3. Build your environment:

    1. With pipenv on Windows:

      if (-not (Test-Path .venv)) {mkdir .venv}
      python -m pipenv install --requirements requirements.txt --requirements requirements-dev.txt --skip-lock
      python -m poetry run pre-commit install
      python -m poetry run pre-commit autoupdate
      python -m poetry shell
      
    2. With pipenv on Linux:

      mkdir .venv
      python3 -m pipenv install --requirements requirements.txt --requirements requirements-dev.txt --skip-lock
      python3 -m poetry run pre-commit install
      python3 -m poetry run pre-commit autoupdate
      python3 -m poetry shell
      
    3. With poetry on Windows:

      python -m pip install --upgrade pip
      python -m pip install poetry
      python -m poetry init
      python -m poetry add $(cat requirements/root.txt)
      python -m poetry add --group=dev $(cat requirements/dev.txt)
      python -m poetry add --group=test $(cat requirements/test.txt)
      python -m poetry add --group=docs $(cat requirements/docs.txt)
      python -m poetry install
      python -m poetry run pre-commit install
      python -m poetry run pre-commit autoupdate
      python -m poetry shell
      
    4. With poetry on Linux:

      python3 -m pip install --upgrade pip
      python3 -m pip install poetry
      python3 -m poetry init
      python3 -m poetry add $(cat requirements/root.txt)
      python3 -m poetry add --group=dev $(cat requirements/dev.txt)
      python3 -m poetry add --group=test $(cat requirements/test.txt)
      python3 -m poetry add --group=docs $(cat requirements/docs.txt)
      python3 -m poetry install
      python3 -m poetry run pre-commit install
      python3 -m poetry run pre-commit autoupdate
      python3 -m poetry shell
      
    5. With uv on Windows:

      powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
      uv install python 3.13
      uv sync --all-groups
      uv run pre-commit install
      uv run pre-commit autoupdate
      
    6. With uv on Linux:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      uv install python 3.13
      uv sync --all-groups
      uv run pre-commit install
      uv run pre-commit autoupdate
      
  4. Start contributing.

  5. When you're happy with the changes, raise a Pull Request to merge with the main branch again.

Build and Test🔗

To ensure that the package is working as expected, please ensure that:

  1. You write your code as per PEP8 requirements (lint using Black).
  2. You write a UnitTest for each function/feature you include.
  3. The CodeCoverage is 100%.
  4. All UnitTests are passing.
  5. MyPy is passing 100%.

Testing🔗

  • Run them all together

    poetry run make check
    
  • Or run them individually:

    • Black

      poetry run make check-black
      

    • PyTests:

      poetry run make ckeck-pytest
      

    • MyPy:

      poetry run make check-mypy