Skip to content

Commit

Permalink
Merge pull request #89 from SciML/dw/subpackages
Browse files Browse the repository at this point in the history
Split DiffEqProblemLibrary into subpackages
  • Loading branch information
ChrisRackauckas authored Aug 20, 2022
2 parents 67f3466 + 5052f5e commit 2672fbd
Show file tree
Hide file tree
Showing 39 changed files with 348 additions and 197 deletions.
41 changes: 26 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,50 @@
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
group:
- Core
pkg:
- DiffEqProblemLibrary
- DAEProblemLibrary
- DDEProblemLibrary
- JumpProblemLibrary
- ODEProblemLibrary
- SDEProblemLibrary
version:
- '1'
- '1.6'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
with:
project: "${{ matrix.pkg == 'DiffEqProblemLibrary' && '.' || format('lib/{0}', matrix.pkg) }}"
- uses: julia-actions/julia-runtest@v1
with:
project: "${{ matrix.pkg == 'DiffEqProblemLibrary' && '.' || format('lib/{0}', matrix.pkg) }}"
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
directories: "${{ matrix.pkg == 'DiffEqProblemLibrary' && 'src' || format('lib/{0}/src', matrix.pkg) }}"
- uses: codecov/codecov-action@v3
with:
files: lcov.info
61 changes: 43 additions & 18 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,51 @@
name: CompatHelper

on:
schedule:
- cron: '00 * * * *'
issues:
types: [opened, reopened]

- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1]
julia-arch: [x86]
os: [ubuntu-latest]
CompatHelper:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
version: '1'
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
subdirs = [""]
for f in readdir("lib"; join=true)
if isdir(f)
push!(subdirs, f)
end
end
@info "CompatHelper directories" subdirs
CompatHelper.main(; subdirs)
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
6 changes: 6 additions & 0 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
tags: '*'
pull_request:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
/Manifest.toml
Manifest.toml
31 changes: 11 additions & 20 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
name = "DiffEqProblemLibrary"
uuid = "a077e3f3-b75c-5d7f-a0c6-6bc4c8ec64a9"
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>"]
version = "4.17.0"
version = "5.0.0"

[deps]
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqOperators = "9fdde737-9c7f-55bf-ade8-46b3f136cc48"
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8"
DDEProblemLibrary = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800"
JumpProblemLibrary = "faf0f6d7-8cee-47cb-b27c-1eb80cef534e"
ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5"
SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e"

[compat]
Catalyst = "11, 12"
DiffEqBase = "6"
DiffEqOperators = "4"
Latexify = "0.15"
ModelingToolkit = "7,8"
DAEProblemLibrary = "0.1"
DDEProblemLibrary = "0.1"
JumpProblemLibrary = "0.1"
ODEProblemLibrary = "0.1"
SDEProblemLibrary = "0.1"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
22 changes: 22 additions & 0 deletions lib/DAEProblemLibrary/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2022 SciML
Copyright (c) 2016 Chris Rackauckas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions lib/DAEProblemLibrary/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name = "DAEProblemLibrary"
uuid = "dfb8ca35-80a1-48ba-a605-84916a45b4f8"
version = "0.1.0"

[deps]
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"

[compat]
DiffEqBase = "6"
julia = "1.6"
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module DAEProblemLibrary

using DiffEqBase, Markdown

#DAE Example Problems
Expand Down Expand Up @@ -31,3 +33,5 @@ Hairer Norsett Wanner Solving Ordinary Differential Equations I - Nonstiff Probl
Usually solved on ``[0,1e11]``
"""
prob_dae_resrob = DAEProblem(f, du0, u0, (0.0, 100000.0))

end # module
2 changes: 2 additions & 0 deletions lib/DAEProblemLibrary/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The test is simply that all of the examples build!
using DAEProblemLibrary
22 changes: 22 additions & 0 deletions lib/DDEProblemLibrary/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2022 SciML
Copyright (c) 2016 Chris Rackauckas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions lib/DDEProblemLibrary/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = "DDEProblemLibrary"
uuid = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800"
version = "0.1.0"

[deps]
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"

[compat]
DiffEqBase = "6"
julia = "1.6"
46 changes: 46 additions & 0 deletions lib/DDEProblemLibrary/src/DDEProblemLibrary.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module DDEProblemLibrary

using DiffEqBase
# DDE Example Problems

# examples with constant delays
export
# DDEs with 1 constant delay
prob_dde_1delay_ip, prob_dde_1delay_oop, prob_dde_1delay_scalar,
prob_dde_1delay_long_ip, prob_dde_1delay_long_oop, prob_dde_1delay_long_scalar,
# DDEs with 2 constant delays
prob_dde_2delays_ip, prob_dde_2delays_oop, prob_dde_2delays_scalar,
prob_dde_2delays_long_ip, prob_dde_2delays_long_oop, prob_dde_2delays_long_scalar

# DDETST problems
export
# DDEs with time dependent delays
prob_dde_DDETST_A1, prob_dde_DDETST_A2,
# DDEs with vanishing time dependent delays
prob_dde_DDETST_B1, prob_dde_DDETST_B2,
# DDEs with state dependent delays
prob_dde_DDETST_C1, prob_dde_DDETST_C2, prob_dde_DDETST_C3, prob_dde_DDETST_C4,
# DDEs with vanishing state dependent delays
prob_dde_DDETST_D1, prob_dde_DDETST_D2,
# neutral DDEs with time dependent delays
prob_dde_DDETST_E1, prob_dde_DDETST_E2,
# neutral DDEs with vanishing time dependent delays
prob_dde_DDETST_F1, prob_dde_DDETST_F2, prob_dde_DDETST_F3, prob_dde_DDETST_F4,
prob_dde_DDETST_F5,
# neutral DDEs with state dependent delays
prob_dde_DDETST_G1, prob_dde_DDETST_G2,
# neutral DDEs with vanishing state dependent delays
prob_dde_DDETST_H1, prob_dde_DDETST_H2, prob_dde_DDETST_H3, prob_dde_DDETST_H4

# RADAR5 problems
export prob_dde_RADAR5_oregonator, prob_dde_RADAR5_robertson, prob_dde_RADAR5_waltman

# QS exaple
export prob_dde_qs

include("constant_delays.jl")
include("ddetst.jl")
include("qs.jl")
include("radar5.jl")

end # module
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions lib/DDEProblemLibrary/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The test is simply that all of the examples build!
using DDEProblemLibrary
22 changes: 22 additions & 0 deletions lib/JumpProblemLibrary/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2022 SciML
Copyright (c) 2016 Chris Rackauckas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions lib/JumpProblemLibrary/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name = "JumpProblemLibrary"
uuid = "faf0f6d7-8cee-47cb-b27c-1eb80cef534e"
version = "0.1.0"

[deps]
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"

[compat]
Catalyst = "11, 12"
DiffEqBase = "6"
julia = "1.6"
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module JumpProblemLibrary

using DiffEqBase, Catalyst
# Jump Example Problems
export prob_jump_dnarepressor, prob_jump_constproduct, prob_jump_nonlinrxs,
Expand Down Expand Up @@ -260,3 +262,5 @@ tf = 10.0
"""
prob_jump_diffnetwork = JumpProblemNetwork(getDiffNetwork, params, tf, getDiffu0, nothing,
nothing)

end # module
2 changes: 2 additions & 0 deletions lib/JumpProblemLibrary/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The test is simply that all of the examples build!
using JumpProblemLibrary
Loading

0 comments on commit 2672fbd

Please sign in to comment.