Skip to content

Commit

Permalink
Compat for StatsModels 0.7 (#26)
Browse files Browse the repository at this point in the history
* add StatsModels 0.7 to compat list

* fix deprecation warning

* test both StatsModels 0.6 and 0.7

* version bump

* bump min julia compat

* only test on x64
  • Loading branch information
palday committed Apr 5, 2023
1 parent 81dbba3 commit 7b38f38
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,35 @@ on:
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: Julia ${{ matrix.version }} - StatsModels ${{ matrix.statsmodels }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1'
- '1.0'
- '1.6'
- 'nightly'
statsmodels:
- '0.6'
- '0.7'
os:
- ubuntu-latest
arch:
- x64
- x86
# - x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- 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 }}-
- name: "Install StatsModels"
shell: julia --color=yes --project {0}
run: |
using Pkg
Pkg.add(Pkg.PackageSpec(; name="StatsModels", version="${{ matrix.statsmodels }}"))
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StandardizedPredictors"
uuid = "5064a6a7-f8c2-40e2-8bdc-797ec6f1ae18"
authors = "Beacon Biosignals, inc."
version = "0.1.4"
version = "0.1.5"

[deps]
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -10,8 +10,8 @@ StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"

[compat]
StatsBase = "0.33"
StatsModels = "0.6"
julia = "1"
StatsModels = "0.6, 0.7"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
3 changes: 2 additions & 1 deletion test/scaling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
@test modelcols(yc, data) == data.y ./ std(data.y) == data.y ./ yc.scale

@testset "alternative scale function" begin
f = mad
# default normalize will change in a future release of StatsBase
f = x -> mad(x; normalize=true)
xc = concrete_term(term(:x), data, Scale(f))
@test xc isa ScaledTerm
@test xc.scale == f(data.x)
Expand Down
3 changes: 2 additions & 1 deletion test/zscoring.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
@test modelcols(yc, data) zscore(data.y) zscore(data.y, yc.center, yc.scale)

@testset "alternative center and scale functions" begin
f, g = first, mad
# default normalize will change in a future release of StatsBase
f, g = first, x -> mad(x; normalize=true)
xc = concrete_term(term(:x), data, ZScore(f, g))
@test xc isa ZScoredTerm
@test xc.center f(data.x)
Expand Down

2 comments on commit 7b38f38

@palday
Copy link
Member Author

@palday palday commented on 7b38f38 Apr 5, 2023

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/81087

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.1.5 -m "<description of version>" 7b38f388c99baf1e3489871b7a9284eb3ff8208a
git push origin v0.1.5

Please sign in to comment.