Skip to content

Commit

Permalink
Merge pull request #129 from AlgebraicJulia/reexport
Browse files Browse the repository at this point in the history
Reexport top-level modules for user's convenience
  • Loading branch information
epatters authored Jul 28, 2023
2 parents abfb3ec + eb4a626 commit b2a9fac
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 27 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LinearMaps = "7a12625a-238d-50fd-b39a-03d52299707e"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[weakdeps]
Expand All @@ -35,5 +36,6 @@ OrdinaryDiffEq = "^5.49.0, 6"
Plots = "^1.10.0"
RecipesBase = "1"
RecursiveArrayTools = "^2.10.0"
Reexport = "1"
StaticArrays = "0.12, 1.0"
julia = "1.9"
9 changes: 1 addition & 8 deletions examples/CPG_examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
#
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/examples/CPG_examples.ipynb)

using AlgebraicDynamics.DWDDynam
using AlgebraicDynamics.CPortGraphDynam
using AlgebraicDynamics
using AlgebraicDynamics.CPortGraphDynam: draw, barbell, gridpath, grid, meshpath

using Catlab
using Catlab.WiringDiagrams
using Catlab.WiringDiagrams.CPortGraphs
using Catlab.Theories
using Catlab.CategoricalAlgebra

using OrdinaryDiffEq
using Plots, Plots.PlotMeasures

using PrettyTables

# ## SIR Epidemiology Model
Expand Down
6 changes: 1 addition & 5 deletions examples/Cyber-Physical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
# 2. Categorical Semantics of Cyber-Physical Systems Theory - [https://doi.org/10.1145/3461669](https://doi.org/10.1145/3461669)

using AlgebraicDynamics
using AlgebraicDynamics.DWDDynam

using Catlab.WiringDiagrams
using Catlab.Graphics
using Catlab.Graphics.Graphviz
using Catlab

using LabelledArrays
using DifferentialEquations
Expand Down
10 changes: 2 additions & 8 deletions examples/Ecosystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/examples/Ecosystem.ipynb)

using AlgebraicDynamics
using AlgebraicDynamics.DWDDynam
using AlgebraicDynamics.UWDDynam

using Catlab.CategoricalAlgebra
using Catlab.WiringDiagrams
using Catlab.Graphics
using Catlab.Programs
using Catlab

using LabelledArrays
using OrdinaryDiffEq
Expand Down Expand Up @@ -266,4 +260,4 @@ sol = solve(prob, Tsit5())
plot(sol, ecosystem,
lw=2, title = "Decoupled Ecosystem",
xlabel = "time", ylabel = "population size"
)
)
2 changes: 1 addition & 1 deletion examples/Lotka-Volterra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# However, there are not two independent rabbit populations --- one that grows and one that gets eaten by foxes. Likewise, there are not two independent fox populations --- one that declines and one that feasts on rabbits. To capture these interactions between the trio of resource sharers, we compose them by identifying the exposed rabbit populations and identifying the exposed fox populations.

using AlgebraicDynamics
using AlgebraicDynamics.UWDDynam
using Catlab.WiringDiagrams, Catlab.Programs

using LabelledArrays
using OrdinaryDiffEq, Plots, Plots.PlotMeasures

Expand Down
8 changes: 4 additions & 4 deletions examples/Ross-Macdonald.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Authors: Sean L. Wu and Sophie Libkind

using AlgebraicDynamics.DWDDynam
using Catlab.WiringDiagrams
using AlgebraicDynamics
using Catlab.WiringDiagrams, Catlab.Graphics

using LabelledArrays

using Catlab.Graphics
using DelayDiffEq, DifferentialEquations
using Plots

Expand Down Expand Up @@ -279,4 +279,4 @@ plot!(sol.t, fill(Z̄, N), label = "infectious mosquito equilibrium", ls = :dash
# to intervention, incorporating additional biological realism can produce more plausible results regarding
# the expected time for interventions to affect the system. In any case, such simple models are best used as
# tools to explain basic concepts in malaria epidemiology rather than descriptions of real systems, which are
# likely far from equilibrium and affected by weather, climate, policy, and other external forces.
# likely far from equilibrium and affected by weather, climate, policy, and other external forces.
6 changes: 5 additions & 1 deletion src/AlgebraicDynamics.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
module AlgebraicDynamics

using Catlab
using Reexport

include("uwd_dynam.jl")
include("dwd_dynam.jl")
include("cpg_dynam.jl")

@reexport using .DWDDynam
@reexport using .UWDDynam
@reexport using .CPortGraphDynam

end # module

0 comments on commit b2a9fac

Please sign in to comment.