Thanks for your interest in contributing to memeplotlib!
-
Clone the repository:
git clone https://github.com/brianckeegan/memeplotlib.git cd memeplotlib -
Install in editable mode with dev dependencies:
pip install -e ".[dev]" -
Run the tests:
pytest
- Type hints: Use type annotations on all public functions (PEP 604 union syntax
X | Y). - Docstrings: NumPy-style docstrings on all public classes and functions.
- Imports: Always include
from __future__ import annotationsat the top of each module. - Linting: We use ruff with a line length of 99. Run
ruff check .before submitting. - Naming: Private modules use a leading underscore (e.g.,
_api.py). Public API is re-exported from__init__.py.
# Run all tests
pytest
# Run with coverage
pytest --cov=memeplotlib
# Skip slow (network) tests
pytest -m "not slow"- Create a feature branch from
main. - Make your changes with clear, descriptive commits.
- Add or update tests for any new or changed functionality.
- Ensure
pytestandruff check .pass. - Open a PR with a description of what changed and why.
memeplotlib discovers templates dynamically from the memegen API.
To add custom default text positions for a specific template, modify the
_from_api_data method in src/memeplotlib/_template.py.