Contributing¶
Thank you for your interest in contributing to Piggyback!
Development setup¶
git clone https://github.com/kurtisrogers/piggyback.git
cd piggyback
pip install -e ".[dev]"
pre-commit install
playwright install chromium
cd example
python manage.py migrate
python manage.py load_sample_data --fixture
Fixtures¶
Sample catalog data ships as a Django fixture:
python manage.py load_sample_data --fixture
# equivalent to:
python manage.py loaddata sample_data
The programmatic loader remains available without --fixture.
Running tests¶
Unit tests¶
pytest tests/ --ignore=tests/bdd
BDD / Playwright E2E¶
Gherkin features live in tests/bdd/features/:
playwright install chromium
DJANGO_ALLOW_ASYNC_UNSAFE=true pytest tests/bdd -v
Scenarios cover the home page, card catalog, authentication, and the system-user API.
Everything¶
DJANGO_ALLOW_ASYNC_UNSAFE=true pytest
Pre-commit¶
Hooks run ruff, formatting, and JSON/YAML checks:
pre-commit install # once per clone
pre-commit run --all-files
A pre-push hook also runs fast unit tests.
Code style¶
We use ruff for linting and formatting:
ruff check src/ tests/
ruff format src/ tests/
Pull requests¶
- Fork the repository
- Create a feature branch
- Write tests for new functionality (unit + BDD where relevant)
- Ensure
pre-commit run --all-filesandpytestpass - Submit a pull request
Reporting issues¶
Please use GitHub Issues to report bugs or request features.