Some checks failed
CI / style (push) Has been cancelled
CI / build-client (push) Has been cancelled
CI / build-amd64 (push) Has been cancelled
CI / build-tester (push) Has been cancelled
CI / test (cockroachdb) (push) Has been cancelled
CI / test (mariadb) (push) Has been cancelled
CI / test (postgres) (push) Has been cancelled
CI / test (sqlite) (push) Has been cancelled
CI / build-arm64 (push) Has been cancelled
CI / build-armv7 (push) Has been cancelled
CI / publish-images (push) Has been cancelled
CI / publish-release (push) Has been cancelled
- Backend: Added ExternalSource enum, Filament3DFP model, and transform function - Backend: Updated _sync() to fetch from both SpoolmanDB and 3dfilamentprofiles - Frontend: Added source tabs to FilamentImportModal (All/SpoolmanDB/3DFP) - Frontend: Updated ExternalFilament interface with source and temp range fields - Frontend: Updated filament import handler to use temp range fields Also includes: - Dev mode styling (teal theme, DEV badge and banner) - Translation keys for source filtering Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Repository Guidelines
Project Structure & Module Organization
spoolman/holds the FastAPI backend, SQLAlchemy models, and API routes (spoolman/api/v1/).client/is the React + TypeScript UI (Vite), with pages underclient/src/pages/and shared components underclient/src/components/.migrations/contains Alembic migrations; versions live inmigrations/versions/.tests_integration/holds pytest integration tests and Docker Compose configs for multiple databases.scripts/provides install/start helpers;Dockerfileandentrypoint.shsupport container builds.
Build, Test, and Development Commands
pdm installinstalls backend dependencies (including dev tools).pdm run appstarts the API server (uvicorn spoolman.main:app).pdm run itestruns integration tests across all databases.pdm run docsgenerates API documentation.python tests_integration/run.py sqlite postgresruns tests for selected DBs.cd client && npm ciinstalls UI deps;npm run devstarts the UI dev server;npm run buildcreates a production build.bash scripts/install.shbootstraps a local install;bash scripts/start.shruns using.env.
Coding Style & Naming Conventions
- Python: Black + Ruff, 120-char lines (
pyproject.toml). Prefer async patterns in backend code. - TypeScript/React: follow existing conventions (pages in lowercase file names, shared components in
PascalCase). - Keep naming aligned with existing modules (e.g.,
spool,filament,vendor).
Testing Guidelines
- Tests use
pytestwith async support; files followtest_*.pyand functions start withtest_. - Integration tests are the primary suite; run via
pdm run itestorpython tests_integration/run.py.
Database Migrations
- Update models in
spoolman/database/models.py. - Start the server once, then generate a migration:
pdm run alembic revision -m "desc" --autogenerate. - Review and format migrations with Black/Ruff before committing.
Commit & Pull Request Guidelines
- Follow commit history conventions (e.g.,
feat:,docs:,fix:) and keep messages concise. - PRs should include a short summary, testing performed, and screenshots for UI changes.
- Link relevant issues where applicable.
Configuration Tips
- Copy
.env.exampleto.envfor local runs; key variables includeSPOOLMAN_DB_TYPE,SPOOLMAN_PORT, andVITE_APIURL.