a-b-street/osm2streets

View test state in Street Explorer

Open

#29 opened on Jun 21, 2022

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Jupyter Notebook (13 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (142 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

When working on any code covered by the tests, you'll have a rapidly changing test source directory. Sometimes .orig files will show up that should be compared to new output.

It would be easy for the test browser to interact with an HTTP API to list and load the tests on the fly. A simple poll could detect .orig files, and offer to view the diff for those tests. (We could later progressively enhance to use a websocket to talk to a test runner that's watching the files.)

Note that we are moving away from yew in rust, and towards native JS.

Possibilities

trunk currently works as a perfectly cromulent web server with zero additional deps on the user.

trunk has a proxy setting that would let us easily pass a route through to whatever server we set up.

Serving files and directory indexes would get us 80% of the way there.

If we could write custom request handlers in rust, then we could do whatever fancyness we would need. We could even accept .osm (or a region to fetch) and create and run a new test.

Triggering tests that are run by the server would be cool, because the server can be set up to test in any way that we want, without needing to support the browser. E.g. we could generate a MapMachine rendering as part of the test or test any downstream users of osm2streets.

Contributor guide