Extra info#
π Project Structure#
/qualpipe-webapp
β
βββ kind-dev-config.yml # Kind configuration file for local development
βββ chart/ # Helm chart instructions for deployment
βββ Makefile # Makefile to build Backend and Frontend
β
βββ docs/ # Document folder
β
βββ src/
β βββ qualpipe_webapp/
β βββ backend/ # FastAPI backend
β β βββ main.py # Main FastAPI app for backend
β β βββ backends/ # Backend implementations
β β βββ codegen/ # Code generation templates and scripts
β β βββ quality_reports/ # Quality report generation templates and scripts
β β βββ requirements.txt # Backend dependencies
β β βββ requirements-dev.txt # Backend dependencies for developer
β β βββ Dockerfile # Backend container
β β
β βββ frontend/ # FastAPI frontend
β β βββ /templates/ # Template pages
β β βββ /static/ # Static files (css, js, lib)
β β βββ main.py # Main FastAPI app for frontend
β β βββ requirements.txt # Frontend dependencies
β β βββ requirements-dev.txt # Frontend dependencies for developer
β β βββ Dockerfile # Frontend container
β
βββ .gitignore
Pixi Commands#
All the available Pixi tasks are listed and described in the table below.
Command: |
Description |
|---|---|
|
Activate the pixi environment |
|
Install editable pixi environment |
|
Install editable pixi environment with all extra dependencies |
|
Generate/update backend requirements.txt |
|
Generate/update frontend requirements.txt |
|
Generate/update backend requirements-dev.txt |
|
Generate/update frontend requirements-dev.txt |
|
Generate/update backend and frontend requirements.txt |
|
Generate/update backend and frontend requirements-dev.txt |
|
Install NodeJS dependencies |
|
Generate Pydantic models from qualpipe criteria |
|
Generate yaml file for javascript frontend validation (combines those produced by |
|
Build backend image |
|
Build backend dev image |
|
Build frontend image |
|
Build frontend dev image |
|
Build backend- and frontend- images |
|
Build backend- and frontend- dev images |
|
Create local kind cluster |
|
Delete local kind cluster |
|
Load docker images on the cluster |
|
Load docker dev images on the cluster |
|
Show kubernetes cluster status |
|
Remove kubernetes resources left from previously failed installation |
|
Install Helm chart |
|
Install Helm chart for local development |
|
|
|
Upgrade Helm chart |
|
Upgrade Helm chart for local development |
|
Install dependencies, execute |
|
Install dev dependencies in editable mode, execute |
|
Production deployment |
|
Deploy the complete development environment (create kubernetes cluster, build docker dev images, install dev helm chart) |
|
Deploy the complete development environment without rebuilding images |
|
Re-build images and reinstall Helm chart |
|
Re-build dev images and reinstall Helm chart |
|
Reinstall Helm chart |
|
Stop pods preserving cluster |
|
Stop pods and delete the cluster |
|
Cleanup dangling Docker images |
|
Stop pods, delete cluster, and remove docker images |
|
Install Playwright browsers for e2e tests |
|
Run backend python unit tests with Pytest |
|
Run frontend python unit tests with Pytest |
|
Run frontend javascript unit tests with Mocha |
|
Run frontend javascript end-to-end tests with Playwright |
|
Run all backend and frontend tests |
|
Check backend health |
|
Check frontend health |
|
Check backend and frontend health |
|
Show backend container logs |
|
Show frontend container logs |
|
Show backend and frontend container logs |
|
Check dev environment, backend and frontend health, API endpoint, running pods |
|
Run ruff formatting |
|
Run ruff linting |
|
Run ruff linting and fix |
Pixi dependency graph tasks#
install ββ
β
generate-codegen ββ
β
compile-requirements-backend βββ
βββ compile-requirements
compile-requirements-frontend ββ
compile-requirements-backend-dev βββ
βββ compile-requirements-dev
compile-requirements-frontend-dev ββ
install-all ββ
β
generate-codegen ββ
β
compile-requirements-backend-dev βββ
βββ compile-requirements-dev
compile-requirements-frontend-dev ββ β
β
npm-install βββββββββββββββββββββββββββββββββββββββββββ€
βββ dev-setup
generate-frontend-schema ββββββββββββββββββββββββββββββ
kind-create ββββββββββββββββββββββββββββββββββ
build-backend-dev ββββββββββββββ β
βββ build-images-dev ββ
build-frontend-dev ββββββββββββββ β
βββ dev-up
helm-dev-install ββββββββββββββββββββββββββββββββββββββ
kind-create ββββββββ
βββ dev-up-no-build
helm-dev-install βββ
build-backend βββ
βββ build-images
build-frontend ββ
kind-clean-failed ββ
βββ helm-install
kind-load-images βββ
kind-clean-failed βββββ
βββ helm-dev-install
kind-load-dev-images ββ
kind-load-images βββ helm-upgrade
kind-load-dev-images βββ helm-dev-upgrade
helm-uninstall ββββ
build-images ββββββ€ββ restart
helm-install ββββββ
helm-uninstall ββββ
build-images-dev ββ€ββ dev-restart
helm-install ββββββ
helm-uninstall ββββ
βββ dev-restart-no-build
helm-dev-install ββ
helm-uninstall βββ stop
kind-delete ββ
βββ stop-and-delete
βββ clean-all
test-backend βββββββββββββββ
test-frontend-py βββββββββββ€
test-frontend-js βββββββββββ€
browser-install βββ test-frontend-e2e
βββ all-tests
check-backend βββ
βββ check
check-frontend ββ
kind-logs-backend βββ
βββ kind-logs
kind-logs-frontend ββ
π οΈ Makefile Commands#
Makefile commands, described in the table below, are used only for advanced debug pourposes.
Command: |
Description |
|---|---|
|
Manual port-forward (debug/fallback) |
|
Debug network cluster/pod/ingress |
|
Trace end-to-end request |
|
Advance diagnostic cluster setup |
|
Complete health check cluster/app |
Code Generation Workflow#
The project automatically generates Pydantic models from qualpipe criteria classes:
# Generate models manually
pixi run generate-codegen
# Or use the console script directly (after installation)
qualpipe-generate-models --module qualpipe.core.criterion \
--out-generated src/qualpipe_webapp/backend/generated \
--out-schemas src/qualpipe_webapp/frontend/static
The code generation creates:
Python Models:
src/qualpipe_webapp/backend/generated/__init__.pyPydantic models for each criterion type
Validation logic for telescope parameters
Type-safe configuration classes
JSON/YAML Schemas:
src/qualpipe_webapp/frontend/static/`criteria_schema.json- JSON schema for frontend criteria report validationcriteria_schema.yaml- YAML schema for configuration
Such files are then implemented into metadata_schema.yaml executing:
pixi run generate-frontend-schema
which is used for complete frontend validations, with all the correct
references read from the configuration file config.js. The
metadata_schema.yaml file is auto-generated from a template, so
Important
Do not edit metadata_schema.yaml directly β edit
template_metadata_schema.yaml instead.
Integration with CI/CD#
The generated models are automatically created during:
Local development: with
pixi run dev-setupCI/CD pipelines: code generation runs before CI tests
Package installation: post-install hooks generate models
Note
π Generated files are git-ignored - Theyβre created automatically and should not be committed.
π Automatic regeneration - Models update automatically when qualpipe criteria change.
Warning
β οΈ Some tests depend on generated models - Always run code generation before testing, if your changes had an impact on the models.