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.
Files changed (44) hide show
  1. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/CHANGES.rst +6 -0
  2. {threedi-modelchecker-2.6.2/threedi_modelchecker.egg-info → threedi-modelchecker-2.6.3.dev1}/PKG-INFO +2 -2
  3. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/pyproject.toml +1 -1
  4. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/__init__.py +1 -1
  5. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/base.py +4 -2
  6. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/config.py +0 -10
  7. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/conftest.py +5 -5
  8. threedi-modelchecker-2.6.3.dev1/threedi_modelchecker/tests/data/empty.gpkg +0 -0
  9. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_factories.py +1 -1
  10. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1/threedi_modelchecker.egg-info}/PKG-INFO +2 -2
  11. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/SOURCES.txt +1 -1
  12. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/requires.txt +1 -1
  13. threedi-modelchecker-2.6.2/threedi_modelchecker/tests/data/empty_v4.sqlite +0 -3
  14. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/LICENSE +0 -0
  15. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/MANIFEST.in +0 -0
  16. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/README.rst +0 -0
  17. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/setup.cfg +0 -0
  18. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/__init__.py +0 -0
  19. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/cross_section_definitions.py +0 -0
  20. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/factories.py +0 -0
  21. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/geo_query.py +0 -0
  22. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/other.py +0 -0
  23. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/raster.py +0 -0
  24. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/checks/timeseries.py +0 -0
  25. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/exporters.py +0 -0
  26. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/__init__.py +0 -0
  27. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/raster_interface.py +0 -0
  28. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/raster_interface_gdal.py +0 -0
  29. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/interfaces/raster_interface_rasterio.py +0 -0
  30. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/model_checks.py +0 -0
  31. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/scripts.py +0 -0
  32. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/__init__.py +0 -0
  33. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/data/__init__.py +0 -0
  34. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/factories.py +0 -0
  35. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_base.py +0 -0
  36. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_cross_section_definitions.py +0 -0
  37. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_other.py +0 -0
  38. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_raster.py +0 -0
  39. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_checks_timeseries.py +0 -0
  40. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_exporters.py +0 -0
  41. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker/tests/test_model_checks.py +0 -0
  42. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/dependency_links.txt +0 -0
  43. {threedi-modelchecker-2.6.2 → threedi-modelchecker-2.6.3.dev1}/threedi_modelchecker.egg-info/entry_points.txt +0 -0
  44. {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.2
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.219.*
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
@@ -19,7 +19,7 @@ dependencies = [
19
19
  "Click",
20
20
  "GeoAlchemy2>=0.9,!=0.11.*",
21
21
  "SQLAlchemy>=1.4",
22
- "threedi-schema==0.219.*",
22
+ "threedi-schema==0.220.*"
23
23
  ]
24
24
 
25
25
  [project.optional-dependencies]
@@ -1,5 +1,5 @@
1
1
  from .model_checks import * # NOQA
2
2
 
3
3
  # fmt: off
4
- __version__ = '2.6.2'
4
+ __version__ = '2.6.3.dev1'
5
5
  # fmt: on
@@ -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 == "sqlite":
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()
@@ -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 / "empty_v4.sqlite"
24
- shutil.copyfile(data_dir / "empty_v4.sqlite", tmp_sqlite)
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 spatialite v4 in the latest migration state"""
56
- tmp_sqlite = tmp_path / "empty_v4.sqlite"
57
- shutil.copyfile(data_dir / "empty_v4.sqlite", tmp_sqlite)
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) == 2
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.2
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.219.*
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/empty_v4.sqlite
41
+ threedi_modelchecker/tests/data/empty.gpkg
@@ -1,7 +1,7 @@
1
1
  Click
2
2
  GeoAlchemy2!=0.11.*,>=0.9
3
3
  SQLAlchemy>=1.4
4
- threedi-schema==0.219.*
4
+ threedi-schema==0.220.*
5
5
 
6
6
  [rasterio]
7
7
  rasterio>=1.3
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1157e95b7271dbe14142f96bc46664be92f53d463726c4d0cb18be07f9cd7acb
3
- size 6086656