python-osw-validation 0.2.8__py3-none-any.whl → 0.2.10__py3-none-any.whl
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.
- python_osw_validation/__init__.py +28 -4
- python_osw_validation/version.py +1 -1
- {python_osw_validation-0.2.8.dist-info → python_osw_validation-0.2.10.dist-info}/METADATA +2 -2
- python_osw_validation-0.2.10.dist-info/RECORD +10 -0
- python_osw_validation-0.2.8.dist-info/RECORD +0 -10
- {python_osw_validation-0.2.8.dist-info → python_osw_validation-0.2.10.dist-info}/LICENSE +0 -0
- {python_osw_validation-0.2.8.dist-info → python_osw_validation-0.2.10.dist-info}/WHEEL +0 -0
- {python_osw_validation-0.2.8.dist-info → python_osw_validation-0.2.10.dist-info}/top_level.txt +0 -0
|
@@ -107,22 +107,40 @@ class OSWValidation:
|
|
|
107
107
|
unmatched = node_ids_edges_u - node_ids
|
|
108
108
|
is_valid = len(unmatched) == 0
|
|
109
109
|
if not is_valid:
|
|
110
|
+
unmatched_list = list(unmatched)
|
|
111
|
+
num_unmatched = len(unmatched_list)
|
|
112
|
+
limit = min(num_unmatched, 20)
|
|
113
|
+
displayed_unmatched = ', '.join(map(str, unmatched_list[:limit]))
|
|
110
114
|
self.errors.append(
|
|
111
|
-
f"All _u_id's in edges should be part of _id's mentioned in nodes
|
|
115
|
+
f"All _u_id's in edges should be part of _id's mentioned in nodes. "
|
|
116
|
+
f"Showing {'20' if num_unmatched > 20 else 'all'} out of {len(unmatched)} unmatched _u_id's: {displayed_unmatched}"
|
|
117
|
+
)
|
|
112
118
|
|
|
113
119
|
# Do all node references in _v_id exist in nodes?
|
|
114
120
|
unmatched = node_ids_edges_v - node_ids
|
|
115
121
|
is_valid = len(unmatched) == 0
|
|
116
122
|
if not is_valid:
|
|
123
|
+
unmatched_list = list(unmatched)
|
|
124
|
+
num_unmatched = len(unmatched_list)
|
|
125
|
+
limit = min(num_unmatched, 20)
|
|
126
|
+
displayed_unmatched = ', '.join(map(str, unmatched_list[:limit]))
|
|
117
127
|
self.errors.append(
|
|
118
|
-
f"All _v_id's in edges should be part of _id's mentioned in nodes
|
|
128
|
+
f"All _v_id's in edges should be part of _id's mentioned in nodes. "
|
|
129
|
+
f"Showing {'20' if num_unmatched > 20 else 'all'} out of {len(unmatched)} unmatched _v_id's: {displayed_unmatched}"
|
|
130
|
+
)
|
|
119
131
|
|
|
120
132
|
# Do all node references in _w_id exist in nodes?
|
|
121
133
|
unmatched = node_ids_zones_w - node_ids
|
|
122
134
|
is_valid = len(unmatched) == 0
|
|
123
135
|
if not is_valid:
|
|
136
|
+
unmatched_list = list(unmatched)
|
|
137
|
+
num_unmatched = len(unmatched_list)
|
|
138
|
+
limit = min(num_unmatched, 20)
|
|
139
|
+
displayed_unmatched = ', '.join(map(str, unmatched_list[:limit]))
|
|
124
140
|
self.errors.append(
|
|
125
|
-
f"All _w_id's in zones should be part of _id's mentioned in nodes
|
|
141
|
+
f"All _w_id's in zones should be part of _id's mentioned in nodes. "
|
|
142
|
+
f"Showing {'20' if num_unmatched > 20 else 'all'} out of {len(unmatched)} unmatched _w_id's: {displayed_unmatched}"
|
|
143
|
+
)
|
|
126
144
|
|
|
127
145
|
# Geometry validation: check geometry type in each file and test if coordinates make a shape that is reasonable geometric shape according to the Simple Feature Access standard
|
|
128
146
|
for osw_file in OSW_DATASET:
|
|
@@ -131,8 +149,14 @@ class OSWValidation:
|
|
|
131
149
|
OSW_DATASET[osw_file].is_valid == False)]
|
|
132
150
|
is_valid = len(invalid_geojson) == 0
|
|
133
151
|
if not is_valid:
|
|
152
|
+
invalid_ids = list(set(invalid_geojson['_id']))
|
|
153
|
+
num_invalid = len(invalid_ids)
|
|
154
|
+
limit = min(num_invalid, 20)
|
|
155
|
+
displayed_invalid = ', '.join(map(str, invalid_ids[:min(num_invalid, limit)]))
|
|
134
156
|
self.errors.append(
|
|
135
|
-
f"
|
|
157
|
+
f"Showing {'20' if num_invalid > 20 else 'all'} out of {num_invalid} invalid {osw_file} geometries, "
|
|
158
|
+
f"id's of invalid geometries: {displayed_invalid}"
|
|
159
|
+
)
|
|
136
160
|
|
|
137
161
|
# Validate OSW external extensions
|
|
138
162
|
for file in validator.externalExtensions:
|
python_osw_validation/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.2.
|
|
1
|
+
__version__ = '0.2.10'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-osw-validation
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Python library for OSW validation
|
|
5
5
|
Home-page: https://github.com/TaskarCenterAtUW/TDEI-python-lib-osw-validation
|
|
6
6
|
Author: Sujata Misra
|
|
@@ -15,7 +15,7 @@ Requires-Python: >=3.10
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: jsonschema-rs==0.26.1
|
|
18
|
-
Requires-Dist: zipfile36==0.
|
|
18
|
+
Requires-Dist: zipfile36==0.1.3
|
|
19
19
|
Requires-Dist: geopandas==0.14.4
|
|
20
20
|
|
|
21
21
|
# TDEI python lib OSW validation package
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
python_osw_validation/__init__.py,sha256=c8d2PUgU89lNR5Zh4zetbKYRijcl3-SM5Aux8ycfkl0,9355
|
|
2
|
+
python_osw_validation/extracted_data_validator.py,sha256=wZyCk8NlJv10cj_GrRTAiwm4cBhTAeDethjzJU-amoI,3877
|
|
3
|
+
python_osw_validation/version.py,sha256=Sg_6D3b_dkjLywxS_G9vAU50xLvx_3hgYewd0IeIFAQ,22
|
|
4
|
+
python_osw_validation/zipfile_handler.py,sha256=jXnP-8O5AAOBapuNF3-XdFVM1MHiPaWpl_wlbX-aqhY,2631
|
|
5
|
+
python_osw_validation/schema/opensidewalks.schema.json,sha256=i0iJwb_4Tq20BVUpkpgyM_7fm4SW_d_HNXKw0xul7OA,240987
|
|
6
|
+
python_osw_validation-0.2.10.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
7
|
+
python_osw_validation-0.2.10.dist-info/METADATA,sha256=ogdQ8kOflxrhmhxTbhSNqvMDIZdP4CZ1IRb9o6gipog,6141
|
|
8
|
+
python_osw_validation-0.2.10.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
9
|
+
python_osw_validation-0.2.10.dist-info/top_level.txt,sha256=GE81UPcDHEffJCxYu3M_iPz3Dt-O3axB73R5SLm_Veo,22
|
|
10
|
+
python_osw_validation-0.2.10.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
python_osw_validation/__init__.py,sha256=BrVyTquf9n4-US7d_FZBNEjyh24LaucSz4Zd65v2tfw,7946
|
|
2
|
-
python_osw_validation/extracted_data_validator.py,sha256=wZyCk8NlJv10cj_GrRTAiwm4cBhTAeDethjzJU-amoI,3877
|
|
3
|
-
python_osw_validation/version.py,sha256=1MeGsuS1PhEEHmvZ4CYVipAjr6XlyVy-M_a04LDWvEU,21
|
|
4
|
-
python_osw_validation/zipfile_handler.py,sha256=jXnP-8O5AAOBapuNF3-XdFVM1MHiPaWpl_wlbX-aqhY,2631
|
|
5
|
-
python_osw_validation/schema/opensidewalks.schema.json,sha256=i0iJwb_4Tq20BVUpkpgyM_7fm4SW_d_HNXKw0xul7OA,240987
|
|
6
|
-
python_osw_validation-0.2.8.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
7
|
-
python_osw_validation-0.2.8.dist-info/METADATA,sha256=SkT5F02UhWcHiR__O_Y3Gs_OpCsd09R35bmD5g9CJA8,6141
|
|
8
|
-
python_osw_validation-0.2.8.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
9
|
-
python_osw_validation-0.2.8.dist-info/top_level.txt,sha256=GE81UPcDHEffJCxYu3M_iPz3Dt-O3axB73R5SLm_Veo,22
|
|
10
|
-
python_osw_validation-0.2.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{python_osw_validation-0.2.8.dist-info → python_osw_validation-0.2.10.dist-info}/top_level.txt
RENAMED
|
File without changes
|