Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Connected Work Zone (CWZ) 1.0 message format, expands support for alternating traffic scenarios, and improves dual carriageway geometry generation. The implementation includes new standard-to-CWZ translators, enhanced vehicle impact detection for alternating traffic patterns, and updates to the geospatial API for more accurate route handling.
- Creates standard_to_cwz translator modules for converting RTDH standard messages to CWZ 1.0 format
- Adds support for alternating traffic with "alternating-one-way" vehicle impact and "alternating-flow" lane status
- Improves dual carriageway route detection and geometry generation logic
Reviewed Changes
Copilot reviewed 30 out of 46 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| wzdx/tools/cwz_translator.py | New CWZ translator utility functions for message initialization, validation, and conversion |
| wzdx/tools/cdot_geospatial_api.py | Updated base URL and corrected dual carriageway detection logic |
| wzdx/standard_to_wzdx/planned_events_translator.py | Removed vehicle impact calculation and updated program name |
| wzdx/standard_to_cwz/planned_events_translator.py | New CWZ translator for planned events with alternating traffic support |
| wzdx/sample_files/validation_schema/connected_work_zone_feed_v10.py | New CWZ v1.0 JSON schema validation |
| wzdx/raw_to_standard/planned_events.py | Enhanced alternating traffic detection and vehicle impact calculation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I will let you respond to the Copilot stuff before I go any further with my review. Looking at a completely new project is making me go cross eyed and I think this did a good job at finding some little stuff that may have been missed. I am not so sure on some of its logical interpretations. Copilot can definitely be wrong. |
|
@drewjj all copilot comments have been addressed. It did get a few things wrong, which usually means I didn't document the intended functionality enough. I added some comments |
drewjj
left a comment
There was a problem hiding this comment.
I think this looks good! The tests all pass just fine for me too.
There was a problem hiding this comment.
Trouble Running Unit Tests
Linux
When I attempt to run the unit tests, I get the following:
ModuleNotFoundError: No module named 'six.moves'
This is after opening the project in WSL, running pip install -r requirements.txt followed by python -m pytest 'tests/' -v
Windows
Upon running python -m pytest 'tests/' -v on Windows I run into the following:
ERROR: file or directory not found: 'tests/'
If I just run python -m pytest on Windows, I run into the following:
INTERNALERROR> E ModuleNotFoundError: No module named 'jsonschema'
dmccoystephenson
left a comment
There was a problem hiding this comment.
The new enums make the code a lot easier to read & understand!
I was able to get the unit tests to run using a virtual environment, and I ran into a number of test failures:
Steps to reproduce in WSL:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m pytest 'tests/' -v
Turns out I was on the wrong branch! When I switched to the |
Adding support for CWZ 1.0 message
The CWZ data feed is deployed to the RTDH production environment, and is now featured on the WZDx Feed Registry