Contributing to IceCream

Contributions are welcome! Whether it's a bug report, a new feature, or documentation improvements, your help is appreciated.

Development Setup

To get started with development, you'll need to set up a local environment.

  1. Fork and Clone the Repository

    First, fork the repository on GitHub. Then, clone your fork locally:

    git clone https://github.com/YOUR-USERNAME/icecream.git
    cd icecream
  2. Install tox

    This project uses tox to manage test environments and dependencies. Install it using pip:

    pip install tox

Running Tests

icecream is tested against multiple versions of Python. tox automates the process of running tests in isolated virtual environments for each version.

To run the full test suite against all supported Python versions defined in tox.ini:

tox

To run tests for a specific environment (e.g., Python 3.9):

tox -e py39

To run the mypy static type checks:

tox -e mypy

The test environments defined in tox.ini include:

  • py38, py39, py310, py311, py312, py313
  • pypy3
  • mypy

Make sure all tests and checks pass before submitting a pull request.

Submitting a Pull Request

  1. Create a new branch for your feature or bug fix:

    git checkout -b my-awesome-feature

  2. Make your changes and add tests for them.

  3. Ensure the test suite passes: tox
  4. Commit your changes and push them to your fork:

    git commit -m "feat: Add awesome feature"
    git push origin my-awesome-feature

  5. Open a pull request from your fork to the master branch of the original icecream repository.