This is a big shot attempting to address #114, #122, #84, #73, #74, #54 and #126 at once, while not refactoring the package internals yet so we can settle on a stable API and release the library/paper sooner.
[x] Move all current implementation to an Internals submodule, so that none of it is exposed to user anymore. (:scream:)
[x] Craft a dedicated framework making sense of the safe concepts of System, Component, Blueprint, Method (documentation here).
[x] Implement.
[x] Test.
[x] Document.
[x] Write a fresh API to re-expose existing internals, but via the above framework :
[x] Expose const Model = Framework.System{Internals.ModelParameters}.
[x] Sketch Foodweb component.
[x] Sketch FunctionalResponse components.
[x] Sketch ProducerGrowth components.
[x] Sketch NonTrophicLayer components.
[x] Sketch simulate method.
[x] Integrate biorates-related features into the above.
[x] Integrate allometry/temperature-related features into the above.
Integrate post-simulation processing features into the above. (see #137)
[x] Extract/adjust existing documentation from the internals to the main module. (#135)
[x] Make the use cases work again. (#136)
Make the doctests work again. (see #140)
I expect this is a good opportunity to design/stabilize the eventual API we want without bothering yet with any refactoring of the Internals. To push this PR forward, just focus on how we would like the package to be used :)
Example fresh, configurable basic pipeline with the "components" approach:
m = Model()
m += Foodweb([:a => :b, :b => :c])
m += BodyMass(1)
m += MetabolicClass(:all_invertebrates)
m += BioenergeticResponse(; w = :homogeneous, half_saturation_density = 0.5)
m += LogisticGrowth(; r = 1, K = 1)
m += Metabolism(:Miele2019)
m += Mortality(0)
B0 = 0.5
sol = simulate(m, B0)
This is a big shot attempting to address #114, #122, #84, #73, #74, #54 and #126 at once, while not refactoring the package internals yet so we can settle on a stable API and release the library/paper sooner.
[x] Move all current implementation to an
Internals
submodule, so that none of it is exposed to user anymore. (:scream:)[x] Craft a dedicated framework making sense of the safe concepts of
System
,Component
,Blueprint
,Method
(documentation here).[x] Write a fresh API to re-expose existing internals, but via the above framework :
const Model = Framework.System{Internals.ModelParameters}
.Foodweb
component.FunctionalResponse
components.ProducerGrowth
components.NonTrophicLayer
components.simulate
method.Integrate post-simulation processing features into the above.(see #137)[x] Extract/adjust existing documentation from the internals to the main module. (#135)
[x] Make the use cases work again. (#136)
Make the doctests work again.(see #140)I expect this is a good opportunity to design/stabilize the eventual API we want without bothering yet with any refactoring of the
Internals
. To push this PR forward, just focus on how we would like the package to be used :)Example fresh, configurable basic pipeline with the "components" approach:
other examples here