From ff63fc75b024f5ef0c279ed39b56f74fcfe2def1 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Tue, 13 Feb 2024 01:11:33 +0100 Subject: [PATCH] Fix compat lower bounds (#26) * Automated commit made by MassInstallAction.jl * Update .github/workflows/DowngradeCI.yml * Use correct base package * Load Statistics package * Update lower bounds * Increment patch number * Add downgrade job to CI * Remove DowngradeCI workflow --- .github/workflows/CI.yml | 14 +++++++++++++- Project.toml | 30 +++++++++++++++--------------- src/utils.jl | 2 +- test/utils.jl | 1 + 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4c2bb6e..5c97971 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: ${{ matrix.downgrade && 'Downgrade / ' || '' }}Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -25,6 +25,13 @@ jobs: - ubuntu-latest arch: - x64 + downgrade: + - false + include: + - version: '1' + os: ubuntu-latest + arch: x64 + downgrade: true steps: - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 @@ -45,6 +52,11 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v1 + - uses: cjdoris/julia-downgrade-compat-action@v1 + with: + skip: LinearAlgebra,Markdown,Printf,Random,Statistics + if: ${{ matrix.downgrade }} + name: Downgrade dependencies to oldest supported versions - uses: julia-actions/julia-buildpkg@v1 - name: Build Conda run: | diff --git a/Project.toml b/Project.toml index a5bacbf..3c8a1a1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PosteriorStats" uuid = "7f36be82-ad55-44ba-a5c0-b8b5480d7aa5" authors = ["Seth Axen and contributors"] -version = "0.2.0" +version = "0.2.1" [deps] Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" @@ -28,31 +28,31 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] ArviZExampleData = "0.1.5" -Compat = "3.36.0, 4" +Compat = "4.2.0" DataInterpolations = "4" -Distributions = "0.21, 0.22, 0.23, 0.24, 0.25" +Distributions = "0.25.57" DocStringExtensions = "0.8, 0.9" -FiniteDifferences = "0.12" -GLM = "1" -IteratorInterfaceExtensions = "0.1.1, 1" +FiniteDifferences = "0.12.17" +GLM = "1.8.0" +IteratorInterfaceExtensions = "1" LinearAlgebra = "1.6" -LogExpFunctions = "0.2.0, 0.3" +LogExpFunctions = "0.3.3" MCMCDiagnosticTools = "0.3.4" Markdown = "1.6" -OffsetArrays = "1" -Optim = "1" -OrderedCollections = "1" +OffsetArrays = "1.1.3" +Optim = "1.7.2" +OrderedCollections = "1.3.0" PSIS = "0.9.1" -PrettyTables = "2.1, 2.2" +PrettyTables = "2.1" Printf = "1.6" -RCall = "0.13" +RCall = "0.13.11" Random = "1.6" Setfield = "1" Statistics = "1.6" -StatsBase = "0.32, 0.33, 0.34" +StatsBase = "0.33.5, 0.34" TableOperations = "1" -TableTraits = "0.4, 1" -Tables = "1" +TableTraits = "1" +Tables = "1.9" julia = "1.6" [extras] diff --git a/src/utils.jl b/src/utils.jl index 5ede522..fb506be 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -140,7 +140,7 @@ end function _sum_and_se(x; dims=:) s = sum(x; dims) n = dims isa Colon ? length(x) : prod(Base.Fix1(size, x), dims) - se = StatsBase.std(x; dims) * sqrt(oftype(one(eltype(s)), n)) + se = Statistics.std(x; dims) * sqrt(oftype(one(eltype(s)), n)) return s, se end _sum_and_se(x::Number; kwargs...) = (x, oftype(float(x), NaN)) diff --git a/test/utils.jl b/test/utils.jl index d0c08ea..4d6d3d2 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -2,6 +2,7 @@ using OffsetArrays using PosteriorStats using Random using StatsBase +using Statistics using Test @testset "utils" begin