Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Latest commit

 

History

History
152 lines (90 loc) · 9.02 KB

README_old.md

File metadata and controls

152 lines (90 loc) · 9.02 KB

GTFS-realtime Validator Java CI with Maven Docker Badge Join the GTFS-realtime chat

Please note that CUTR at USF has partnered with MobilityData to maintain the GTFS Realtime Validator as a community resource, and the latest software development is happening on the MobilityData repository.

The below information is for historical purposes if you're running an older version of the validator. See the main README for current information.

A tool that validates General Transit Feed Specification (GTFS)-realtime feeds

Read more in this Medium article.

Questions? You can open an issue, ask the MobilityData Slack Group or reach out to the GTFS-realtime Google Group.

Quick start - Run it yourself

Please note that this project is still under active development and is in an early alpha state.

Prerequisites

  1. Install Java Development Kit (JDK) 1.8 or higher

Run the webapp

  1. Download the latest webapp alpha build:
    • (TODO - COMING SOON!)
  2. From the command line run java -Djsse.enableSNIExtension=false -jar gtfs-realtime-validator-webapp-1.0.0-SNAPSHOT.jar
  3. When prompted, in your browser go to http://localhost:8080
  4. Enter your General Transit Feed Specification (GTFS)-realtime and GTFS feed URLs and click "Start". Example feeds:

Please note that if you're using https URLS, you'll need to use the -Djsse.enableSNIExtension=false command-line parameter or install the Java Cryptography Extension (JCE) - see the Prerequisites section for details.

Run batch validation

See the batch processing section of the gtfs-realtime-validator-lib README.

Rules

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

Building the project

There are two components to this project:

  • gtfs-realtime-validator-lib - The core library that implements GTFS-realtime validation rules as well as batch processing mode. You can use this same library in your own project.
  • gtfs-realtime-validator-webapp - A server and website that allows multiple users to validate GTFS-relatime feeds by simply entering URLs into the website.

The main gtfs-realtime-validator-webapp user interface is implemented as a web application, with the backend code written in Java. An instance of the Jetty embedded server is used to run the application, with Hibernate used for data persistence.

Prerequisites

Following are the requirements to build and run the project from source code:

If you're using https URLs for GTFS or GTFS-rt feeds, either:

  • Use the -Djsse.enableSNIExtension=false parameter when running the tool
  • Install the Java Cryptography Extension (JCE) - You will need to replace the US_export_policy.jar and local_policy.jar files in your JVM /security directory, such as C:\Program Files\Java\jdk1.8.0_73\jre\lib\security, with the JAR files in the JCE Extension download.

1. Build the project

From the command-line, run:

mvn package

This will generate an executable file in the gtfs-realtime-validator-webapp/target/ directory with all the dependencies needed to run the web application.

Note that this might take a while - this project also builds and packages the gtfs-validator so a static GTFS validation report can be seen within the GTFS-rt validator tool.

If you're going to be rebuilding the project frequently (e.g., editing source code), we suggest you load the project as Maven project in an IDE like IntelliJ or Netbeans.

2. Run the application

To start up the server so you can view the web interface, from the command-line, run:

  • java -Djsse.enableSNIExtension=false -jar gtfs-realtime-validator-webapp/target/gtfs-realtime-validator-webapp-1.0.0-SNAPSHOT.jar

You should see some output, and a message saying Go to http://localhost:8080 in your browser.

3. View the application

Once the application has been started, you can enter URLs for the feeds you'd like to have validated at:

http://localhost:8080

Configuration options

See our Configuration Guide for various configuration options, including changing the port number that the server runs on, what database it connects to, and more.

Note that the validator also has a batch processing mode - see the gtfs-realtime-validator-lib README.

Docker

Pull the latest image from Docker Hub:

docker pull cutrusf/gtfs-realtime-validator

Or, build the image yourself using the following:

docker build -t gtfs-realtime-validator .

Then, run with:

docker run gtfs-realtime-validator

Then go to http://<docker-machine-ip>:8080 in your web browser. For example, http://192.168.99.100:8080/.

You can use docker-machine ip to find your docker machine IP.

Troubleshooting

Having problems? Check out our Troubleshooting guide.

CUTR Release Process

Snapshots

We've set up a Maven repository to hold the snapshot artifacts from this project in a Github project - cutr-mvn-repo.

At CUTR, we should run the following at the command-line to create a new artifact:

mvn -Dgpg.skip -DaltDeploymentRepository=cutr-snapshots::default::file:"/Git Projects/cutr-mvn-repo/snapshots" clean deploy

Then commit using Git and push new artifacts to Github.

If you want to include snapshot releases in your project, you'll need to add the following to the pom.xml of the project you want to use it in:

<!-- CUTR SNAPSHOTs/RELEASES -->
<repositories>
    <repository>
        <id>cutr-snapshots</id>
        <url>https://raw.githubusercontent.com/CUTR-at-USF/cutr-mvn-repo/master/snapshots</url>
    </repository>        
</repositories>

Acknowledgements

This project was funded by the National Institute for Transportation Communities (NITC) via the project "Overcoming Barriers for the Wide-scale Adoption of Standardized Real-time Transit Information". It also includes work funded under the 2015 Google Summer of Code.