Skip to content
Open
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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- 'lts'
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'nightly'
os:
Expand All @@ -27,12 +27,12 @@ jobs:
version: '1'
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand All @@ -45,9 +45,9 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
files: lcov.info
# docs:
# name: Documentation
# runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
test = ["Test", "StaticArrays"]

[compat]
julia = "1"
julia = "1.10"
Indexing = "1.1"
Dictionaries = "0.3, 0.4"
StaticArrays = "1"
19 changes: 0 additions & 19 deletions src/SplitApplyCombine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ import Dictionaries: filterview

import Base: merge, merge!, size, IndexStyle, getindex, parent, axes, iterate

# collections -> scalar
if VERSION < v"1.4.0-DEV"
export only
include("only.jl")
end

# collections -> collections
export mapmany, mapview, MappedIterator, MappedArray, product, productview, ProductArray, filterview

Expand Down Expand Up @@ -40,17 +34,4 @@ include("splitdims.jl")
include("combinedims.jl")
include("invert.jl")

# Silly definitions missing from Base
# (defining them here is piracy)
# ===================================

if !hasmethod(Base.haskey, (Any, Any))
Base.haskey(a, i) = i ∈ keys(a)
end

if VERSION < v"1.2"
keytype(a::AbstractArray) = eltype(keys(a))
keytype(a) = Base.keytype(a)
end

end # module
22 changes: 0 additions & 22 deletions src/only.jl

This file was deleted.

12 changes: 2 additions & 10 deletions test/product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
@test @inferred(product(*, [1,2], [1,2,3]))::Matrix{Int} == [1 2 3; 2 4 6]
@test @inferred(product(*, [1.0,2.0], [1,2,3]))::Matrix{Float64} == [1.0 2.0 3.0; 2.0 4.0 6.0]
@test isequal(product(*, [1.0,2.0], [1,2,missing]), [1.0 2.0 missing; 2.0 4.0 missing])
if VERSION >= v"1.1" # can infer same test from v1.1
@test isequal(@inferred(product(*, [1.0,2.0], [1,2,missing]))::Matrix{Union{Missing, Float64}}, [1.0 2.0 missing; 2.0 4.0 missing])
else
@test_broken isequal(@inferred(product(*, [1.0,2.0], [1,2,missing]))::Matrix{Union{Missing, Float64}}, [1.0 2.0 missing; 2.0 4.0 missing])
end
@test isequal(@inferred(product(*, [1.0,2.0], [1,2,missing]))::Matrix{Union{Missing, Float64}}, [1.0 2.0 missing; 2.0 4.0 missing])

@test @inferred(product(+, fill(1), fill(1)))::Array{Int, 0} == fill(2)
@test @inferred(product(+, [0,1,2], fill(1)))::Array{Int, 1} == [1,2,3]
Expand All @@ -20,11 +16,7 @@ end
@test @inferred(productview(*, [1,2], [1,2,3]))::ProductArray{Int,2} == [1 2 3; 2 4 6]
@test @inferred(productview(*, [1.0,2.0], [1,2,3]))::ProductArray{Float64,2} == [1.0 2.0 3.0; 2.0 4.0 6.0]
@test isequal(productview(*, [1.0,2.0], [1,2,missing])::ProductArray, [1.0 2.0 missing; 2.0 4.0 missing])
if VERSION >= v"1.1" # can infer same test from v1.1
@test isequal(@inferred(productview(*, [1.0,2.0], [1,2,missing]))::ProductArray{Union{Missing, Float64},2}, [1.0 2.0 missing; 2.0 4.0 missing])
else
@test_broken isequal(@inferred(productview(*, [1.0,2.0], [1,2,missing]))::ProductArray{Union{Missing, Float64},2}, [1.0 2.0 missing; 2.0 4.0 missing])
end
@test isequal(@inferred(productview(*, [1.0,2.0], [1,2,missing]))::ProductArray{Union{Missing, Float64},2}, [1.0 2.0 missing; 2.0 4.0 missing])

@test @inferred(productview(+, fill(1), fill(1)))::ProductArray{Int, 0} == fill(2)
@test @inferred(productview(+, [0,1,2], fill(1)))::ProductArray{Int, 1} == [1,2,3]
Expand Down
Loading