Contributing

Thank you for your interest in contributing to mini-causal! Contributions are welcome — whether bug reports, documentation improvements, examples, or code changes.

How to Report an Issue

  • Search existing issues to avoid duplicates

  • When filing a new issue, provide a clear title and a short description of the problem or feature request

  • Include a minimal reproducible example when possible: data sample, code snippet, and any error tracebacks

Development Setup

  1. Create and activate a virtual environment

    Windows (PowerShell):

    python -m venv .venv
    .\.venv\Scripts\Activate.ps1
    

    macOS/Linux (bash):

    python -m venv .venv
    source .venv/bin/activate
    
  2. Install the package and project dependencies:

    pip install -e .
    pip install -r requirements.txt
    
  3. (Optional) Install example dependencies to run notebooks:

    pip install jupyter matplotlib seaborn
    

Running Tests

Run the test suite with:

pytest -q

Code Style and Quality

  • Follow Python 3 style (PEP 8)

  • Use black and isort to format code

  • Add or update tests for any bug fixes or new features

  • Include docstrings for all public functions and classes

Workflow for Contributions

  1. Fork the repository and create a topic branch for your change

  2. Make small, focused commits with clear messages

  3. Ensure tests pass locally and add tests if relevant

  4. Open a pull request against the main branch describing the change and linking any related issues

Pull Request Checklist

  • [ ] The PR has a descriptive title and summary

  • [ ] Relevant tests were added or updated

  • [ ] Code is formatted and linted

  • [ ] Documentation and examples updated if applicable

Review Process

Maintainers will review PRs and may request changes. Please respond to review comments; maintainers will help guide any required updates.

Acknowledgements

Thanks again for contributing — even small improvements make a big difference!