Catalyst.jl icon indicating copy to clipboard operation
Catalyst.jl copied to clipboard

Refactor "srcd/sl.jl" file

Open TorkelE opened this issue 1 year ago • 0 comments

Also does the "src/expression_utils.jl" file, as that primarily support the dsl file (the other relevant file is the chemistry one).

Primarily four types of changes:

  • Added comment to code which did not have (primarily older code).
  • Rewrite some old code (a lot of stuff in the dsl file is stuff I wrote over 6 years ago, which simply can be rewritten better now).
  • Do some organisations for where the options are handled in the main function. Been meaning to do this pretty much since I introduced them, and now when we have all *for the foreseeable future) it seemed like a good time to do it. Now it should also be easier to see where to add new options in the future.
  • Rewrite so that the @reaction_network and @network_component macros reuse minimal amount of code (where as previously it the second was basically ctrl+copied versions of the first.

I also add some tests of all the various ways to create models via the DSL, mostly stuff that was not tested before.

TorkelE avatar Jul 13 '24 22:07 TorkelE