acteng / overline

Aggregation of overlapping lines and values to build route networks
4 stars 0 forks source link

Python bindings? #4

Open Robinlovelace opened 1 year ago

Robinlovelace commented 1 year ago

Good time for me to have a play with this, or too early days in terms of variable API?

dabreegster commented 1 year ago

You could start trying out pyo3 if you want. Would it be easier if I merged the current PR and left all the outstanding tasks as followup? It's in some halfway state right now and gives incorrect results, but the basic CLI is set up at least.

And what's the plan on bindings? The simple answer is we ship a binary and call through the CLI, but that's clunkier installation-wise?

Robinlovelace commented 1 year ago

Would it be easier if I merged the current PR and left all the outstanding tasks as followup?

:+1: for sure. Good fresh thing to have a play with. Probably best use of my time: write tests!

Robinlovelace commented 1 year ago

In terms of how to do bindings well, https://github.com/pola-rs/polars is the best example I know of.

dabreegster commented 1 year ago

Agreed, tests would be helpful! The unit test framework so far is not wired up to check aggregated properties yet, but I could do that next week. In the meantime, just input and expected output GeoJSON files. They could come from the R implementation or anywhere. And if you open https://github.com/actenglabs/overline/blob/master/rust/viewer.html in Firefox (as a local file, not through github), you can visualize an output geojson file.