Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/test-algebraicepimodels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: AlgebraicEpiModels smoke test

on:
pull_request:
paths:
- AlgebraicEpiModels/**
- AlgebraicEpiMech/**
- ConfigurableEpi/**
- .github/workflows/test-algebraicepimodels.yaml
push:
branches: [master, main]
paths:
- AlgebraicEpiModels/**
- AlgebraicEpiMech/**
- ConfigurableEpi/**
- .github/workflows/test-algebraicepimodels.yaml

permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
smoke-test:
name: Julia 1.13
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1.13'
- uses: julia-actions/cache@v3
- name: Install and load the wrapper package
env:
JULIA_PKG_PRECOMPILE_AUTO: '0'
shell: julia --color=yes {0}
run: |
using Pkg

Pkg.activate(mktempdir())
Pkg.add(url = ENV["GITHUB_WORKSPACE"], subdir = "AlgebraicEpiModels")
Comment thread
SamuelBrand1 marked this conversation as resolved.

using AlgebraicEpiModels

wrapper = AlgebraicEpiModels
mech = wrapper.AlgebraicEpiMech
configurable = wrapper.ConfigurableEpi
mech_exports = Set(names(mech))
configurable_exports = Set(names(configurable))

conflicts = filter(intersect(mech_exports, configurable_exports)) do name
getproperty(mech, name) !== getproperty(configurable, name)
end
@assert isempty(conflicts) "Conflicting exports: $(sort!(collect(conflicts)))"

for name in union(mech_exports, configurable_exports)
@assert isdefined(wrapper, name) "Missing re-export: $name"
Comment thread
SamuelBrand1 marked this conversation as resolved.
Outdated
source = name in mech_exports ? mech : configurable
@assert getproperty(wrapper, name) === getproperty(source, name)
end
19 changes: 19 additions & 0 deletions AlgebraicEpiModels/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = "AlgebraicEpiModels"
uuid = "b621e4e5-594b-4e55-ae0f-5d115ed6976b"
version = "0.1.0"
authors = ["Samuel Brand <48288458+SamuelBrand1@users.noreply.github.com>"]

[deps]
AlgebraicEpiMech = "a6e39d6b-8b2d-49f3-aca0-f4154643f040"
ConfigurableEpi = "805b86f7-2d53-4db0-a930-efd5b25deb53"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[sources]
AlgebraicEpiMech = {url = "https://github.com/CDCgov/AlgebraicEpiModels", subdir = "AlgebraicEpiMech"}
ConfigurableEpi = {url = "https://github.com/CDCgov/AlgebraicEpiModels", subdir = "ConfigurableEpi"}

[compat]
AlgebraicEpiMech = "0.1"
ConfigurableEpi = "0.1"
Reexport = "1.2"
julia = "1.11"
Comment thread
SamuelBrand1 marked this conversation as resolved.
9 changes: 9 additions & 0 deletions AlgebraicEpiModels/src/AlgebraicEpiModels.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
Convenience module for re-exporting AlgebraicEpiMech and ConfigurableEpi.
"""
module AlgebraicEpiModels
using Reexport
@reexport using AlgebraicEpiMech
@reexport using ConfigurableEpi

end
10 changes: 10 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ Pkg.add(url = "https://github.com/CDCgov/AlgebraicEpiModels", subdir = "Algebrai
Pkg.add(url = "https://github.com/CDCgov/AlgebraicEpiModels", subdir = "ConfigurableEpi")
```

On Julia 1.13 or later, you can instead install only the convenience wrapper:

```julia
using Pkg
Pkg.add(url = "https://github.com/CDCgov/AlgebraicEpiModels", subdir = "AlgebraicEpiModels")
```

This installs both underlying packages and re-exports their public APIs.
Installing only the wrapper relies on recursive package sources, which are a Julia 1.13+ feature.

Drawing Petri nets with `to_graphviz` needs the [Graphviz](https://graphviz.org/download/) `dot` executable on the `PATH`.

To work on the packages themselves, clone the repository and instantiate the package you are working on; each package's test environment is a workspace project:
Expand Down
Loading