GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MobilityData/gtfs-validator: Canonical GTFS Validator project for schedule (static) files.

BranchesTags
Open more actions menu

Latest commit

 

History

1,060 Commits
1,060 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
app
app
 
 
cli
cli
 
 
core
core
 
 
docs
docs
 
 
gradle
gradle
 
 
main
main
 
 
model
model
 
 
output-comparator
output-comparator
 
 
processor
processor
 
 
scripts
scripts
 
 
web
web
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
RULES.md
RULES.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
jitpack.yml
jitpack.yml
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Canonical GTFS Schedule Validator

Test Package Document End to end Rule acceptance tests Docker image Join the gtfs-validator chat

A General Transit Feed Specification (GTFS) Schedule (static) feed validator, maintained by MobilityData.


Web version ● Desktop version ● Command line ● Docker

☑️ List of rules implemented

🤝 Contribute to the project


This README contains information for the latest version of the project, which is under active development. You can find the latest version of the validator application on the Releases page.

Introduction

This is a cross-platform application written in Java that performs the following steps:

  1. Loads input GTFS zip file from a URL or disk.
  2. Checks file integrity, numeric type parsing and ranges.
  3. Performs complete validation against the GTFS Schedule standard.
  4. Provides an easy-to-use validation report in HTML format that can be opened in the browser and shared with other parties. See an example of a validation report. The report is also available in JSON format that can be used for parsing and running additional analyses.
validator_demo.mp4

Using the web-based validator

The GTFS Web Validator can be accessed at https://gtfs-validator.mobilitydata.org/. The GTFS Web Validator accepts locally saved datasets in a zip format and datasets available via the Web in an URL format. Validation reports have a unique URL link that can be shared and are available 30 days after creation.

The GTFS Web Validator contains two main components: the GTFS Web Validator Client and the GTFS Validator Web Service. More information about these components can be found in GTFS Web Validator Client and GTFS Validator Web Service.

Several users have reported issues with the validator when processing their GTFS feeds. These issues arise due to the configuration of their websites, which may not be set up to handle:

  1. Requests that come with custom user agents.
  2. Requests originating from non-browser sources.

To facilitate easier debugging and logging, we have made our user agent header explicit. The user agent string follows the format: "MobilityData GTFS-Validator/{validatorVersion} (Java {java version})". In cases where the validatorVersion is null, the {validatorVersion} segment in the user agent string will be left blank. The string "MobilityData GTFS-Validator/5.0.1 (Java 17.0.8)" serves as an example of the User Agent string.

Using the Desktop app

Setup

  1. Navigate to the Releases page and download the latest Gtfs Validator installer for your operating system:
    • Windows => .msi
    • Mac OS => .dmg
    • Linux => .deb
  2. Install application to your workstation.

Run it

Once installed, run the application and you will see the following screen:

Application-Windows

There are two primary options to set:

  • GTFS Input: Use this to specify the GTFS feed to validate. You can specify a URL, ZIP file, or a directory containing the individual .txt files of a feed. You can paste the input location directly into the input field or use the Choose Local File... button to open a file-chooser dialog to select a file on your local system.
  • Output Directory: This is the directory where the validation reports will be written.

With these two options set, click the "Validate" button to begin validation.

Visualize the results

When validation is complete, the application will automatically open the HTML validation report in your local browser. In addition, the application creates the following files in the output directory:

  • report.html: the validation report in HTML format. It can be opened in a browser.
  • report.json: the validation report in JSON format.
  • system_errors.json: this file will be created every-time the validator is run. If no system errors were encountered, this file will be empty.

Advanced Options

Before running validation, tap the Advanced button to configure other aspects of the application, including:

  • Number of threads used to run the validator.
  • The country code used for phone number validation.

Using GUI by command line

Setup

  1. Install Java 17 or higher. To check which version of Java is installed on your computer, type the following command in the terminal: java --version. You can download Java from one of the following sources:
    • Eclipse Adoptium (Temurin) – Open-source & widely used
    • Amazon Corretto - AWS-supported, optimized for cloud
    • Azul Zulu - Enterprise ready
    • Microsoft Build of OpenJDK - Microsoft's JDK
    • Oracle JDK - Official Java from Oracle
  2. Navigate to the Releases page and download the latest Gtfs Validator GUI jar (not OS-specific). It is located in the Assets section of the release, and it looks like gtfs-validator-vX.X.X-gui.jar
  3. Open the terminal on your computer
  4. Navigate to the directory containing the jar file. You can do this by typing the following command in the terminal:cd {directory path}, where {directory path} is the absolute or relative path to the directory. You can then make sure you're in the right directory by typing pwd in the terminal (this stands for present working directory). You can also make sure the jar file is there by typing ls in the terminal (this stands for list and will display the list of files in this directory). More about commands to navigate file and directories here.

Run it

You can run this validator using a GTFS dataset on your computer, or from a URL.

  • To validate a GTFS dataset on your computer, run the following command in the terminal, replacing the text in brackets:
    • java -jar {name of the jar file}
    • here is an example of what the command could look like: java -jar gtfs-validator-gui.jar

Using the command line

