Skip to content

Commit

Permalink
Close connection of geopandas (#19)
Browse files Browse the repository at this point in the history
* Close connection of geopandas

* Fix github workflow
  • Loading branch information
meomancer authored Jan 6, 2025
1 parent 96b14fd commit 84a8ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.9.20
architecture: x64
- name: Checkout PyTorch
uses: actions/checkout@master
Expand Down
4 changes: 1 addition & 3 deletions django_project/cloud_native_gis/utils/geopandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def shapefile_to_postgis(filepath, table_name, schema_name) -> dict:
**connection.settings_dict
)
engine = create_engine(con)
# TODO:
# Fix this makes test database can't be deleted
gdf.to_postgis(table_name, con=engine, schema=schema_name)

engine.dispose()
return metadata

0 comments on commit 84a8ca4

Please sign in to comment.