Comments (5)
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.
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.
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.
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 actionls 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
- 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
- Run StreetExplorer (or have it already running)
- Open StreetExplorer and browse the test diffs. StreetExplorer is just acting as a static client, loading the test data on demand.
from osm2streets.
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)
- is_sidepath proposal review HOT 2
- Stop plumbing osm_tags through HOT 3
- Simplify the early stages of creating a `StreetNetwork` from OSM data HOT 6
- Simpler osm2lanes editor HOT 6
- Intersection geometry refactor HOT 15
- Determine road geometry before path geometry HOT 4
- `GenerateIntersectionGeometry` makes existing intersections larger HOT 2
- Versioning HOT 2
- Experiment with curb data
- Prioritization exercise: make one area "perfect" HOT 4
- Propagating changes HOT 4
- Switch to Vite + NPM? HOT 1
- Remove experimental, keep graphviz
- Draw turn restrictions
- Stop lines HOT 5
- Some tests in AU have the wrong driving side HOT 3
- Investigate TopoJSON and/or MapShaper
- placement position names (right_of:1) should ignore sidewalks HOT 1
- Make StreetNetwork implement Send
- Degenerate geometry breaks at sharp angles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm2streets.