Skip to content

Contributing

The project is in maintenance mode. Bug reports paired with a fix are welcome; new feature requests likely won't be picked up unless you're willing to ship the patch and help maintain it.

Open issues and merge requests on GitLab. The GitHub mirror is read-only.

Local development

The repo ships a Django demo project plus the Angular SPA. The Compose file wires up Postgres and the Django dev server.

docker compose up                                        # Postgres + Django on :8000
docker compose run --rm web ./manage.py migrate
docker compose run --rm web ./manage.py createsuperuser
cd js && npm install && npm start                        # Angular dev server

Log into Django admin first (http://localhost:8000/admin/) — without a session, the API will reject the SPA's requests. Then visit the URL the Angular CLI prints (the dev server proxies /report_builder/api/ to Django, so you get hot reload on the SPA against the live backend).

Running the tests

Backend

docker compose run --rm web ./manage.py test

tox runs the suite against multiple Django versions in parallel — useful before opening an MR:

docker compose run --rm web tox

ruff handles linting and formatting:

docker compose run --rm web ruff check .
docker compose run --rm web ruff format --check .

Frontend

cd js
npm test         # Vitest (jsdom)
npm run lint     # angular-eslint

The frontend is Angular 20 with standalone components, signal-based state, zoneless change detection, and the esbuild application builder. There's no ngrx — state lives in injectable services using signal() / computed(). A few pure helpers (drag/drop position shuffling, recursive related-field filtering) live in report-helpers.ts so they're testable without spinning up TestBed.

Tests focus on real logic: position-shuffling math, error-payload flattening, recursive tree filtering, and ReportService's tab-aware routing. UI rendering tests are deliberately not included — they tend to ossify around implementation details rather than behavior.

Style

  • Python — ruff (config in pyproject.toml)
  • TypeScript / templatesnpm run format runs Prettier; npm run lint runs angular-eslint with the recommended + stylistic + a11y preset

Releasing (maintainers)

  1. Bump version in pyproject.toml
  2. Update CHANGELOG
  3. Tag the commit; CI publishes via uv build && uv publish
  4. ./build_js.sh rebuilds the Angular bundle into report_builder/static/report_builder/ if the SPA changed since the last release; commit those files alongside the version bump so the sdist ships them