threedi-modelchecker 2.6.2__tar.gz → 2.6.3.dev1__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.
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/CHANGES.rst +6 -0
- {threedi-modelchecker-2.6.2/threedi_modelchecker.egg-info → threedi-modelchecker-2.6.3.dev1}/PKG-INFO +2 -2
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/pyproject.toml +1 -1
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/__init__.py +1 -1
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/base.py +4 -2
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/config.py +0 -10
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/conftest.py +5 -5
- threedi-modelchecker-2.6.3.dev1/threedi_modelchecker/tests/data/empty.gpkg +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_factories.py +1 -1
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1/threedi_modelchecker.egg-info}/PKG-INFO +2 -2
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/SOURCES.txt +1 -1
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/requires.txt +1 -1
- threedi-modelchecker-2.6.2/threedi_modelchecker/tests/data/empty_v4.sqlite +0 -3
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/LICENSE +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/MANIFEST.in +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/README.rst +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/setup.cfg +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/__init__.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/cross_section_definitions.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/factories.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/geo_query.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/other.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/raster.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/timeseries.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/exporters.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/__init__.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/raster_interface.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/raster_interface_gdal.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/raster_interface_rasterio.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/model_checks.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/scripts.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/__init__.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/data/__init__.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/factories.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_base.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_cross_section_definitions.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_other.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_raster.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_timeseries.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_exporters.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_model_checks.py +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/dependency_links.txt +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/entry_points.txt +0 -0
- {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/top_level.txt +0 -0
|
@@ -2,6 +2,12 @@ Changelog of threedi-modelchecker
|
|
|
2
2
|
=================================
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
2.6.3 (unreleased)
|
|
6
|
+
------------------
|
|
7
|
+
- Support geopackage
|
|
8
|
+
- Support changes in threedi-schema (0.220) needed for geopackage support
|
|
9
|
+
|
|
10
|
+
|
|
5
11
|
2.6.2 (2024-02-29)
|
|
6
12
|
------------------
|
|
7
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: threedi-modelchecker
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.3.dev1
|
|
4
4
|
Summary: Checks validity of a 3Di schematisation
|
|
5
5
|
Author-email: Nelen & Schuurmans <info@nelen-schuurmans.nl>
|
|
6
6
|
License: MIT
|
|
@@ -15,7 +15,7 @@ License-File: LICENSE
|
|
|
15
15
|
Requires-Dist: Click
|
|
16
16
|
Requires-Dist: GeoAlchemy2!=0.11.*,>=0.9
|
|
17
17
|
Requires-Dist: SQLAlchemy>=1.4
|
|
18
|
-
Requires-Dist: threedi-schema==0.
|
|
18
|
+
Requires-Dist: threedi-schema==0.220.*
|
|
19
19
|
Provides-Extra: rasterio
|
|
20
20
|
Requires-Dist: rasterio>=1.3; extra == "rasterio"
|
|
21
21
|
Provides-Extra: test
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/base.py
RENAMED
|
@@ -221,7 +221,9 @@ class TypeCheck(BaseCheck):
|
|
|
221
221
|
self.expected_types = _sqlalchemy_to_sqlite_types(self.column.type)
|
|
222
222
|
|
|
223
223
|
def get_invalid(self, session):
|
|
224
|
-
if "sqlite" not in session.bind.dialect.dialect_description
|
|
224
|
+
if ("sqlite" not in session.bind.dialect.dialect_description) and (
|
|
225
|
+
"geopackage" not in session.bind.dialect.dialect_description
|
|
226
|
+
):
|
|
225
227
|
return []
|
|
226
228
|
q_invalid = self.to_check(session)
|
|
227
229
|
invalid_type_query = q_invalid.filter(
|
|
@@ -311,7 +313,7 @@ class GeometryTypeCheck(BaseCheck):
|
|
|
311
313
|
def _get_geometry_type(column, dialect):
|
|
312
314
|
if column.type.geometry_type == "GEOMETRY":
|
|
313
315
|
return # should skip the check
|
|
314
|
-
if dialect
|
|
316
|
+
if dialect in ["sqlite", "geopackage"]:
|
|
315
317
|
return column.type.geometry_type
|
|
316
318
|
elif dialect == "postgresql":
|
|
317
319
|
geom_type = column.type.geometry_type.capitalize()
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/config.py
RENAMED
|
@@ -877,16 +877,6 @@ CHECKS += [
|
|
|
877
877
|
LinestringLocationCheck(error_code=205, column=table.the_geom, max_distance=1)
|
|
878
878
|
for table in [models.Channel, models.Culvert]
|
|
879
879
|
]
|
|
880
|
-
CHECKS += [
|
|
881
|
-
QueryCheck(
|
|
882
|
-
error_code=206,
|
|
883
|
-
column=models.ConnectionNode.the_geom_linestring,
|
|
884
|
-
invalid=Query(models.ConnectionNode).filter(
|
|
885
|
-
models.ConnectionNode.the_geom_linestring != None
|
|
886
|
-
),
|
|
887
|
-
message=f"{models.ConnectionNode.the_geom_linestring} must be NULL",
|
|
888
|
-
)
|
|
889
|
-
]
|
|
890
880
|
CHECKS += [
|
|
891
881
|
SpatialIndexCheck(
|
|
892
882
|
error_code=207, column=models.ConnectionNode.the_geom, level=CheckLevel.WARNING
|
|
@@ -20,8 +20,8 @@ def threedi_db(tmpdir_factory):
|
|
|
20
20
|
https://factoryboy.readthedocs.io/en/latest/orms.html#managing-sessions
|
|
21
21
|
"""
|
|
22
22
|
tmp_path = tmpdir_factory.mktemp("spatialite4")
|
|
23
|
-
tmp_sqlite = tmp_path / "
|
|
24
|
-
shutil.copyfile(data_dir / "
|
|
23
|
+
tmp_sqlite = tmp_path / "empty.gpkg"
|
|
24
|
+
shutil.copyfile(data_dir / "empty.gpkg", tmp_sqlite)
|
|
25
25
|
db = ThreediDatabase(tmp_sqlite)
|
|
26
26
|
schema = ModelSchema(db)
|
|
27
27
|
schema.upgrade(backup=False, upgrade_spatialite_version=False)
|
|
@@ -52,7 +52,7 @@ def session(threedi_db):
|
|
|
52
52
|
|
|
53
53
|
@pytest.fixture
|
|
54
54
|
def empty_sqlite_v4(tmp_path):
|
|
55
|
-
"""An function-scoped empty
|
|
56
|
-
tmp_sqlite = tmp_path / "
|
|
57
|
-
shutil.copyfile(data_dir / "
|
|
55
|
+
"""An function-scoped empty geopackage v4 in the latest migration state"""
|
|
56
|
+
tmp_sqlite = tmp_path / "empty.gpkg"
|
|
57
|
+
shutil.copyfile(data_dir / "empty.gpkg", tmp_sqlite)
|
|
58
58
|
return ThreediDatabase(tmp_sqlite)
|
|
@@ -36,7 +36,7 @@ def test_gen_not_null_checks():
|
|
|
36
36
|
def test_gen_geometry_check():
|
|
37
37
|
geometry_checks = generate_geometry_checks(models.ConnectionNode.__table__)
|
|
38
38
|
|
|
39
|
-
assert len(geometry_checks) ==
|
|
39
|
+
assert len(geometry_checks) == 1
|
|
40
40
|
geometry_check_columns = [check.column for check in geometry_checks]
|
|
41
41
|
assert models.ConnectionNode.the_geom in geometry_check_columns
|
|
42
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: threedi-modelchecker
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.3.dev1
|
|
4
4
|
Summary: Checks validity of a 3Di schematisation
|
|
5
5
|
Author-email: Nelen & Schuurmans <info@nelen-schuurmans.nl>
|
|
6
6
|
License: MIT
|
|
@@ -15,7 +15,7 @@ License-File: LICENSE
|
|
|
15
15
|
Requires-Dist: Click
|
|
16
16
|
Requires-Dist: GeoAlchemy2!=0.11.*,>=0.9
|
|
17
17
|
Requires-Dist: SQLAlchemy>=1.4
|
|
18
|
-
Requires-Dist: threedi-schema==0.
|
|
18
|
+
Requires-Dist: threedi-schema==0.220.*
|
|
19
19
|
Provides-Extra: rasterio
|
|
20
20
|
Requires-Dist: rasterio>=1.3; extra == "rasterio"
|
|
21
21
|
Provides-Extra: test
|
|
@@ -38,4 +38,4 @@ threedi_modelchecker/tests/test_checks_timeseries.py
|
|
|
38
38
|
threedi_modelchecker/tests/test_exporters.py
|
|
39
39
|
threedi_modelchecker/tests/test_model_checks.py
|
|
40
40
|
threedi_modelchecker/tests/data/__init__.py
|
|
41
|
-
threedi_modelchecker/tests/data/
|
|
41
|
+
threedi_modelchecker/tests/data/empty.gpkg
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/other.py
RENAMED
|
File without changes
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/raster.py
RENAMED
|
File without changes
|
|
File without changes
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/exporters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/model_checks.py
RENAMED
|
File without changes
|
{threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/scripts.py
RENAMED
|
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
|