LCSB-BioCore / FBCModelTests.jl

Tests for constraint-based metabolic models
https://lcsb-biocore.github.io/FBCModelTests.jl/stable/
Apache License 2.0
6 stars 5 forks source link

use `Base.@kwdef` for setting up defaults for constant-holding structures #51

Closed exaexa closed 1 year ago

exaexa commented 2 years ago

instead of

mutable struct someconfig
  x :: Int
end

default_someconfig = someconfig(1234)

do

Base.@kwdef mutable struct someconfig
  x :: Int = 1234
end

...this also makes seriously nice constructors, so that users can do:

someconfig(some_particular_nondefault_variable=4312)
exaexa commented 1 year ago

@stelmo this is now done in FROGs, is there any plan to migrate the memote stuff?

stelmo commented 1 year ago

Not yet, but there should be! Let's keep this issue open until I have done that