Giter Club home page Giter Club logo

Comments (5)

BudgieInWA avatar BudgieInWA commented on May 25, 2024

Alternatively: tests writes a summary at the root

When the tests are run, we could write everything we need into a nice tests.json at the root, that the client can load, parse, re-poll, etc.

Then the web app can be a purely static site. We could just move the site stuff into tests: index.html at the top; test-cases/ for test data; src/ for rust;web/ for js, css, assets. Serve with python -m http, nginx, trunk or whatever you have installed.

from osm2streets.

BudgieInWA avatar BudgieInWA commented on May 25, 2024

We now have street-explorer which is a static site that loads tests from the test directory. StreetExplorer should load more of the test data: it should show the description currently found in test.json and it should show both the .orig and "dirty" geometry so we don't need to run two versions to diff the geometry.

Having the test runner summarise the test run and write it to a file that StreetExplorer can display still sounds worthwhile to me.

I still think the tests themselves should come out of the src/ directory (they're not compiled source, they're runtime data).

from osm2streets.

dabreegster avatar dabreegster commented on May 25, 2024

it should show both the .orig and "dirty" geometry so we don't need to run two versions to diff the geometry.

I often generate details and flip between two tabs to spot diffs. The lane polygons and markings visually help. This'd be harder to do just displaying two files. But changing the viewport of the two browser tabs in a synchronized way is annoying, so at least having old and new in the same map could be useful.

Having the test runner summarise the test run and write it to a file that StreetExplorer can display still sounds worthwhile to me.

A simple answer could be to just have serve_locally.sh and the github action ls tests/src and write a file that we serve over HTTP. We could make a Rust method in the tests crate bake in the list at build-time using build.rs, but then we'd need to depend on a new crate from street-explorer and wire up WASM glue for it, which feels more convoluted

I still think the tests themselves should come out of the src/ directory (they're not compiled source, they're runtime data).

Sure, I don't recall why they're in src/ to begin with... oops?

from osm2streets.

BudgieInWA avatar BudgieInWA commented on May 25, 2024

I often generate details and flip between two tabs to spot diffs. The lane polygons and markings visually help. This'd be harder to do just displaying two files.

If StreetExplorer automatically displayed the diff the a local test-run generated (displaying both the orig and new at once, providing an button to toggle between) then it would be very appealing to use it I think. Then I'd just be tempted to add lane markings as another test output.

Having the test runner summarise the test run and write it to a file that StreetExplorer can display still sounds worthwhile to me.

A simple answer could be to just have serve_locally.sh and the github action ls tests/src and write a file that we serve over HTTP.

Yeah, I think that's what I'm thinking of... I was only thinking about the use case serving locally. If running the tests locally generated a test_results.json that lists all the failing tests, then StreetExplorer can load that in the same way it currently loads the test files. The local workflow would be

  1. Run the tests, see that some failed. Currently it prints out "check the test diffs on geojson.io" or something, but that should link to localhost:8112/?test=blah
  2. Run StreetExplorer (or have it already running)
  3. Open StreetExplorer and browse the test diffs. StreetExplorer is just acting as a static client, loading the test data on demand.

from osm2streets.

dabreegster avatar dabreegster commented on May 25, 2024

Came up again today -- we could generate and serve a manifest of clean and dirty tests, to make it easier to inspect changes interactively

from osm2streets.

Related Issues (20)

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.