-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Feature/fix infra spatialite (#79)
Introduces changes to fix spatialite extension loading issue to support data fields in sqlachemy model type `POINT`. This change directly supports the work in #26 - Fixes spatialite extension as loadable with the updated dockerfile setup and correct implementation using aiosqlite compatibility - Temporary disables integration test. The repository return type needs to be refactored and return type changed to list dto facilities results <!-- Generated by sourcery-ai[bot]: start summary --> ## Summary by Sourcery Fix SpatiaLite extension loading issue to support spatial data fields in SQLAlchemy models. Introduce a new `PointType` for handling geopoint data. Refactor test database setup and temporarily disable integration tests pending refactoring. Update build scripts and Makefile for improved Docker handling. New Features: - Introduce a new `PointType` class to handle geopoint data types in SQLAlchemy models, enabling support for spatial data fields like `POINT`. Bug Fixes: - Fix the loading of the SpatiaLite extension in the database setup to support spatial data operations. Enhancements: - Refactor the test database setup to use a new `SetUpTestDatabase` class, improving the management of test database lifecycle and session handling. Build: - Update the Makefile to include a new `set-docker` target and modify the `docker-run-server` target to remove orphan containers. Tests: - Temporarily disable integration tests due to the need for refactoring repository return types and changing return types to list DTO facilities results. Chores: - Update the `run.sh` script to include additional logging for file listing and database removal. <!-- Generated by sourcery-ai[bot]: end summary --> --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6f3d6ae
commit 424f0e9
Showing
15 changed files
with
621 additions
and
374 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ authors = ["codecakes <[email protected]>"] | |
readme = "README.md" | ||
package-mode = true | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
pydantic = "^2.9.1" | ||
|
@@ -20,6 +21,7 @@ alembic = "^1.13.2" | |
aiosqlite = "^0.20.0" | ||
sqlmodel = {version="^0.0.22"} | ||
rich = {version = "^13.8.0"} | ||
spatialite = "^0.0.3" | ||
|
||
ruff = { version = "^0.6.3", optional = true } | ||
mypy = { version = "^1.11.2", optional = true } | ||
|
@@ -66,8 +68,9 @@ include = [ | |
] | ||
exclude = [ | ||
"**/node_modules", | ||
"**/__pycache__"] | ||
venv = "xcov19-7M_0Y8Vx-py3.12" | ||
"**/__pycache__" | ||
] | ||
# venv = "xcov19-7M_0Y8Vx-py3.12" | ||
reportMissingImports = true | ||
|
||
[[tool.pyright.executionEnvironments]] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "xcov19.db" ]; then rm xcov19.db; fi; APP_ENV=dev APP_DB_ENGINE_URL="sqlite+aiosqlite:///xcov19.db" poetry run python3 -m xcov19.dev | ||
echo "listing all files"; | ||
ls; | ||
if [ -f "xcov19.db" ]; then | ||
echo "removing database"; | ||
rm xcov19.db; | ||
fi; | ||
|
||
APP_ENV=dev APP_DB_ENGINE_URL="sqlite+aiosqlite:///xcov19.db" poetry run python3 -m xcov19.dev |
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.