Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

### 0.3.6 - 2026-04-10
- Fixed https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3469
- Added regression coverage for `tests/assets/task_3469.zip` to assert the exact per-feature `issues` payload: `"null" is not one of "down" or "up"` on `FIFA_sidewalks.edges.geojson` feature index `0`.
- Aligned package dependency pins by updating `setup.py` to `jsonschema_rs==0.33.0` (matching `requirements.txt`).

### 0.3.5 - 2026-03-16
- Fixed filename-based schema selection to use exact dataset suffixes such as `.nodes.geojson`, `.edges.geojson`, and the legacy `.nodes.OSW.geojson` form instead of loose substring matching.
- Prevented false schema selection for filenames with misleading prefixes such as `gs_metaline_falls_uga.nodes.geojson` and `gs_yarrow_point.edges.geojson`.
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jsonschema_rs
zipfile36
jsonschema_rs==0.33.0
zipfile36==0.1.3
coverage
geopandas==0.14.4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
long_description_content_type='text/markdown',
url='https://github.com/TaskarCenterAtUW/TDEI-python-lib-osw-validation',
install_requires=[
'jsonschema_rs==0.26.1',
'jsonschema_rs==0.33.0',
'zipfile36==0.1.3',
'geopandas==0.14.4'
],
Expand Down
2 changes: 1 addition & 1 deletion src/python_osw_validation/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.5'
__version__ = '0.3.6'
Binary file added tests/assets/task_3469.zip
Binary file not shown.
26 changes: 26 additions & 0 deletions tests/unit_tests/test_osw_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def setUp(self):
self.invalid_zones_file = os.path.join(ASSETS_PATH, 'UW.zones.invalid.zip')
self.valid_osw_file = os.path.join(ASSETS_PATH, 'wa.bellevue.zip')
self.invalid_v_id_file = os.path.join(ASSETS_PATH, '4151.zip')
self.task_3469_file = os.path.join(ASSETS_PATH, 'task_3469.zip')
self.serialization_file = os.path.join(ASSETS_PATH, 'test_serialization_error.zip')
self.schema_file_path = SCHEMA_FILE_PATH
self.schema_paths = SCHEMA_PATHS
Expand Down Expand Up @@ -267,6 +268,31 @@ def test_unmatched_ids_limited_to_20(self):
# Ensure the total count is mentioned
self.assertIn('Showing 20 out of', error_message)

def test_task_3469_issue_payload(self):
validation = OSWValidation(zipfile_path=self.task_3469_file)
result = validation.validate()
self.assertFalse(result.is_valid)
self.assertEqual(
result.issues,
[{
'filename': 'FIFA_sidewalks.edges.geojson',
'feature_index': 0,
'error_message': ['"null" is not one of "down" or "up"'],
}]
)

def test_jsonschema_rs_pin_is_0_33_0(self):
requirements_path = os.path.join(SRC_DIR, 'requirements.txt')
setup_path = os.path.join(SRC_DIR, 'setup.py')

with open(requirements_path, 'r', encoding='utf-8') as f:
requirements_content = f.read()
with open(setup_path, 'r', encoding='utf-8') as f:
setup_content = f.read()

self.assertIn('jsonschema_rs==0.33.0', requirements_content)
self.assertIn('jsonschema_rs==0.33.0', setup_content)


if __name__ == '__main__':
unittest.main()
Loading