a-b-street / osm2lanes

A common library and set of test cases for transforming OSM tags to lane specifications
https://a-b-street.github.io/osm2lanes/
Apache License 2.0
33 stars 2 forks source link

Require serde in tests.rs #251

Closed dabreegster closed 1 year ago

dabreegster commented 1 year ago

The cfg_attr stuff is less readable. Every caller of the tests (benchmark, running tests, the web app) needs to deserialize the YAML; tests.rs is meaningless without serde

github-actions[bot] commented 1 year ago

Benchmark for 38d24c8

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | tests/224637155 | 5.5±0.04µs | **5.4±0.04µs** | **-1.82%** | | tests/380103730 Japanese Expressway | **7.2±0.00µs** | 7.3±0.09µs | **+1.39%** | | tests/389654080 | 8.9±0.01µs | 8.9±0.01µs | 0.00% | | tests/49207928 cycleway:BACKWARD=lane | 6.6±0.01µs | 6.6±0.02µs | 0.00% | | tests/8591383 a bidirectional cycleway, oneway:bicycle | 7.5±0.03µs | **7.4±0.02µs** | **-1.33%** | | tests/bus:lanes=designated\| | 6.9±0.03µs | **6.8±0.08µs** | **-1.45%** | | tests/busway=lane | 6.2±0.03µs | **6.1±0.06µs** | **-1.61%** | | tests/cycleway=lane | 6.4±0.00µs | 6.4±0.06µs | 0.00% | | tests/cycleway=opposite oneway=yes oneway:bicycle=no | 6.0±0.03µs | 6.0±0.06µs | 0.00% | | tests/cycleway=opposite_track oneway=yes, deprecated | 7.1±0.06µs | **6.9±0.06µs** | **-2.82%** | | tests/sidewalk:right=yes | 5.6±0.03µs | **5.5±0.04µs** | **-1.79%** | | tests/sidewalk=both | 5.8±0.02µs | **5.7±0.07µs** | **-1.72%** |
dabreegster commented 1 year ago

Neat to see your opinions on this rust-ecosystem type stuff.

Simpler is better!