Development Guide
This document is a developer guide for Aspara.
Setup
Python dependencies
uv sync --dev
JavaScript dependencies
pnpm install
Building Assets
After cloning the repository, you must build frontend assets before running Aspara. These build artifacts are not tracked in git, but are included in pip packages.
Build all assets (CSS + JavaScript)
pnpm build
This command generates:
- CSS:
src/aspara/dashboard/static/dist/css/styles.css - JavaScript:
src/aspara/dashboard/static/dist/*.js
Build CSS only
pnpm run build:css
Build JavaScript only
pnpm run build:js
Development mode (watch mode)
To automatically detect file changes and rebuild during development:
# Watch CSS
pnpm run watch:css
# Watch JavaScript
pnpm run watch:js
Testing
Python tests
uv run pytest
JavaScript tests
pnpm test
E2E tests
npx playwright test
Linting and Formatting
Python
# Lint
ruff check .
# Format
ruff format .
JavaScript
# Lint
pnpm lint
# Format
pnpm format
Documentation
Build documentation
uv run mkdocs build
Serve documentation locally
uv run mkdocs serve
You can view the documentation by accessing http://localhost:8000 in your browser.