Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.0 Release plan - Validator as Packaged Executable + UI for results #1124

Closed
isabelle-dr opened this issue Apr 27, 2022 · 1 comment
Closed
Labels
epic Used for bigger pieces of work. Usually split between several issues.

Comments

@isabelle-dr
Copy link
Contributor

isabelle-dr commented Apr 27, 2022

This is an issue for the 3.1.0 release of the validator that is planned for Q2 2022.
It will be updated as we plan and develop the features.

Context

Currently, the reach of this tool is limited to users that are comfortable with using GitHub, JAR files, and the terminal. The long term vision is to provide a hosted interface on the Mobility Database website for running this validator, seeing the results, and sharing the results with other parties.
To solve this issue, we initially planned on working on a local web UI (see this issue). But after some discussions with the GTFS community and validator contributors, we realized that this was only slightly improving the ease-of-use and that for the same amount of effort, we could implement a better solution.
Various considerations are taken into account when deciding what solution to implement.

  • MobilityData currently has very limited software development resources, we would like to get the first version of this solution in Q2 2022.
  • Google is interested in contributing to this release
  • Work on an HTML output has already been done by Trillium in PR#1119
  • MobilityData will further maintain this feature, and we would like to be able to re-use this work when the integration of the validator is done with the Mobility Database.

Goal for the release 🎯

Supporting the following user needs:

  • 👤 As a GTFS producer/consumer with mid-low tech skills, I want to run the Schedule Validator in order to evaluate the quality of a GTFS dataset
    • ⚠️ Current pain points: manipulation the JAR file, using the command line, using GitHub
    • 💡 Solution 1: Use a Pagkaged Executable, implemented by @bdferris-v2 at Google.
      - Doing in this release:
      - validator as a downloadable EXE, the validator runs when the user drag & drops the .zip GTFS file on it
      - Doing in later stages:
      - A UI to run the validator
      - Integrate the command-line parameters
      - A logo
      • UPDATE: Doing in this release:
        • validator as a downloadable EXE, simple GUI that integrates simple command line parameters
  • 👤 As a GTFS producer/consumer with mid-low tech skills, I want to see the validation results and understand them in order to fix my dataset
    • ⚠️ Current pain points: Have to have a few files open to understanding the validation report, have to use a Json Viewer
    • 💡Solution 2: An HTML file that will get generated as an output, implemented by @maximearmstrong at MobilityData, with Trillium's help
    • UPDATE: 💡Additional solution: Re-work RULES.md and integrate info from NOTICES.md to ease interpretation of the validation report.
    • Doing in this release:
      • Display the total number of notice types, list of notices, number of occurrences of each, severity, collapsable details in a table
    • Doing in later stages:

Materials

Related issue: #1126
Work in PR #1127
Work in PR #1125
Packaged Executable for GTFS Validator proposal by @bdferris-v2 https://bit.ly/gtfs-validator-packaged-exe.
Discussion in issue #1112

cc @asvechnikov2, @ed-g

@isabelle-dr isabelle-dr added enhancement New feature request or improvement on an existing feature epic Used for bigger pieces of work. Usually split between several issues. and removed enhancement New feature request or improvement on an existing feature labels Apr 27, 2022
@isabelle-dr isabelle-dr added this to the v3.1.0 - Local Web UI milestone Apr 27, 2022
@isabelle-dr isabelle-dr pinned this issue Apr 27, 2022
@isabelle-dr
Copy link
Contributor Author

isabelle-dr commented May 3, 2022

For anyone like me that only functions with visual things, here is the user story map for the HTML output portion. It displays:

  • the before & after user flow
  • what user stories are included in this release and what will be a next iteration

It will keep evolving with the feedback we receive, but as of today, this is what it will look like for the user story: I want to see the validation results and understand them in order to fix my dataset

Before:

Screen Shot 2022-05-03 at 12 09 14 PM

After:

Screen Shot 2022-05-05 at 8 55 04 AM

bdferris-v2 added a commit that referenced this issue May 10, 2022
Introduces functionality to package the GTFS Validator as an installable application, including a bundled JRE, to make it easier for users to run the validator. As discussed in issue #1112, https://bit.ly/gtfs-validator-packaged-exe, and #1124.

This is the initial entry for a minimal packaged validator app, to be run as a native application
on Windows and Mac OS.  Right now, it's just a simple wrapper around the CLI app.  It includes the following changes:

* Switch to ClassGraph for package class reflection, moving away from Guava ClassPath.

Guava's ClassPath scanning has issues when run against Java Modules and its own source
code advises you to use ClassGraph instead:
https://github.com/google/guava/blob/master/guava/src/com/google/common/reflect/ClassPath.java

This change will better support running the validator as a Java Module in a packaged runtime.

	modified:   core/build.gradle
	modified:   core/src/main/java/org/mobilitydata/gtfsvalidator/notice/NoticeSchemaGenerator.java
	modified:   core/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsFeedLoader.java
	modified:   core/src/main/java/org/mobilitydata/gtfsvalidator/validator/ValidatorLoader.java


* Add some documentation comments to app.gui.Main

* Write flogger statments to ~/gtfs-validator.log in addition to the console, for easier
debugging when running the app in non command-line mode.

* Update copyright headers on new files.

* Fix issue with javadoc aggregation.

Specifically, switch the project to use the io.freefair.aggregate-javadoc-jar plugin and disable Javadoc generation for the :app:pkg sub-project.

Javadoc generation appears to get tripped up for the :app:pkg sub-project because of the previously discussed tricks I used to get Java Modules working (shadow jar wrapped as a single module). Specifically, Javadoc appears to be adding the the shadow jar its classpath along with all the other project dependencies, which is causing a bunch of duplicate class warnings.

There seem to be two options for fixing this:

1)   We try to fully modularize the entire project. I'm wary of going down this road for now.
2)   We try to exclude the :app:pkg project from Javadoc generation. It only has a single dummy class anyway, so we're not missing much there.

The trick with option # 2 is that we are using the nebula-aggregate-javadocs plugin from Netflix for project-wide javadoc aggregation. This plugin doesn't appear to have a way of excluding a project (I've looked at the source). This plugin also hasn't been updated in five years?

As an alternative, there are newer Gradle plugins that support javadoc aggregation. Specifically, I just tried the io.freefair.aggregate-javadoc-jar, which is currently being actively maintained. Per the source, it's possible to exclude particular projects with a "javadoc { enabled = false }" clause in a sub-project. I've verified this behavior on own project. It seems to generate aggregated javadoc in build/docs/javadoc/ like the old plugin, though the target name has changed:

aggregateJavadocs => aggregateJavadoc (the s is dropped)

* Add details about app:gui and app:pkg sub-projects to ARCHITECTURE.md.

I took the liberty of replacing the existing static architecture diagram with a Mermaid diagram that can be edited directly in Markdown.

* Add and update TODOs to reference github issues.

* Update app to use a default output directory of `~/GtfsValidator`.

* Add build instructions for the installable application in BUILD.md.

* Remove $ from command line in BUILD.md.

* Note requirement for Wix when building package on Windows.

* Add note about how app is under active development.

Co-authored-by: Brian Ferris <bdferris@google.com>
@isabelle-dr isabelle-dr unpinned this issue Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Used for bigger pieces of work. Usually split between several issues.
Projects
None yet
Development

No branches or pull requests

1 participant