diff --git a/Project.toml b/Project.toml index 6cf2864..d617816 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ProcessBasedModelling" uuid = "ca969041-2cf3-4b10-bc21-86f4417093eb" authors = ["Datseris "] -version = "1.2.2" +version = "1.2.3" [deps] ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" diff --git a/src/default.jl b/src/default.jl index c8f6b88..3df9754 100644 --- a/src/default.jl +++ b/src/default.jl @@ -11,6 +11,29 @@ If `warn`, throw a warning if a default process with same LHS variable already exists and will be overwritten. You can use [`default_processes`](@ref) to obtain the list of tracked default processes. + +!!! note "For developers" + If you are developing a new module/package that is based on ProcessBasedModelling.jl, + and within it you also register default processes, then enclose your + `register_default_process!` calls within the module's `__init__()` function. + For example: + ```julia + module MyProcesses + # ... + + function __init__() + register_default_process!.( + [ + process1, + process2, + # ... + ], + Ref(MyProcesses) + ) + end + + end # module + ``` """ function register_default_process!(process::Union{Process, Equation}, m::Module; warn = true) mdict = default_processes(m)