Contributing

We welcome contributions to PlotSmith! Please see the CONTRIBUTING.md file in the repository for guidelines.

Development Setup

  1. Fork the repository

  2. Clone your fork

  3. Install in development mode:

pip install -e ".[dev]"
  1. Run tests:

pytest
  1. Run linting:

ruff check plotsmith/ tests/

Architecture Guidelines

When contributing, please respect the 4-layer architecture:

  • Layer 1 (objects): No matplotlib imports

  • Layer 2 (primitives): Only matplotlib, accepts only Layer 1 objects

  • Layer 3 (tasks): No matplotlib, can use pandas/numpy

  • Layer 4 (workflows): Can use matplotlib, orchestrates tasks and primitives

Code Style

  • Use Google-style docstrings

  • Include type hints for all functions

  • Follow PEP 8 (enforced by ruff)

  • Run ruff check and ruff format before committing

Testing

  • Write tests for new features

  • Ensure all tests pass: pytest

  • Aim for high test coverage