GeoAlchemy2 0.15.0__tar.gz → 0.15.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/CHANGES.txt +6 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1/GeoAlchemy2.egg-info}/PKG-INFO +1 -1
- {geoalchemy2-0.15.0/GeoAlchemy2.egg-info → geoalchemy2-0.15.1}/PKG-INFO +1 -1
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/elements.py +1 -1
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/conftest.py +13 -8
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_functional.py +14 -2
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.codespellrc +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.coveragerc +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.flake8 +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/ISSUE_TEMPLATE/how_to_use.yaml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/dependabot.yml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/pull_request_template.md +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.github/workflows/test_and_publish.yml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.gitignore +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.pre-commit-config.yaml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/.readthedocs.yaml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/COPYING.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/GeoAlchemy2.egg-info/SOURCES.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/GeoAlchemy2.egg-info/dependency_links.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/GeoAlchemy2.egg-info/not-zip-safe +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/GeoAlchemy2.egg-info/requires.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/GeoAlchemy2.egg-info/top_level.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/GeoAlchemy2_dev.yml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/MANIFEST.in +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/README.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/RELEASE.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/TEST.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/Makefile +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_static/geoalchemy.png +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_static/geoalchemy.svg +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_static/geoalchemy_small.png +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_static/geoalchemy_small.svg +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_templates/sidebar-about.html +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_templates/sidebar-links.html +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_templates/sidebar-logo.html +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/LICENSE +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/README +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/flask/layout.html +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/flask/relations.html +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/flask/static/flasky.css_t +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/flask/static/small_flask.css +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/_themes/flask/theme.conf +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/admin.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/alembic.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/alembic_helpers.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/changelog.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/conf.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/core_tutorial.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/elements.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/index.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/make.bat +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/migrate.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/orm_tutorial.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/shape.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/spatial_functions.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/spatial_operators.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/spatialite_tutorial.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/doc/types.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/generate_type_stubs.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/_functions.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/_functions_helpers.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/dialects/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/dialects/common.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/dialects/geopackage.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/dialects/mysql.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/dialects/postgresql.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/admin/dialects/sqlite.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/alembic_helpers.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/comparator.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/exc.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/functions.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/functions.pyi +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/py.typed +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/shape.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/dialects/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/dialects/common.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/dialects/geopackage.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/dialects/mysql.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/dialects/postgresql.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/types/dialects/sqlite.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/geoalchemy2/utils.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/pyproject.toml +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/requirements-doc.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/requirements-mypy.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/requirements-rtd.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/requirements.txt +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/setup.cfg +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/setup.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/.dockerignore +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/.gitignore +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/Dockerfile +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/build.sh +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/helpers/entrypoint.sh +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/helpers/init_mysql.sh +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/helpers/init_postgres.sh +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/helpers/install_requirements.sh +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/test_container/run.sh +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/alembic_config/alembic.ini +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/data/spatialite_ge_4.sqlite +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/data/spatialite_geopackage.gpkg +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/data/spatialite_lt_4.sqlite +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/README.rst +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/__init__.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_decipher_raster.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_disable_wrapping.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_insert_raster.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_length_at_insert.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_orm_mapped_v2.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_raster_transform.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_specific_compilation.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_summarystatsagg.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/gallery/test_type_decorator.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/schema_fixtures.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_alembic_migrations.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_comparator.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_elements.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_functional_geopackage.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_functional_mysql.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_functional_postgresql.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_functional_sqlite.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_functions.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_pickle.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_shape.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tests/test_types.py +0 -0
- {geoalchemy2-0.15.0 → geoalchemy2-0.15.1}/tox.ini +0 -0
@@ -1,6 +1,12 @@
|
|
1
1
|
GeoAlchemy 2 Changelog
|
2
2
|
======================
|
3
3
|
|
4
|
+
0.15.1
|
5
|
+
------
|
6
|
+
|
7
|
+
* Fix: Default SRID is bypassed when using floating point coordinates @aballet (#509)
|
8
|
+
* Test: Dispose of the connection pools of the test engines @adrien-berchet (#511)
|
9
|
+
|
4
10
|
0.15.0
|
5
11
|
------
|
6
12
|
|
@@ -117,7 +117,7 @@ class WKTElement(_SpatialElement):
|
|
117
117
|
"""
|
118
118
|
|
119
119
|
_REMOVE_SRID = re.compile("(SRID=([0-9]+); ?)?(.*)")
|
120
|
-
SPLIT_WKT_PATTERN = re.compile(r"((SRID=\d+) *; *)?([\w ]+) *(\([\d ,\(\)]+\))")
|
120
|
+
SPLIT_WKT_PATTERN = re.compile(r"((SRID=\d+) *; *)?([\w ]+) *(\([\d\. ,\(\)]+\))")
|
121
121
|
|
122
122
|
geom_from: str = "ST_GeomFromText"
|
123
123
|
geom_from_extended_version: str = "ST_GeomFromEWKT"
|
@@ -161,18 +161,23 @@ def engine(tmpdir, db_url, _engine_echo):
|
|
161
161
|
# Copy the input SQLite DB to a temporary file and return an engine to it
|
162
162
|
input_url = str(db_url)[10:]
|
163
163
|
output_file = "test_spatial_db.sqlite"
|
164
|
-
|
165
|
-
|
166
|
-
|
164
|
+
current_engine = copy_and_connect_sqlite_db(
|
165
|
+
input_url, tmpdir / output_file, _engine_echo, "sqlite"
|
166
|
+
)
|
167
|
+
elif db_url.startswith("gpkg:///"):
|
167
168
|
# Copy the input SQLite DB to a temporary file and return an engine to it
|
168
169
|
input_url = str(db_url)[8:]
|
169
170
|
output_file = "test_spatial_db.gpkg"
|
170
|
-
|
171
|
+
current_engine = copy_and_connect_sqlite_db(
|
172
|
+
input_url, tmpdir / output_file, _engine_echo, "gpkg"
|
173
|
+
)
|
174
|
+
else:
|
175
|
+
# For other dialects the engine is directly returned
|
176
|
+
current_engine = create_engine(db_url, echo=_engine_echo)
|
177
|
+
current_engine.update_execution_options(search_path=["gis", "public"])
|
171
178
|
|
172
|
-
|
173
|
-
|
174
|
-
engine.update_execution_options(search_path=["gis", "public"])
|
175
|
-
return engine
|
179
|
+
yield current_engine
|
180
|
+
current_engine.dispose()
|
176
181
|
|
177
182
|
|
178
183
|
@pytest.fixture
|
@@ -335,7 +335,16 @@ class TestInsertionCore:
|
|
335
335
|
),
|
336
336
|
],
|
337
337
|
)
|
338
|
-
|
338
|
+
@pytest.mark.parametrize(
|
339
|
+
"use_floating_point",
|
340
|
+
[
|
341
|
+
pytest.param(True, id="Use floating point"),
|
342
|
+
pytest.param(False, id="Do not use floating point"),
|
343
|
+
],
|
344
|
+
)
|
345
|
+
def test_insert_all_geom_types(
|
346
|
+
self, dialect_name, base, conn, metadata, geom_type, wkt, use_floating_point
|
347
|
+
):
|
339
348
|
"""Test insertion and selection of all geometry types."""
|
340
349
|
ndims = 2
|
341
350
|
if "Z" in geom_type[-2:]:
|
@@ -358,6 +367,9 @@ class TestInsertionCore:
|
|
358
367
|
metadata.drop_all(bind=conn, checkfirst=True)
|
359
368
|
metadata.create_all(bind=conn)
|
360
369
|
|
370
|
+
if use_floating_point:
|
371
|
+
wkt = wkt.replace("1 2", "1.5 2.5")
|
372
|
+
|
361
373
|
inserted_wkt = f"{geom_type}{wkt}"
|
362
374
|
|
363
375
|
# Use the DB to generate the corresponding raw WKB
|
@@ -401,7 +413,7 @@ class TestInsertionCore:
|
|
401
413
|
if "MULTIPOINT" in geom_type:
|
402
414
|
# Some dialects return MULTIPOINT geometries with nested parenthesis and others
|
403
415
|
# do not so we remove them before checking the results
|
404
|
-
checked_wkt = re.sub(r"\(([0-9]+)\)", "\\1", checked_wkt)
|
416
|
+
checked_wkt = re.sub(r"\(([0-9\.]+)\)", "\\1", checked_wkt)
|
405
417
|
if row_id >= 5 and dialect_name in ["geopackage"] and has_m:
|
406
418
|
# Currently Shapely does not support geometry types with M dimension
|
407
419
|
assert checked_wkt != expected_wkt
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|