Skip to content

Commit

Permalink
Fix compat lower bounds (#26)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sethaxen authored Feb 13, 2024
1 parent d04d836 commit ff63fc7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand Down
30 changes: 15 additions & 15 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PosteriorStats"
uuid = "7f36be82-ad55-44ba-a5c0-b8b5480d7aa5"
authors = ["Seth Axen <[email protected]> and contributors"]
version = "0.2.0"
version = "0.2.1"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ using OffsetArrays
using PosteriorStats
using Random
using StatsBase
using Statistics
using Test

@testset "utils" begin
Expand Down

2 comments on commit ff63fc7

@sethaxen
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/100726

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" ff63fc75b024f5ef0c279ed39b56f74fcfe2def1
git push origin v0.2.1

Please sign in to comment.