Skip to content

Stage to Main - #75

Open
sujata-m wants to merge 21 commits into
mainfrom
stage
Open

sujata-m wants to merge 21 commits into
mainfrom
stage

Conversation

@sujata-m

Copy link
Copy Markdown
Collaborator

Dev Board Ticket

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

susrisha and others added 11 commits March 20, 2025 15:33
Created proper dataset for validation
## 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
```
@sujata-m
sujata-m requested a review from a team as a code owner June 10, 2026 10:35
@sujata-m
sujata-m requested review from MashB and susrisha June 10, 2026 10:35
jeffmaki and others added 10 commits October 22, 2026 17:47
…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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants