diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b347e12f..e1a42359 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,26 +14,22 @@ jobs: group: - Basics - Advanced - - GraphDynamics + - GraphDynamics1 + - GraphDynamics2 + - GraphDynamics3 version: - '1' steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - uses: actions/cache@v3 - 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@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + env: + JULIA_NUM_THREADS: 4 + GROUP: ${{ matrix.group }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index cde17110..3465aef6 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -16,6 +16,7 @@ jobs: - uses: julia-actions/setup-julia@latest with: version: '1' + - uses: julia-actions/cache@v2 - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy diff --git a/test/GraphDynamicsTests/runtests.jl b/test/GraphDynamicsTests/runtests.jl index 140ca507..0d957460 100644 --- a/test/GraphDynamicsTests/runtests.jl +++ b/test/GraphDynamicsTests/runtests.jl @@ -1,16 +1,27 @@ include(joinpath(@__DIR__(), "test_suite.jl")) -basic_smoketest() -neuron_and_neural_mass_comparison_tests() -basic_hh_network_tests() -stochastic_hh_network_tests() -ngei_test() -kuramato_test() -wta_tests() -dbs_circuit_components() -dbs_circuit() -discrete() -striatum_tests() -lif_exci_inh_tests() -decision_making_test() -ping_tests() +const GROUP = get(ENV, "GROUP", "All") +@show GROUP + +if GROUP == "All" || GROUP == "GraphDynamics1" + basic_smoketest() + neuron_and_neural_mass_comparison_tests() + basic_hh_network_tests() + stochastic_hh_network_tests() + ngei_test() +end + +if GROUP == "All" || GROUP == "GraphDynamics2" + kuramato_test() + wta_tests() + dbs_circuit_components() + dbs_circuit() + discrete() + striatum_tests() +end + +if GROUP == "All" || GROUP == "GraphDynamics3" + lif_exci_inh_tests() + decision_making_test() + ping_tests() +end diff --git a/test/bayesian_fitting.jl b/test/bayesian_fitting.jl deleted file mode 100644 index 2274d154..00000000 --- a/test/bayesian_fitting.jl +++ /dev/null @@ -1,69 +0,0 @@ -using Neuroblox, StochasticDiffEq ,ForwardDiff, LinearAlgebra, Test -using Turing -using Distributions -using Turing: Variational -using Random -using Tracker - -@named VdP = van_der_pol() - -prob_vdp = SDEProblem(VdP,[0.1,0.1],[0.0, 10.0],[]) -sol = solve(prob_vdp,EM(),dt=0.1) -time = sol.t -dt = time[2]-time[1] -x = sol[1,:] -y = sol[2,:] - -# turing model for fitting SDE without external noise -@model function fitvpEM(datax, datay) - θ ~ Gamma(0.1,10.0) - ϕ ~ Uniform(0,0.5) - dxh = datay[1:end-1] - dyh = θ .* (1 .- datax[1:end-1] .^ 2) .* datay[1:end-1] .- datax[1:end-1] - datax[2:end] ~ MvNormal(datax[1:end-1] .+ dxh * dt,ϕ^2*dt * I) - datay[2:end] ~ MvNormal(datay[1:end-1] .+ dyh * dt,ϕ^2*dt * I) -end - -Turing.setadbackend(:forwarddiff) -modelEM = fitvpEM(x,y) -chain = Turing.sample(modelEM,NUTS(0.65),200) -@test 0.5