diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..ff6499d68 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9dd5ab6b7..b706a4fd0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,12 +26,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test_v2-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 diff --git a/.github/workflows/CI_ecosystem.yml b/.github/workflows/CI_ecosystem.yml index 98a79eb0b..88159fd00 100644 --- a/.github/workflows/CI_ecosystem.yml +++ b/.github/workflows/CI_ecosystem.yml @@ -32,12 +32,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test_extended-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 diff --git a/.github/workflows/CI_extended.yml b/.github/workflows/CI_extended.yml index 4cc24d90d..c3e7561a2 100644 --- a/.github/workflows/CI_extended.yml +++ b/.github/workflows/CI_extended.yml @@ -32,12 +32,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test_extended-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e7dacab73..4164c3683 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -18,10 +18,9 @@ jobs: - uses: julia-actions/setup-julia@latest with: version: '1' - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key - run: julia --color=yes --project=docs/ docs/make.jl + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/src/additional_functions/helper.jl b/src/additional_functions/helper.jl index 26d079b00..91095e071 100644 --- a/src/additional_functions/helper.jl +++ b/src/additional_functions/helper.jl @@ -114,11 +114,11 @@ function sparse_outer_mul!(C, A, B::Vector, ind) #computes A*S*B -> C, where ind end function cov_and_mean(rows; corrected = false) - data = permutedims(hcat(rows...)) + data = transpose(reduce(hcat, rows)) size(rows, 1) > 1 ? obs_cov = Statistics.cov(data; corrected = corrected) : obs_cov = reshape([0.0],1,1) - obs_mean = vcat(Statistics.mean(data, dims = 1)...) + obs_mean = vec(Statistics.mean(data, dims = 1)) return obs_cov, obs_mean end diff --git a/src/additional_functions/parameters.jl b/src/additional_functions/parameters.jl index b381e1c32..13aa1cd41 100644 --- a/src/additional_functions/parameters.jl +++ b/src/additional_functions/parameters.jl @@ -103,7 +103,7 @@ function get_matrix_derivative(M_indices, parameters, n_long) ones(length(M_indices[i])), n_long) for i in 1:length(parameters)] - ∇M = hcat(∇M...) + ∇M = reduce(hcat, ∇M) return ∇M diff --git a/test/examples/multigroup/multigroup.jl b/test/examples/multigroup/multigroup.jl index a86371caa..5ef6bd8c6 100644 --- a/test/examples/multigroup/multigroup.jl +++ b/test/examples/multigroup/multigroup.jl @@ -21,25 +21,24 @@ dat_miss_g2 = dat_missing[dat_missing.school .== "Grant-White", :] ############################################################################################ x = Symbol.(:x, 1:36) -#x = [x...] F = zeros(9, 12) F[diagind(F)] .= 1.0 A = Matrix{Any}(zeros(12, 12)) A[1, 10] = 1.0; A[4, 11] = 1.0; A[7, 12] = 1.0 -A[2:3, 10] .= [x...][16:17]; A[5:6, 11] .= [x...][18:19]; A[8:9, 12] .= [x...][20:21]; +A[2:3, 10] .= x[16:17]; A[5:6, 11] .= x[18:19]; A[8:9, 12] .= x[20:21]; # group 1 S1 = Matrix{Any}(zeros(12, 12)) -S1[diagind(S1)] .= [x...][1:12] +S1[diagind(S1)] .= x[1:12] S1[10, 11] = x[13]; S1[11, 10] = x[13] S1[10, 12] = x[14]; S1[12, 10] = x[14] S1[12, 11] = x[15]; S1[11, 12] = x[15] # group 2 S2 = Matrix{Any}(zeros(12, 12)) -S2[diagind(S2)] .= [x...][22:33] +S2[diagind(S2)] .= x[22:33] S2[10, 11] = x[34]; S2[11, 10] = x[34] S2[10, 12] = x[35]; S2[12, 10] = x[35] S2[12, 11] = x[36]; S2[11, 12] = x[36]