Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 2.75 KB

CONTRIBUTING.rst

File metadata and controls

58 lines (44 loc) · 2.75 KB

Contribution guide

Setting up the environment

  1. Install Pizza Delivery Man
  2. Run pdm install -G:all to create a virtual environment and install the dependencies
  3. If you're working on the documentation and need to build it locally, install the extra dependencies with pdm install -G:docs
  4. Install pre-commit
  5. Run pre-commit install to install pre-commit hooks

Code contributions

Workflow

  1. Fork the python repository
  2. Clone your fork locally with git
  3. Set up the environment
  4. Make your changes
  5. (Optional) Run pre-commit run --all-files to run linters and formatters. This step is optional and will be executed automatically by git before you make a commit, but you may want to run it manually in order to apply fixes
  6. Commit your changes to git
  7. Push the changes to your fork
  8. Open a pull request. Give the pull request a descriptive title indicating what it changes. If it has a corresponding open issue, the issue number should be included in the title as well. For example a pull request that fixes issue bug: Increased stack size making it impossible to find needle #100 could be titled fix(#100): Make needles easier to find by applying fire to haystack

Tip

Pull requests and commits all need to follow the Conventional Commit format

Guidelines for writing code

  • All code should be fully typed. This is enforced via mypy.
  • All code should be properly formatted. This is enforced via black and Ruff.

Project documentation

The documentation is located in the /docs directory and is ReST and Sphinx. If you're unfamiliar with any of those, ReStructuredText primer and Sphinx quickstart are recommended reads.

Running the docs locally

To run or build the docs locally, you need to first install the required dependencies:

pdm install -G:docs

Then you can serve the documentation with make docs-serve, or build them with make docs.