Repository navigation
Conversation
readme and test script updated
Created proper dataset for validation
Update success.zip
## Dev Board Ticket - https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3657 ## Changes - Fixed validation error output so job messages emit parseable JSON with double-quoted keys and strings. - Added parsing for gtfs-canonical-validator==0.0.9 JSON-string error and info responses before applying validation logic. - Prevented downgraded warning handling from failing when result.info is returned as a JSON string. - Added regression tests for JSON-string validator responses and JSON-formatted validation messages. ## Testing ``` python -m coverage run --source=src -m unittest discover -s tests/unit_tests ........... ........ OK Ran 65 tests in 74.497s ```
Fix JSON formatting
Dev to Stage
…eport - Run MobilityData's GTFS validator CLI (pinned, checksummed, downloaded by scripts/download-gtfs-validator.sh) instead of uploading each feed to MobilityData's hosted service. The feed stays in TDEI and results are the same (same validator version, 8.0.1). A feed MobilityData can't load fails with its load error. - Run TDEI's own pathways checks (src/custom_checks.py, outlined, not yet implemented) on the same feed. Their notices use MobilityData's format and the same pass/fail rules in pathways_config.py. - Upload a report next to the feed: a zip of report.json and report.html (every notice, its source, and whether it fails the upload) plus MobilityData's own reports. The response message adds report_url and report_summary; the result doesn't depend on the upload. - The Docker image and CI install Java and the validator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Implement the 25 TDEI pathways checks in custom_checks.py on a shared PathwaysModel (stations, levels, and a directed pathway graph with step-free routes), with severities set in review. Tests build one standard station and break one thing each. - Fail uploads on every MobilityData or TDEI error, except codes pathways_config.py downgrades; unreadable feeds always fail. - Report dataset metrics (completeness and step-free connectivity), keep up to 1,000 samples per notice, and give TDEI samples a stable defectId. - Always clean up downloads, even when validation crashes; raise a clear error when a download fails; never remove files outside downloads/. - Rename the modules and classes to PathwaysQueueWorker and PathwaysFeedValidation, and remove unused zips and scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… station Two placement checks, as WARNINGs: tdei_pathway_ends_far_apart (a pathway's stops farther apart in a straight line than its mode spans: 500 m walkways, 150 m stairs and escalators, 50 m elevators and gates) and tdei_stop_far_from_station (over 500 m from its station). Limits are tuned so MBTA's feed has none and Baltimore Metro's misplaced stops show. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- stair_count the wrong way is a WARNING; a boarding area off its platform's level is an ERROR; a stop far from its level is a WARNING. - Split tdei_length_mismatch into tdei_length_too_short (WARNING: under half the straight line between two point stops) and tdei_length_too_long (INFO: over twice, usually a winding route). Pathways ending at a platform or boarding area aren't "too short": those are areas placed at one point (227 of MBTA's 253 such hits). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tests - Lenient mode (default; PATHWAYS_STRICT or --strict for strict): errors in pathways data are reported as warnings so one station's problems don't reject a whole feed; unreadable feeds and core GTFS errors still fail. Pathways data is TDEI's checks, MobilityData's pathway codes, and any MobilityData error in pathways.txt or levels.txt or about an entrance, node or boarding area (pathway_errors.py). Reports record the mode. - Don't count one-way-by-design places (arrival- or departure-only platforms, from stop_times) as MobilityData's unreachable locations. - TDEI ERRORs are now only what would route riders wrongly or not at all: unreachable level, station without entrance. Step-free checks and entrance-not-at-street-level are INFO; stair_count direction is a WARNING; same-level stairs under 10 steps are INFO. - New checks: pathway ends far apart, stop far from station, length too short/too long (split), stops sharing a location or a position, exit-only entrances, short stairs within a level, stations without pathways. - docs/validation-rules.md lists every rule (a test keeps it in sync), and scripts/validate_feed.py validates feeds locally as the service does. - Move the HTML test runners and test-case list into tests/, discover tests automatically, and remove 12 redundant tests and 6 fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…report Validate pathways locally with MobilityData's validator and TDEI checks, with a report
Many escalators are marked is_bidirectional 1 because they're reversible (they run one way at some times and the other way at others), which GTFS allows; it only forbids two-way exit gates (MobilityData's bidirectional_exit_gate). So tdei_escalator_two_way mostly flagged correct data. Removed, with its rules doc entry; the tests that used it as a sample now use tdei_walkway_changes_level. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stop flagging two-way escalators
Dev to Stage
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dev Board Ticket
Changes
Testing