SciCompMod / memilio

Modular spatio-temporal models for epidemic and pandemic simulations
https://scicompmod.github.io/memilio/
Apache License 2.0
52 stars 15 forks source link

Adjust memilio-generation for flow models and automatic differentiation #1019

Open MaxBetzDLR opened 2 months ago

MaxBetzDLR commented 2 months ago

Motivation / Current Behaviour

Introduction of flows in issue #511 and the added usage of templates to a lot of classes in issue #894 changed the behavior of the generation package. This results into wrongly generated code. As a temporary fix the reference test data was adjusted.

Additionally the test is slow due to recompiling the c++ code.

Enhancement description

Update memilio-generation to work with new code structure and patterns

Additional context

No response

Checklist

reneSchm commented 2 months ago

Recompilation could be circumvented by reusing the skbuild directory produced by setup.py. That is, instead of creating a temporary build directory and calling cmake on it from within the test itself, we can probably just set build_dir during the skbuild setup (e.g. via a config file). To keep the build/test split for the CI, we can probably use upload-/download-artifact actions to copy the _skbuild directory from build to test.