cellml / libcellml

Repository for libCellML development.
https://libcellml.org
Apache License 2.0
17 stars 21 forks source link

Generator: refine the generated code for algebraic models #901

Closed agarny closed 3 years ago

agarny commented 3 years ago

Fixes #899.

hsorby commented 3 years ago

This looks good to me but I would rather have the scripts in a separate repository. The main reason being for use by the CI.

agarny commented 3 years ago

This looks good to me but I would rather have the scripts in a separate repository. The main reason being for use by the CI.

FWIW, I am not yet done with this PR. Otherwise, not sure how having the scripts in a separate repository would help, especially the CI...? Not to mention that I am currently working on an automatic way of updating the SHA-1 values for the generator profiles. (I am nearly done with that.)

agarny commented 3 years ago

@hsorby & @nickerso: this is now ready for re-reviewing.

I have addressed the bug @nickerso spotted on Tuesday. The original implementation just didn't account for the fact that a variable-based constant could be requalified as an algebraic variable if it was to depend on some external variables. Oopsie!

I have also added some scripts to update all of our files and SHA-1 values when we want to change the version of libCellML or of the code generator.