Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,32 @@ 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]
exclude:
- os: macos-latest
version: min
- os: macos-latest
version: nightly
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Julia Setup
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
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:
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 }}
19 changes: 12 additions & 7 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,29 @@ 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
# TODO: further restrict this
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())'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ docs/site/
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml
Manifest-v*.toml
coverage/lcov.info
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name = "MixedModelsDatasets"
uuid = "7e9fb7ac-9f67-43bf-b2c8-96ba0796cbb6"
authors = ["Phillip Alday <me@phillipalday.com>", "Douglas Bates <dmbates@gmail.com>"]
version = "0.1.1"
version = "0.1.2"

[deps]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
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]
Expand Down
5 changes: 4 additions & 1 deletion src/MixedModelsDatasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ 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
@test length(datasets()) == 17

@testset "$(ds) loadable" for ds in datasets()
@test dataset(ds) isa Arrow.Table
@test dataset(Symbol(titlecase(ds))) isa Arrow.Table
end

@test_throws ArgumentError dataset("This is not a Dataset")
end
Loading