Thank you for your interest in contributing to ideamaxfx. This document provides guidelines and information for contributors.
git clone https://github.com/devideamax/ideamaxfx.git
cd ideamaxfx
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e ".[dev]"- Linter: ruff (line length 100, target Python 3.9)
- Type annotations: PEP 484 on all public function signatures
- Docstrings: Google style on all public functions
- Imports: Use
from __future__ import annotationsin every module
Run before committing:
ruff check src/
ruff format src/- All effect functions accept
PIL.Image.Imageand returnPIL.Image.Image. Never mutate the input. - Core dependencies are Pillow, numpy, and imageio only. Do not add new required dependencies.
- Optional dependencies (matplotlib, scipy) must be guarded with try/except or TYPE_CHECKING imports.
- No side effects on import. Modules must not execute code, open files, or print on import.
pytest tests/ -v
pytest tests/ --cov=ideamaxfx --cov-report=term-missingRequirements:
- All new public functions must have tests
- Maintain 80%+ coverage on effects and animate modules
- Tests must be fast (use small images, short durations)
- Use fixtures from
tests/conftest.py
- Fork the repository and create a feature branch from
main - Write code following the standards above
- Add or update tests for your changes
- Ensure all tests pass and ruff reports no errors
- Update CHANGELOG.md under an
## Unreleasedsection - Submit a pull request with a clear description of the change
feat: add glitch effect to effects module
fix: correct vignette alpha blending on RGBA input
docs: add radar_sweep usage example
test: add coverage for layout module
refactor: simplify blend mode numpy operations
- Create
src/ideamaxfx/effects/your_effect.py - Function signature:
def your_effect(img: Image.Image, ...) -> Image.Image - Add Google-style docstring with Args, Returns sections
- Export from
effects/__init__.py - Add a method to
EffectsPipelineineffects/pipeline.py - Write tests in
tests/test_effects.py - Add a before/after example in
examples/gallery_generator.py
- Create
src/ideamaxfx/animate/your_anim.py - Use
generate_frames()fromanimate/core.pyas the base loop - Accept
fps,duration,hold_seconds,easingparameters - Return
list[Image.Image] - Export from
animate/__init__.py - Write tests in
tests/test_animate.py
When reporting bugs, please include:
- Python version and OS
- ideamaxfx version (
python -c "import ideamaxfx; print(ideamaxfx.__version__)") - Minimal reproducible example
- Full traceback
By contributing, you agree that your contributions will be licensed under the MIT License.