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
31 changes: 24 additions & 7 deletions .github/workflows/Tests.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Tests"
name: CI

on:
pull_request:
Expand All @@ -23,23 +23,40 @@ jobs:
fail-fast: false
matrix:
version:
- "1"
- "lts"
- "1"
- "pre"
group:
- "Core"
- "RaggedArrays"
- "ArrayPartitionAnyAll"
- "ShorthandConstructors"
- "QA"
- "SymbolicIndexingInterface"
- "Downstream"
- "nopre"
- "NoPre"
exclude:
# JET (NoPre) is not run on prereleases.
- version: "pre"
group: "nopre"
group: "NoPre"
# QA (Aqua) runs only on lts and 1, never on prereleases.
- version: "pre"
group: "QA"
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
julia-version: "${{ matrix.version }}"
group: "${{ matrix.group }}"
num-threads: "2"
check-bounds: "auto"
coverage-directories: "src,ext"
secrets: "inherit"

# GPU tests are a dep-adding group (test/GPU/Project.toml) that runs on the
# self-hosted GPU runner. Folded in from the former bespoke GPU.yml.
gpu:
name: "GPU Tests"
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
julia-version: "1"
group: "GPU"
runner: '["self-hosted", "Linux", "X64", "gpu"]'
timeout-minutes: 60
coverage-directories: "src,ext"
secrets: "inherit"
2 changes: 0 additions & 2 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ jobs:
- Core
uses: "SciML/.github/.github/workflows/downgrade.yml@v1"
with:
julia-version: "1.10"
group: "${{ matrix.group }}"
skip: "Pkg,TOML"
secrets: "inherit"
4 changes: 3 additions & 1 deletion .github/workflows/DowngradeSublibraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ jobs:
secrets: "inherit"
with:
julia-version: "lts"
skip: "RecursiveArrayTools, Pkg, TOML, Statistics, LinearAlgebra, SparseArrays, InteractiveUtils, Random, Test"
group-env-name: "RECURSIVEARRAYTOOLS_TEST_GROUP"
group-env-value: "Core"
# Every lib/* sublibrary is downgrade-tested (projects auto-discovered, no exclusions).
38 changes: 0 additions & 38 deletions .github/workflows/GPU.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/SublibraryCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ concurrency:
jobs:
sublibraries:
uses: "SciML/.github/.github/workflows/sublibrary-project-tests.yml@v1"
with:
group-env-name: RECURSIVEARRAYTOOLS_TEST_GROUP
check-bounds: auto
secrets: "inherit"
28 changes: 17 additions & 11 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: TagBot
name: "TagBot"
on:
issue_comment:
types:
- created
types: [created]
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
tagbot:
uses: "SciML/.github/.github/workflows/tagbot.yml@v1"
secrets: "inherit"
tagbot-subpackages:
strategy:
fail-fast: false
matrix:
subdir:
- "lib/RecursiveArrayToolsArrayPartitionAnyAll"
- "lib/RecursiveArrayToolsRaggedArrays"
- "lib/RecursiveArrayToolsShorthandConstructors"
uses: "SciML/.github/.github/workflows/tagbot.yml@v1"
with:
subdir: "${{ matrix.subdir }}"
secrets: "inherit"
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
*.jl.*.mem
Manifest.toml
*.DS_Store
.vscode
profile.pb.gz
.*.swp
LocalPreferences.toml

docs/build
.claude/
8 changes: 3 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ RecursiveArrayToolsZygoteExt = "Zygote"

[compat]
Adapt = "4"
Aqua = "0.8"
ArrayInterface = "7.17.0"
CUDA = "5, 6.0"
DocStringExtensions = "0.9.3"
Expand All @@ -62,12 +61,12 @@ LinearAlgebra = "1.10"
Measurements = "2.11"
MonteCarloMeasurements = "1.2"
Mooncake = "0.5"
NLsolve = "4.5"
Pkg = "1"
Polyester = "0.7.16"
PrecompileTools = "1.2.1"
Random = "1"
RecipesBase = "1.3.4"
RecursiveArrayToolsShorthandConstructors = "1"
ReverseDiff = "1.15"
SafeTestsets = "0.1"
SparseArrays = "1.10"
Expand All @@ -84,17 +83,16 @@ Zygote = "0.7"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecursiveArrayToolsShorthandConstructors = "39fb7555-b4ad-4efd-8abe-30331df017d3"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Expand All @@ -106,4 +104,4 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Aqua", "FastBroadcast", "ForwardDiff", "KernelAbstractions", "Measurements", "Mooncake", "NLsolve", "Pkg", "Polyester", "Random", "ReverseDiff", "SafeTestsets", "SparseArrays", "StaticArrays", "Statistics", "StructArrays", "Tables", "Test", "Unitful", "Zygote"]
test = ["FastBroadcast", "ForwardDiff", "KernelAbstractions", "Measurements", "Mooncake", "Pkg", "Polyester", "Random", "RecursiveArrayToolsShorthandConstructors", "ReverseDiff", "SafeTestsets", "SparseArrays", "StaticArrays", "Statistics", "StructArrays", "Tables", "Test", "Unitful", "Zygote"]
3 changes: 3 additions & 0 deletions lib/RecursiveArrayToolsArrayPartitionAnyAll/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ version = "1.0.0"
[deps]
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"