Setup

  1. Install Java 17 or higher. To check which version of Java is installed on your computer, type the following command in the terminal: java --version. You can download Java from one of the following sources:
    • Eclipse Adoptium (Temurin) – Open-source & widely used
    • Amazon Corretto - AWS-supported, optimized for cloud
    • Azul Zulu - Enterprise ready
    • Microsoft Build of OpenJDK - Microsoft's JDK
    • Oracle JDK - Official Java from Oracle
  2. Navigate to the Releases page and download the latest Gtfs Validator CLI jar (not OS-specific). It is located in the Assets section of the release, and it looks like gtfs-validator-vX.X.X-cli.jar
  3. Open the terminal on your computer
  4. Navigate to the directory containing the jar file. You can do this by typing the following command in the terminal:cd {directory path}, where {directory path} is the absolute or relative path to the directory. You can then make sure you're in the right directory by typing pwd in the terminal (this stands for present working directory). You can also make sure the jar file is there by typing ls in the terminal (this stands for list and will display the list of files in this directory). More about commands to navigate file and directories here.

Run it

You can run this validator using a GTFS dataset on your computer, or from a URL.

  • To validate a GTFS dataset on your computer, run the following command in the terminal, replacing the text in brackets:

    • java -jar {name of the jar file} -i {path to the GTFS file} -o {name of the output directory that will be created}
    • here is an example of what the command could look like: java -jar gtfs-validator-cli.jar -i /myDirectory/gtfs.zip -o output
  • To validate a GTFS dataset from a URL, run the following command in the terminal, replacing the text in brackets:

    • java -jar {name of the jar file} -u {URL to the GTFS file} -o {name of the output directory that will be created}
    • here is an example of what the command could look like: java -jar gtfs-validator-cli.jar -u https://www.abc.com/gtfs.zip -o output

More detailed instructions with all the parameters that exists are available on our "Usage" page.

Visualize the results

In the output directory, the reports will be created as described here.

Using Docker

Setup

  1. Download and install Docker
  2. To obtain a validator Docker container image, you have two options:
    • Pull a published Docker container image from GitHub. For example, to pull the latest build of the master branch:

      docker pull ghcr.io/mobilitydata/gtfs-validator:latest
    • Build a Docker container image locally from any branch or working tree:

      docker build . -t ghcr.io/mobilitydata/gtfs-validator:latest

Run it

For Mac and Linux

To verify you can run the Docker image in a new container and see the help text:

docker run --rm ghcr.io/mobilitydata/gtfs-validator:latest --help

In order to pass files in and out of the validator, you'll need to use a volume mount to share a directory between your host computer and the Docker container:

docker run --rm -v /myDirectory:/work ghcr.io/mobilitydata/gtfs-validator:latest -i /work/gtfs.zip -o /work/output

where:

  • -v /myDirectory:/work: syntax to share directories and data between the container and the host (your computer). With the above command, any files that you place in /myDirectory on the host will show up in /work inside the container and vice versa.

NOTE: On Windows, you must provide the local volume (e.g., c:) as well:

... c:/myDirectory:/work ...

The validator can then be executed via bash commands. See the preceeding instructions for command line usage.

Visualize the results

In the output directory, the reports will be created as described here.

Validation rules

  • See the list of all the notices emitted by this validator here.
  • If you'd like to map notice names between two validator versions, see NOTICE_MIGRATION.md.
  • Possible future rules for:
    • GTFS Reference
    • GTFS Best Practices
    • Community rules

Have a suggestion for a new rule? Open an issue. You can see the complete process for adding new rules on the "Adding new rules" page.

Previous Releases, Snapshot Builds, and Documentation

  • If you'd like to run the bleeding-edge pre-release Snapshot of the application, see the access instructions.
  • If you are looking for older releases, see the Releases page.
  • If you'd like to view documentation for past releases of the project, see:
    • v1.4.0
    • v2.0.0
    • v3.0.0

Build the code

We suggest using IntelliJ to import, build, and run this project.

Instructions to build the project from the command-line using Gradle are available in our Build documentation.

Architecture

The architecture of the gtfs-validator is described on our Architecture page.

Acceptance tests

In order to avoid sudden changes in the validation output that might declare previously valid datasets invalid, all code changes in pull requests are tested against GTFS datasets in the MobilityDatabase. The acceptance test process is described in ACCEPTANCE_TESTS.md.

Projects based on this validator

CalTrans California Integrated Travel Project (Cal-ITP) GTFS Validator API - A thin wrapper around MobilityData/gtfs-validator.

GTFS Scorecard - Runs this validator on a daily schedule against 2,400+ public GTFS feed records and turns its notices into plain-language grades and prioritized fixes for small transit agencies. Also ships a GitHub Action that checks a feed before it is published.

gtfs-validator-metrics-service - A thin wrapper that exposes GTFS validation results as Prometheus/OpenTelemetry metrics.

License

Code licensed under the Apache 2.0 License.

Contributing

We welcome contributions to the project! Please check out our Contribution guidelines for details.

About

Canonical GTFS Validator project for schedule (static) files.

gtfs-validator.mobilitydata.org/

Topics

dockergtfsgtfs-archivegtfs-datasetgtfs-feedgtfs-schedulegtfs-staticgtfs-validatorgtfs-zipjarjavavalidatorwar

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

435 stars

Watchers

21 watching

Forks

131 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.