-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backend): remove SQLAlchemy and replace with async psycopg db dr…
…iver (#1834) * build: add psycopg async driver (v3) * feat: create async psycopg db pool at app startup * refactor: test usage of psycopg + pydantic models on project get endpoint * build: relock deps after rebase * build: migration remove additional redundant fields from projects * refactor: work in progress removing sqlalchemy * build: remove project_info table, merge into projects * refactor: work in progress removing sqlalchemy * build: migration to add default timestamptz to tables * refactor: continue refactor to remove sqlalchemy * refactor: continued migration from sqlalchemy --> psycopg * refactor: continue sqlalchemy removal, fix endpoints * fix: updating failed state for s3 upload not awaited * refactor: fix background tasks and mbtiles / basemaps apis * build: remove async-lru package * refactor: refactor out project_deps.get_odk_credentials * refactor: use HTTPStatus enum everywhere, format * refactor: further updates to sqlalchemy removal * refactor: working project routes * refactor: rename project_path_prefix --> slug, remove unused project_info refs * refactor: final type renames before task events refactor * fix: handle error for /statuses endpoint * fix: add project_id query param to project get * fix: centroid loading on home page * fix: project outline no longer nested in Feature * fix: update frontend enums to use strings * fix: enum usage on split task frontend * fix: splitting of features into task areas during proj create * fix: sometimes project missing hashtags * fix: qrcode loading with project name * fix: use EntityStatus enum * fix: add ORDER BY to all get all statements * fix: generate project working * refactor: remove sqlalchemy once and for all!! (bye bye) * fix: untested fixes for submission routes * build: upgrade postgis image --> 14-3.5-alpine as 3.4 was removed * refactor: remove manual enums since available in in python 3.11 * build: upgrade python --> 3.12 + all dependencies to latest * refactor: fix imports, remove refs to db_models * build: relock deps after osm-rawdata upgrade, optional sqlalchemy * fix: awaiting AsyncConnectionPool def is incorrect * fix: case where string is passed to dborg one func * test: start fixing test cases * fix: minor fixes to api * test: continue work fixing / updating tests * fix: error if creating project with single task * refactor: remove author object from project response (author_id is enough) * build: add composite index on task_history(task_id, action_date) * fix: exclude last active from project input model * refactor: rename locked_by_ fields to actioned_by_ * fix: getting project before update / delete * fix: setting slug on project + org create * fix: exclude outline field on ProjectIn to avoid dict insert error * test: further fixes to tests * fix: avoid spamming nominatim during tests / DEBUG=true * fix: hashtags not set correctly on new project * refactor(frontend): simplify upload-task-area logic during proj create * fix: various fixes, all working tests * fix: set some constraints on input project_id or org_id * test: fix conftest, set server url to FMTM_DOMAIN for ci * build: install uvloop + httptools for performance (uvicorn uses automatically) * refactor: use asgi lifespan state over fastapi app state * fix: use asgi_lifespan LifepanManager correctly for async testing * fix: add async detailed debug mode when DEBUG=True * test: correctly setup conftest with asyncclient lifespan * test: update conftest to use db_conn override on fastapi app * build: move api healthcheck to compose, increase startup grace period * fix(frontend): styling based on task action not task status * fix(frontend): tweak frontend to use TaskAction enum for now
- Loading branch information
1 parent
5e4b25f
commit 43336bb
Showing
99 changed files
with
5,374 additions
and
6,969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.