Developer Guide¶
This guide helps contributors and developers work on Clipper locally.
๐ Local Development Setup¶
- Clone the repository:
git clone https://github.com/yourusername/clipper.git
cd clipper
````
2. Create a virtual environment and activate it:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package in editable mode with development dependencies:
pip install -e .[dev]
๐งช Run Tests¶
Clipper uses pytest
for testing.
To run all tests:
pytest
To run only unit tests (skip integration):
pytest -m "not integration"
To run integration tests:
CLIPPER_ENABLE_INTEGRATION=1 pytest
๐ฆ Building and Uploading¶
To build the distribution:
python -m build
To upload to PyPI:
twine upload dist/*
Or to test it on TestPyPI:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
๐งฑ Project Structure¶
clipper/
โโโ __main__.py โ CLI entry point
โโโ core.py โ Main Clipper logic
โโโ config.py โ Config loader
โโโ prompts.py โ Prompt file utilities
โโโ utils.py โ Logging & helper functions
tests/
โโโ test_cli.py โ CLI integration tests
โโโ test_core.py โ Unit tests for core logic
generated_images/ โ Output folder
prompt_log.jsonl โ Log of all prompts & metadata
โ Contributions¶
- Feel free to open issues or PRs
- Style guide: keep it Pythonic + documented
- Use clear commit messages and test your changes
Thanks for helping improve Clipper-AI!