-
Notifications
You must be signed in to change notification settings - Fork 101
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
Local Web User Interface #1112
Comments
@isabelle-dr Just to clarify what this issue is focusing on - from my perspective there are 3 possible milestones (in increasing level of implementation complexity) for improving the validation process:
Is this issue for 2 above? And #1088 would be split to only include 1 above? |
Yes, it is.
Yes, that's the plan! |
Hi @isabelle-dr, thanks for sharing! What's the main problem that we're trying to solve? Is it easy browsing of validation results once validation is done or easy run of the whole tool? If it's the latter then probably running an integrated web server locally won't be any easier than the current workflow (which is "maybe install java", "download JAR", "run command", "see JSON"). If we want to simplify casual usage of the validator so that people can quickly get familiar with it, I can think of a couple of ways
Please let me know if I misunderstood the problem |
I agree with @asvechnikov2. ☝️ Using my original enumeration in #1112 (comment), I see 2) being an order of magnitude increase in implementation complexity over 1) with a negligible return on making the project easier to use for non-technical users (maybe you remove some command-line parameters, but that's about it). Also, there is only an incremental increase in implementation complexity between 2) and 3), with a much larger return on ease of use for non-technical users. I see two primary blockers for non-technical users to run the validator locally:
The A) "security issues" can only be solved by 3) hosted service. One simpler way to reduce the B) "technical expertise" blocker is to convert the JAR file into a native executable (e.g., Windows .exe file) using something like http://launch4j.sourceforge.net/ or jlink. This would remove the requirement for downloading and installing Java. The original Python validator had a Windows standalone version as a This was widely used, as evidenced by multiple issues (1, 2, 3) of people looking for a Windows With this I've never packaged a JAR as an EXE myself, but I imagine the downside is an increased file size of the validator, since it would need to bundle all the Java libraries used (vs those being installed by the user separately). But that probably still takes up far less space on a user's computer than installing the JRE. |
Just thought I'd mention that there's code in the current Spark server that does sanity checking of the zip inputs to make sure that they don't have embedded folders or There are some sanity-checks that might be too strict and reject valid gtfs files, we've only had a chance to test in on Linux and Mac with firefox and chrome, other browsers or platforms might upload the file a little differently. |
I know this is getting away from the original discussion point for this issue, but I wanted to follow up on the points raised by @barbeau above. Specifically, I want to endorse the idea of packing up a Windows installer for the validator. I maintained the Windows exe for the original Python validator and I can confirm it was used quite a bit. I think a packaged installer for the validator, combined with a simple HTML visualization of the validation report, could go a long way in helping more people run the validator. More importantly, I think it could be done with less engineering resources than a hosted solution. I've done some initial investigation work into the feasibility of this approach, documented in https://bit.ly/gtfs-validator-packaged-exe Critically, I think this approach can achieve the following:
So tl;dr I think it's a good idea :) Enough so that I'm willing to put together a PR for this if there is interest. I acknowledge this particular free cat comes with some upkeep costs, so definitely something to discuss. |
Closing, we decided to implement another solution, described in #1124 |
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 <[email protected]>
Feature request
An interface to improve the accessibility of this tool. The objective of this first iteration is to a simple Local Web UI.
Is your feature request related to a problem? Please describe.
Currently, the instructions to run the validator are long and need a certain technical literacy: download JAR file, open the terminal, navigate to the accurate directory, run a command line with selected parameters, open the report in a JSON viewer.
This is a pain point and even a blocker, for many organizations.
Proposed solution
Recover the work started by @lionel-nj in #421, and build an interface that will act as a Minimum Viable Product that we can build on.
We chose to use Spring Boot because it is community supported, scalable, industry-standard, easy to staff.
Describe alternatives you've considered
Better documentation with images so that users that never used the command line before can use this tool.
Additional context
MobilityData had planned to work a local Web UI in Q1 2022 by recovering the work started in #421.
A Web UI is included in contribution #1088. After reviewing and discussing with @lisaattrillium and @ed-g, MobilityData will continue with the initial plan of building a local Web UI on top of the work started in #421, and we will discuss integrating the amazing work done on the HTML output in this validator.
Acceptance Criteria
Not doing
cc @asvechnikov2
The text was updated successfully, but these errors were encountered: