Giter VIP home page Giter VIP logo

gtfs-validator's People

Contributors

barbeau avatar kpwebb avatar laidig avatar landonreed avatar mattwigway avatar mohangandhigh avatar platzii avatar sheldonabrown avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

platzii

gtfs-validator's Issues

Check for multiple timezones not working properly

Hi

Seems like the check for multiple timezones does not work properly. Im getting this output:

Exception in thread "main" java.lang.IllegalArgumentException: File contains two time zones, which is not allowed by the GTFS spec
    at com.conveyal.gtfs.service.CalendarDateVerificationService.<init>(CalendarDateVerificationService.java:82)
    at com.conveyal.gtfs.validator.ValidatorMain.main(ValidatorMain.java:70)

The agency.txt file contains multiple agencies but they are all in the same timezone as seen here:
screen shot 2017-01-20 at 11 01 47
Used feed: http://gtfs.ovapi.nl/new/archive/NL-20170119.gtfs.zip

Kind regards
Simon

Exit code should not be 0 when the GTFS-file is not found

Hi

I've found another small problem.

Right now the validator exits with status code 0 when the specified GTFS feed is not found.
Same for when you do not specify the file at all.
In both situations a non-zero value should be returned as exit code.


Command:

java -jar gtfs-validator.jar /data/non-existing-feed.zip

Error message:

Reading GTFS from /data/non-existing-feed.zip
Could not read file /data/non-existing-feed.zip; does it exist and is it readable?

Returned statuscode: 0


Command:

java -jar gtfs-validator.jar

Error message:

Usage: gtfs-validator /path/to/gtfs.zip

Returned statuscode: 0


Kind regards
Simon

gtfs-validator-webapp does not allow to view JSON file reports that contains '://'

We are actually trying to use gtfs-validator-webapp in the project https://github.com/CUTR-at-USF/gtfs-realtime-validator and we encountered with this problem while trying to view output json file from a web server for example, 'localhost:8080/laidig_webapp/index.html?report=http://localhost:8080/out.json'.

This throws an error ''Only local reports may be viewed, message: Please specify a local report to view''.
As gtfs-validator-webapp does not allow json reports containing '://' in the report parameter value (as shown in above example i.e., http://localhost:8080/out.json), Is that fine to reconsider the decision to allow the report parameter to contain '://'

Here is the condition in validation.js file that does not allow paths with '://'

if (params.report.indexOf('//') == 0 || params.report.indexOf('://') != -1) {
new ErrorView({
model: new ErrorModel({title: 'Only local reports may be viewed', message: 'Please specify a local report to view'})
}).render().$el.appendTo('#content');
return;
}

NullPointerException when calendar.txt is empty

Hi

I've noticed the validator crashes when the calendar.txt file is empty (just containing the headers).

Stacktrace:

Exception in thread "main" java.lang.NullPointerException
    at java.util.Calendar.setTime(Calendar.java:1770)
    at org.onebusaway.gtfs.model.calendar.ServiceDate.getCalendarForDate(ServiceDate.java:298)
    at org.onebusaway.gtfs.model.calendar.ServiceDate.<init>(ServiceDate.java:89)
    at com.conveyal.gtfs.service.CalendarDateVerificationService.<init>(CalendarDateVerificationService.java:55)
    at com.conveyal.gtfs.validator.ValidatorMain.main(ValidatorMain.java:70)

File used:
http://gtfs.irail.be/nmbs/nmbs-2016-12-1.zip

I don't know whether this is a valid GTFS format or not, but the validator shouldn't crash on this I suppose.
Could you check this out please?

Kind regards
Simon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.