This is a tool to validate fares-v2 GTFS datasets.
Validates ONLY fares-v2 specific files and dependent files, and does NOT validate GTFS schedule data.
Provides validation towards two versions of the fares-v2 specifications:
- [Default] fares-v2 files in the official GTFS specification
- [Through
-e
flag] the official specification above, as well as additional fields ("experimental" fields) defined in the GTFS fares-v2 draft document, with some exceptions. Also includes some fields used internally at Transit, and which are either current or upcoming proposals to the official specification.
Running the tool with the -e flag provides validation for experimental features, and notices pertaining to experimental features are clearly marked as such.
python 3
python3 validate.py PATH-TO-FOLDER-CONTAINING-FARES-V2-DATASET [-o, --output-file FILE-TO-EXPORT-VALIDATION-REPORT-TO] [-e, --experimental]
For example:
python3 validate.py ~/data/my-fares-v2-dataset -o report.txt
python3 -m pip install pytest
pytest
fare_capping.txt
: unsupported file. Allfare_capping
references in other files are also unsupported.fare_products.txt
:service_id
, alltimeframe
fieldsfare_transfer_rules.txt
:transfer_id
,transfer_sequence
fare_leg_rules.txt
:contains_area_id
, allamount
fields,currency
fare_transfer_rules.txt
: allamount
fields,currency
,
Amount and currency on these two files have been replaced by the usage of fare products to specify cost.
fare_leg_rules.txt
transfer_only
: specifies that a fare leg rule may only be used at the back-end of a transfer
fare_transfer_rules.txt
filter_fare_product_id
: a fare product necessary to have in order for a transfer to be valid. Does not encode thecost
of a transfer, asfare_product_id
does.