-
Notifications
You must be signed in to change notification settings - Fork 4
Development Workflow.md
Kelsey Smuczynski edited this page Mar 24, 2026
·
1 revision
source .venv/bin/activate
set -a; source .env; set +a
alembic upgrade head
uvicorn main:app --reloadFor containerized development:
docker compose up --buildThe recommended loop for new features:
- Create a branch (see Development Standards for naming)
- Add a test in
tests/that describes the expected behavior - Implement the feature
- Run
uv run pytest - Run
pre-commit run --all-filesto fix formatting
- Update SQLAlchemy models in db/
- Update Pydantic schemas in schemas/
- Generate migration: alembic revision --autogenerate -m "description"
- Review the generated migration script for accuracy
- Apply: alembic upgrade head
- Update tests and fixtures
- Update transfer logic if the field participates in legacy migration
Always review autogenerated migration scripts before applying — they can miss spatial or custom column types.
- Keep routers focused on transport concerns (request/response)
- Put reusable logic in
services/ - Keep CLI commands thin; push heavy work into services or transfer modules
The repo has a formal post-Alembic data migration layer for corrective or transitional data changes:
python -m cli.cli data-migrations list
python -m cli.cli data-migrations status
python -m cli.cli data-migrations run <migration_id>
python -m cli.cli alembic-upgrade-and-data # runs both Alembic + data migrationsThese migrations are tracked in data_migration_history and gated by applied Alembic revisions. Keep them idempotent and safe to re-run.
There is a dedicated CLI command for ArcGIS project area boundaries:
python -m cli.cli import-project-area-boundariesBy default, it reads from a New Mexico Tech ArcGIS Feature Layer URL.
| Trigger | Action |
|---|---|
PR targeting production, staging, or transfer
|
Runs full test suite |
Push to staging
|
Deploys staging |
Push to production
|
Deploys production |
Push to main
|
Creates a Sentry release |
README.mdstill contains an outdated project structure snippet and an outdateduvicorncommand. Prefer the code and this wiki over those sections until the README is updated.