From 66fe1cd1e7228677ba5e960337066b6e90f5bb62 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 11:50:25 -0600 Subject: [PATCH 1/7] make dataset loading case insensitive --- Project.toml | 2 +- src/MixedModelsDatasets.jl | 5 ++++- test/runtests.jl | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 214737f..4be3804 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MixedModelsDatasets" uuid = "7e9fb7ac-9f67-43bf-b2c8-96ba0796cbb6" authors = ["Phillip Alday ", "Douglas Bates "] -version = "0.1.1" +version = "0.1.2" [deps] Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" diff --git a/src/MixedModelsDatasets.jl b/src/MixedModelsDatasets.jl index 29d6cb0..60aca8a 100644 --- a/src/MixedModelsDatasets.jl +++ b/src/MixedModelsDatasets.jl @@ -13,10 +13,13 @@ cacheddatasets = Dict{String,Arrow.Table}() dataset(nm) Return, as an `Arrow.Table`, the test data set named `nm`, which can be a `String` or `Symbol` + +!!! note "Case insensitive" + Dataset names are case insensitive: internally all names are normalized to lowercase. """ function dataset(nm::AbstractString) get!(cacheddatasets, nm) do - path = joinpath(_testdata(), nm * ".arrow") + path = joinpath(_testdata(), lowercase(nm) * ".arrow") if !isfile(path) throw(ArgumentError("Dataset \"$nm\" is not available.\nUse MixedModels.datasets() for available names.")) end diff --git a/test/runtests.jl b/test/runtests.jl index 779e673..eba798f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,5 +14,6 @@ end @testset "$(ds) loadable" for ds in datasets() @test dataset(ds) isa Arrow.Table + @test dataset(titlecase(ds)) isa Arrow.Table end end From dd31182a3b06539187f7ac4ff5db40b97a54bda7 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 11:50:33 -0600 Subject: [PATCH 2/7] ignore versioned manifests --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 29126e4..defe761 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ docs/site/ # committed for packages, but should be committed for applications that require a static # environment. Manifest.toml +Manifest-v*.toml From f511773300f73cfe695efcd90448f46d3369b4b6 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 11:50:44 -0600 Subject: [PATCH 3/7] Aqua version bump --- Project.toml | 3 ++- test/runtests.jl | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 4be3804..4d670e8 100644 --- a/Project.toml +++ b/Project.toml @@ -9,10 +9,11 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [compat] -Aqua = "0.5, 0.6, 0.7" +Aqua = "0.8" Arrow = "1, 2" Artifacts = "1" LazyArtifacts = "1" +Test = "0.0, 1" julia = "1.6" [extras] diff --git a/test/runtests.jl b/test/runtests.jl index eba798f..b603830 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,9 +4,7 @@ using MixedModelsDatasets using Test @testset "Aqua" begin - @static if VERSION >= v"1.9" - Aqua.test_all(MixedModelsDatasets; ambiguities=false, piracy=true) - end + Aqua.test_all(MixedModelsDatasets) end @testset "datasets" begin From 50f082fffb2e4739a338f03ee5689d21ab77e31f Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 11:50:53 -0600 Subject: [PATCH 4/7] CI overhaul --- .github/workflows/ci.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 979757a..0e84949 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,17 +21,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - version: [1.6, 1, nightly] - arch: [x64] - os: [ubuntu-latest] + version: [min, 1, nightly] + os: [ubuntu-latest, macos-latest] steps: - name: Checkout uses: actions/checkout@v4 - name: Julia Setup uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 with: cache-compiled: "true" @@ -43,11 +39,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Coverage Process uses: julia-actions/julia-processcoverage@v1 - if: ${{ startsWith(matrix.os, 'ubuntu') && (matrix.version == '1') }} - name: Coverage Upload uses: codecov/codecov-action@v5 - if: ${{ startsWith(matrix.os, 'ubuntu') && (matrix.version == '1') }} with: - file: lcov.info + files: lcov.info env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From d4df07bbb257ee8f1d5b3618dd4cc89c23ecb51b Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 11:57:50 -0600 Subject: [PATCH 5/7] full test coverage --- .gitignore | 1 + test/runtests.jl | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index defe761..d4bcaea 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ docs/site/ # environment. Manifest.toml Manifest-v*.toml +coverage/lcov.info diff --git a/test/runtests.jl b/test/runtests.jl index b603830..b705448 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,6 +12,8 @@ end @testset "$(ds) loadable" for ds in datasets() @test dataset(ds) isa Arrow.Table - @test dataset(titlecase(ds)) isa Arrow.Table + @test dataset(Symbol(titlecase(ds))) isa Arrow.Table end + + @test_throws ArgumentError dataset("This is not a Dataset") end From 80e863e1e58285f0623d52475d5f792eb9222c41 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 12:04:20 -0600 Subject: [PATCH 6/7] more CI tweaks --- .github/workflows/ci.yml | 4 ++-- .github/workflows/style.yml | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e84949..756e01c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,11 +28,11 @@ jobs: uses: actions/checkout@v4 - name: Julia Setup uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} - uses: julia-actions/cache@v2 with: cache-compiled: "true" - - name: Build - uses: julia-actions/julia-buildpkg@v1 - name: Test uses: julia-actions/julia-runtest@v1 env: diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 1574156..55cc07b 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -12,7 +12,7 @@ on: - '.gitignore' jobs: format-check: - name: Style Enforcement (Julia ${{ matrix.julia-version }} - ${{ github.event_name }}) + name: Style Enforcement (Julia ${{ matrix.version }} - ${{ github.event_name }}) # Run on push's or non-draft PRs if: (github.event_name == 'push') || (github.event.pull_request.draft == false) runs-on: ubuntu-latest @@ -20,16 +20,21 @@ jobs: permissions: write-all strategy: matrix: - julia-version: [1.6] + version: [1] steps: - - uses: julia-actions/setup-julia@latest + - name: Checkout + uses: actions/checkout@v4 + - name: Julia Setup + uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.julia-version }} - - uses: actions/checkout@v4 + version: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + with: + cache-compiled: "true" - name: Instantiate `format` environment and format run: | - julia -e' - using Pkg; Pkg.activate() + julia --project=@format -e' + using Pkg; Pkg.add("JuliaFormatter") using JuliaFormatter format(".", YASStyle())' From 9287c71e1f5405963750c13c377472b3dcd6549a Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 27 Jan 2025 12:07:04 -0600 Subject: [PATCH 7/7] only do macos for current release --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 756e01c..f482510 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,11 @@ jobs: matrix: version: [min, 1, nightly] os: [ubuntu-latest, macos-latest] + exclude: + - os: macos-latest + version: min + - os: macos-latest + version: nightly steps: - name: Checkout uses: actions/checkout@v4