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: add pywr-schema-macro crate #136

Closed Batch21 closed 4 months ago

Batch21 commented 4 months ago

This contains a derive macro that implements parameters and parameters_mut methods for nodes.

Batch21 commented 4 months ago

@jetuk I was able to copy over your code from the v1 schema with little modification. I've left in a TODO for parsing more complex node attribute types, such as factors and links.

jetuk commented 4 months ago

This looks good enough to unblock #99 .

It will need some more refinement to handle the other fields types, but that can be part of a wider improvement.