gtfs-validator icon indicating copy to clipboard operation
gtfs-validator copied to clipboard

Filename in web validator is not informative

Open jcpitre opened this issue 1 year ago • 10 comments

Describe the bug

Bug or feature request? The web validator html report gives the filename of the dataset. e.g.:

image

It does not mean anything when using the web validator.

Steps/Code to Reproduce

Any web validation will give the same result.

Expected Results

Something significant, like the name of the uploaded file.

Actual Results

image

Screenshots

No response

Files used

No response

Validator version

version 4.1.1-SNAPSHOT

Operating system

MacOS

Java version

No response

Additional notes

No response

jcpitre avatar Jul 19 '23 16:07 jcpitre

Indeed! The intention was to have the name of the file here, which works properly when using the command line. Screenshot 2023-07-27 at 2 51 55 PM

isabelle-dr avatar Jul 27 '23 18:07 isabelle-dr

The value printed in the report is the input file that was read. Based on the code, the web interface uploads a local file to the unique-but-not-meaningful name for processing, resulting in the current behavior.

To display the original filename in the report, we need the web interface to pass in the original file name somehow. The obvious way I see is to add an additional field to ValidationRunnerConfig. Maybe "originalGtfsSource"?

That value would be populated by the web interface around here: https://github.com/MobilityData/gtfs-validator/blob/3d5ef6f31839f74fff3338c8a8d9869df88cc7c0/web/client/src/routes/%2Bpage.svelte#L219 Probably added to JobMetadata and populated by the server here: https://github.com/MobilityData/gtfs-validator/blob/3d5ef6f31839f74fff3338c8a8d9869df88cc7c0/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java#L62 Then passed in to ValidationHandler.validateFeed(): https://github.com/MobilityData/gtfs-validator/blob/3d5ef6f31839f74fff3338c8a8d9869df88cc7c0/web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/ValidationHandler.java#L33

The main cost is the new field in ValidationRunnerConfig that is just for the web interface. But it seems worth it.

If someone from MobilityData agrees, then I'll create a PR.

bradyhunsaker avatar Jan 02 '24 23:01 bradyhunsaker

Great that you are willing to do the work. Go ahead. Ideally it should also cover the case where a URL is provided. In that case the URL can be printed in the report.

jcpitre avatar Jan 09 '24 22:01 jcpitre

I've tried to start work on this issue, but I haven't yet succeeded at the first step, which is to be able to build and bring up a local instance of the web server (without any code changes).

I prefer not to go through the trouble of creating a Google Cloud instance. I prefer to just bring up the server locally. There are some instructions for this at https://github.com/MobilityData/gtfs-validator/blob/master/web/service/README.md#local-development, but I don't find them clear and I continue to get errors when attempting to run ./gradlew bootRun.

Do you know if anyone has brought up a local server successfully and can glance over the existing instructions?

bradyhunsaker avatar Jan 30 '24 13:01 bradyhunsaker

@bradyhunsaker What about we do it in two parts: First you add an argument to the CLI version and I can work on using it in the web version.

jcpitre avatar Jan 30 '24 16:01 jcpitre

Yes, that sounds good! I wasn't imagining having a CLI interface, but this makes it seem it's a good idea for testing.

I'll test that part and create a PR.

If you'd like I could also create a draft PR for the web server part, even though I wouldn't test it.

bradyhunsaker avatar Jan 31 '24 13:01 bradyhunsaker

The idea is that if you add to the CLI version most of what you write will be used by the Web version. For the web server part, if you have not started I can take care of it. If you have started I will be happy to test it for you.

jcpitre avatar Feb 01 '24 18:02 jcpitre

Hi @bradyhunsaker, are you still planning to work on this? Our team's hoping to prioritize completing it in the next month.

emmambd avatar Mar 22 '24 17:03 emmambd

Hi Emma,

Apologies that I have neither done anything nor said anything in almost two months. Thank you for asking.

There is no need to wait on me. If someone else is ready to do the work, go for it! That's true for me in general. I never want to block other folks, given that I can't usually commit to a schedule, at least not for work that I haven't started.

In the future when I have indicated an interest in an issue like this and haven't been able to prioritize it within several weeks, I'll try to post a note explicitly saying so, so that people don't have to wonder.

I do intend to make some more contributions when I'm able to squeeze in some time, but I don't know how soon that will be, and I'm not emotionally attached to any particular issues.

bradyhunsaker avatar Mar 23 '24 18:03 bradyhunsaker

@bradyhunsaker No worries! We're always grateful for contributions and completely understand that capacity changes. Going forward, sharing when you haven't been able to work on something sounds like a great plan. Our team can work on this in the near term then instead.

emmambd avatar Mar 23 '24 18:03 emmambd