[sources]
RecursiveArrayTools = {path = "../.."}

[compat]
RecursiveArrayTools = "4"
julia = "1.10"
Expand Down
11 changes: 8 additions & 3 deletions lib/RecursiveArrayToolsArrayPartitionAnyAll/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# RecursiveArrayToolsArrayPartitionAnyAll.jl

Optimized `any` and `all` for
[RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl)'s
`ArrayPartition` type.
[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged)
[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/RecursiveArrayTools/stable/)

[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)

RecursiveArrayToolsArrayPartitionAnyAll.jl is a component of the [RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl) monorepo. Optimized `any` and `all` for the `ArrayPartition` type.
While completely independent and usable on its own, users wanting the full functionality should use [RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl).

`ArrayPartition` stores data as a tuple of arrays. The default `AbstractArray`
`any`/`all` iterates element-by-element through the partition, which incurs
Expand Down
56 changes: 30 additions & 26 deletions lib/RecursiveArrayToolsArrayPartitionAnyAll/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
using RecursiveArrayTools, RecursiveArrayToolsArrayPartitionAnyAll, Test

@testset "Optimized any" begin
ap = ArrayPartition(collect(1:5), collect(6:10), collect(11:15))
@test any(x -> x == 4, ap)
@test any(x -> x == 15, ap)
@test !any(x -> x == 17, ap)
@test any(ap .> 10)
@test !any(ap .> 20)
end
const TEST_GROUP = get(ENV, "RECURSIVEARRAYTOOLS_TEST_GROUP", "Core")

@testset "Optimized all" begin
ap = ArrayPartition(ones(5), ones(5), ones(5))
@test all(x -> x == 1.0, ap)
@test !all(x -> x == 2.0, ap)
@test all(ap .> 0)
if TEST_GROUP == "Core" || TEST_GROUP == "All"
@testset "Optimized any" begin
ap = ArrayPartition(collect(1:5), collect(6:10), collect(11:15))
@test any(x -> x == 4, ap)
@test any(x -> x == 15, ap)
@test !any(x -> x == 17, ap)
@test any(ap .> 10)
@test !any(ap .> 20)
end

ap2 = ArrayPartition(ones(5), [1.0, 1.0, 0.0, 1.0, 1.0], ones(5))
@test !all(x -> x == 1.0, ap2)
end
@testset "Optimized all" begin
ap = ArrayPartition(ones(5), ones(5), ones(5))
@test all(x -> x == 1.0, ap)
@test !all(x -> x == 2.0, ap)
@test all(ap .> 0)

ap2 = ArrayPartition(ones(5), [1.0, 1.0, 0.0, 1.0, 1.0], ones(5))
@test !all(x -> x == 1.0, ap2)
end

@testset "Matches AbstractArray default results" begin
ap = ArrayPartition(rand(100), rand(100), rand(100))
f = x -> x > 0.5
@testset "Matches AbstractArray default results" begin
ap = ArrayPartition(rand(100), rand(100), rand(100))
f = x -> x > 0.5

# Results must match
@test any(f, ap) == any(f, collect(ap))
@test all(f, ap) == all(f, collect(ap))
# Results must match
@test any(f, ap) == any(f, collect(ap))
@test all(f, ap) == all(f, collect(ap))

# Edge case: empty
ap_empty = ArrayPartition(Float64[], Float64[])
@test !any(x -> true, ap_empty)
@test all(x -> true, ap_empty)
# Edge case: empty
ap_empty = ArrayPartition(Float64[], Float64[])
@test !any(x -> true, ap_empty)
@test all(x -> true, ap_empty)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Core]
versions = ["lts", "1", "pre"]
3 changes: 3 additions & 0 deletions lib/RecursiveArrayToolsRaggedArrays/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"

[sources]
RecursiveArrayTools = {path = "../.."}

[compat]
Adapt = "4"
ArrayInterface = "7.17.0"
Expand Down
10 changes: 8 additions & 2 deletions lib/RecursiveArrayToolsRaggedArrays/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# RecursiveArrayToolsRaggedArrays.jl

True ragged (non-rectangular) array types for
[RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl).
[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged)
[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/RecursiveArrayTools/stable/)

[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)

RecursiveArrayToolsRaggedArrays.jl is a component of the [RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl) monorepo. True ragged (non-rectangular) array types for `RaggedVectorOfArray` and `RaggedDiffEqArray`.
While completely independent and usable on its own, users wanting the full functionality should use [RecursiveArrayTools.jl](https://github.com/SciML/RecursiveArrayTools.jl).

This subpackage provides `RaggedVectorOfArray` and `RaggedDiffEqArray`, which
preserve the exact ragged structure of collections of differently-sized arrays
Expand Down
Loading
Loading