File size: 1,408 Bytes
1b50562 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | # Development Guide
This document is a developer guide for Aspara.
## Setup
### Python dependencies
```bash
uv sync --dev
```
### JavaScript dependencies
```bash
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)
```bash
pnpm build
```
This command generates:
- CSS: `src/aspara/dashboard/static/dist/css/styles.css`
- JavaScript: `src/aspara/dashboard/static/dist/*.js`
### Build CSS only
```bash
pnpm run build:css
```
### Build JavaScript only
```bash
pnpm run build:js
```
### Development mode (watch mode)
To automatically detect file changes and rebuild during development:
```bash
# Watch CSS
pnpm run watch:css
# Watch JavaScript
pnpm run watch:js
```
## Testing
### Python tests
```bash
uv run pytest
```
### JavaScript tests
```bash
pnpm test
```
### E2E tests
```bash
npx playwright test
```
## Linting and Formatting
### Python
```bash
# Lint
ruff check .
# Format
ruff format .
```
### JavaScript
```bash
# Lint
pnpm lint
# Format
pnpm format
```
## Documentation
### Build documentation
```bash
uv run mkdocs build
```
### Serve documentation locally
```bash
uv run mkdocs serve
```
You can view the documentation by accessing http://localhost:8000 in your browser.
|