Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
slwu89 committed Aug 25, 2023
2 parents 46f5943 + 37247dd commit c8332c7
Show file tree
Hide file tree
Showing 77 changed files with 2,025 additions and 2,158 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/CompatHelper.yml

This file was deleted.

14 changes: 12 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ on:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
token: ${{ secrets.RELEASE_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/codecov.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/docs.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/integration-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types:
- reopened
- opened
- labeled

jobs:
add-to-project:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/julia_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Julia CI/CD

on:
schedule:
- cron: 0 0 * * *
push:
branches: ["main"]
tags: ["*"]
pull_request:
workflow_dispatch:
inputs:
action:
description: "Action"
required: true
default: "test"
type: choice
options:
- test
- release
version:
description: "Tag and release version:"
required: false

permissions:
actions: read
checks: read
contents: write
deployments: read
discussions: read
issues: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read

jobs:
CI:
if: github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.action == 'test')
uses: AlgebraicJulia/.github/.github/workflows/julia_ci.yml@main
secrets: inherit
CompatHelper:
if: github.event_name == 'schedule'
uses: AlgebraicJulia/.github/.github/workflows/julia_compat.yml@main
secrets: inherit
Release:
if: github.event_name == 'workflow_dispatch' && inputs.action == 'release' && inputs.version != ''
uses: AlgebraicJulia/.github/.github/workflows/julia_release.yml@main
secrets: inherit
19 changes: 0 additions & 19 deletions .github/workflows/rebase.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/test.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ deps/downloads/
deps/usr/
deps/src/

# Build artifacts for creating documentation generated by the Documenter package
docs/build/
docs/site/
docs/src/examples

# Editor/IDE specific ignores
.vscode/

Expand Down
32 changes: 17 additions & 15 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@ name = "AlgebraicPetri"
uuid = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b"
license = "MIT"
authors = ["Micah Halter <[email protected]>"]
version = "0.8.6"
version = "0.9.0"

[deps]
Catlab = "134e5e36-593f-5add-ad60-77f754baafbe"
GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb"
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[weakdeps]
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"

[extensions]
AlgebraicPetriCatalystExt = "Catalyst"
AlgebraicPetriModelingToolkitExt = "ModelingToolkit"
AlgebraicPetriOrdinaryDiffEqExt = "OrdinaryDiffEq"

[compat]
Catalyst = "^13.0.0"
Catlab = "^0.14.14"
Catalyst = "13"
Catlab = "0.15.1"
GeneralizedGenerated = "0.3"
LabelledArrays = "^1"
Requires = "^1"
StatsBase = "^0.33"
julia = "1.6"

[extras]
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
Petri = "4259d249-1051-49fa-8328-3f8ab9391c33"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
LabelledArrays = "1"
ModelingToolkit = "8"
OrdinaryDiffEq = "6"
julia = "1.9"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# AlgebraicPetri.jl

[![Documentation](https://github.com/AlgebraicJulia/AlgebraicPetri.jl/workflows/Documentation/badge.svg)](https://algebraicjulia.github.io/AlgebraicPetri.jl/dev/)
![Tests](https://github.com/AlgebraicJulia/AlgebraicPetri.jl/workflows/Tests/badge.svg)
[![Code Coverage](https://codecov.io/gh/AlgebraicJulia/AlgebraicPetri.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/AlgebraicJulia/AlgebraicPetri.jl)
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://AlgebraicJulia.github.io/AlgebraicPetri.jl/stable)
[![Development Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://AlgebraicJulia.github.io/AlgebraicPetri.jl/dev)
[![CI/CD](https://github.com/AlgebraicJulia/AlgebraicPetri.jl/actions/workflows/julia_ci.yml/badge.svg)](https://github.com/AlgebraicJulia/AlgebraicPetri.jl/actions/workflows/julia_ci.yml)
[![DOI](https://zenodo.org/badge/275202510.svg)](https://zenodo.org/badge/latestdoi/275202510)

`AlgebraicPetri.jl` is a Julia library for building Petri Net models
Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
src/generated/
3 changes: 2 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b"
Catlab = "134e5e36-593f-5add-ad60-77f754baafbe"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
DisplayAs = "0b91fe84-8a4c-11e9-3e1d-67c38462b6d6"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Petri = "4259d249-1051-49fa-8328-3f8ab9391c33"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
6 changes: 3 additions & 3 deletions examples/covid/_covid.jl → docs/literate/covid/_covid.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # [Multi-City COVID-19 Model](@id covid_example)
#
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/examples/covid/covid.ipynb)
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/generated/covid/covid.ipynb)

using AlgebraicPetri
using AlgebraicPetri.Epidemiology
Expand Down Expand Up @@ -61,7 +61,7 @@ seird_city = to_hom_expr(FreeBiproductCategory, seird_city)

display_wd(seird_city)
# -
Graph(decoration(F(seird_city)))
to_graphviz(decoration(F(seird_city)))

# create a multi-city SEIRD models

Expand All @@ -72,7 +72,7 @@ pc_seird_3 = F(seird_3)
p_seird_3 = decoration(pc_seird_3)
display_wd(seird_3)
# -
Graph(p_seird_3)
to_graphviz(p_seird_3)

# Define time frame and initial parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
include("epidemiology.jl")

using OrdinaryDiffEq
using Catlab.Graphics
using Catlab.Graphics.Graphviz: run_graphviz

# +
Expand Down Expand Up @@ -41,7 +42,7 @@ end
# -

save_wd(sir, "sir.svg")
save_graph(Graph(p_sir), "sir_graph.svg")
save_graph(to_graphviz(p_sir), "sir_graph.svg")

# define initial states and transition rates
u0 = [10.0, 1, 0]
Expand All @@ -53,7 +54,7 @@ sol = OrdinaryDiffEq.solve(prob,Tsit5())
splot(sol, "sir_soln.svg")

save_wd(seir, "seir.svg")
save_graph(Graph(p_seir), "seir_graph.svg")
save_graph(to_graphviz(p_seir), "seir_graph.svg")

# define initial states and transition rates
u0 = [10.0, 1, 0, 0]
Expand All @@ -65,7 +66,7 @@ sol = OrdinaryDiffEq.solve(prob,Tsit5())
splot(sol, "seir_soln.svg")

save_wd(seird, "seird.svg")
save_graph(Graph(p_seird), "seird_graph.svg")
save_graph(to_graphviz(p_seird), "seird_graph.svg")

# define initial states and transition rates
u0 = [10.0, 1, 0, 0, 0]
Expand All @@ -78,16 +79,16 @@ splot(sol, "seird_soln.svg")

include("covid.jl")

[save_graph(Graph(Petri.Model(decoration(p))), pname) for (p,pname) in [(spontaneous_petri, "spont.svg"),
[save_graph(to_graphviz(Petri.Model(decoration(p))), pname) for (p,pname) in [(spontaneous_petri, "spont.svg"),
(transmission_petri, "transmission.svg"),
(exposure_petri, "exposure.svg"),
(travel_petri, "travel.svg")]]

save_wd(seird_city, "seird_city.svg")
save_graph(Graph(Petri.Model(decoration(F(seird_city)))), "seird_graph.svg")
save_graph(to_graphviz(Petri.Model(decoration(F(seird_city)))), "seird_graph.svg")

save_wd(seird_3, "seird_3.svg")
save_graph(Graph(p_seird_3), "seird_3_graph.svg")
save_graph(to_graphviz(p_seird_3), "seird_3_graph.svg")

pltdims = [4,9, 14]
# Define time frame, 3 months
Expand Down
Loading

0 comments on commit c8332c7

Please sign in to comment.