pywr / pywr-next

An experimental repository exploring ideas for a major revision to Pywr using Rust as a backend.
6 stars 4 forks source link

feat(python): Add conversion helper functions to Python extension. #231

Closed jetuk closed 1 month ago

jetuk commented 2 months ago

New helper functions for converting from Pywr v1.x to v2.x JSON strings added to the Python extension. Includes a new wrapper around Metric.

jetuk commented 2 months ago

I should just have to run maturin develop to install it into a venv right?

I think so? I guess I should add some Python tests for these functions.

Batch21 commented 2 months ago

I should just have to run maturin develop to install it into a venv right?

I think so? I guess I should add some Python tests for these functions.

deleted the target directory and recreated the venv and it worked.

Probably worth adding some more extensive python tests at some point but I tested both functions with some of the test models and they worked fine for me.