Skip to content

Commit 24645c3

Browse files
Merge pull request #473 from ChrisRackauckas-Claude/move-tables-to-extension
Move Tables.jl and IteratorInterfaceExtensions.jl to extension for faster precompilation
2 parents 204f2ab + 83f3aa5 commit 24645c3

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

Project.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
88
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
99
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1010
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
11-
IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d"
1211
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1312
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1413
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
1514
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1615
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
17-
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1816

1917
[weakdeps]
2018
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
2119
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
20+
IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d"
2221
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
2322
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
2423
MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
2524
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
2625
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2726
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
27+
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
2828
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
2929
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
3030

@@ -37,6 +37,7 @@ RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements"
3737
RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"]
3838
RecursiveArrayToolsSparseArraysExt = ["SparseArrays"]
3939
RecursiveArrayToolsStructArraysExt = "StructArrays"
40+
RecursiveArrayToolsTablesExt = ["Tables", "IteratorInterfaceExtensions"]
4041
RecursiveArrayToolsTrackerExt = "Tracker"
4142
RecursiveArrayToolsZygoteExt = "Zygote"
4243

@@ -94,4 +95,4 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
9495
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
9596

9697
[targets]
97-
test = ["Aqua", "FastBroadcast", "ForwardDiff", "KernelAbstractions", "Measurements", "NLsolve", "Pkg", "Random", "SafeTestsets", "SciMLBase", "SparseArrays", "StaticArrays", "StructArrays", "Test", "Unitful", "Zygote"]
98+
test = ["Aqua", "FastBroadcast", "ForwardDiff", "IteratorInterfaceExtensions", "KernelAbstractions", "Measurements", "NLsolve", "Pkg", "Random", "SafeTestsets", "SciMLBase", "SparseArrays", "StaticArrays", "StructArrays", "Tables", "Test", "Unitful", "Zygote"]

src/tabletraits.jl renamed to ext/RecursiveArrayToolsTablesExt.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
module RecursiveArrayToolsTablesExt
2+
3+
import RecursiveArrayTools: AbstractDiffEqArray, variable_symbols
4+
import Tables
5+
import IteratorInterfaceExtensions
6+
17
# Tables traits for AbstractDiffEqArray
28
Tables.istable(::Type{<:AbstractDiffEqArray}) = true
39
Tables.rowaccess(::Type{<:AbstractDiffEqArray}) = true
@@ -80,3 +86,5 @@ IteratorInterfaceExtensions.isiterable(::AbstractDiffEqArray) = true
8086
function IteratorInterfaceExtensions.getiterator(A::AbstractDiffEqArray)
8187
Tables.datavaluerows(Tables.rows(A))
8288
end
89+
90+
end

src/RecursiveArrayTools.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ using SymbolicIndexingInterface
1111

1212
import Adapt
1313

14-
import Tables, IteratorInterfaceExtensions
15-
1614
"""
1715
AbstractVectorOfArray{T, N, A}
1816
@@ -124,7 +122,6 @@ abstract type AbstractDiffEqArray{T, N, A} <: AbstractVectorOfArray{T, N, A} end
124122

125123
include("utils.jl")
126124
include("vector_of_array.jl")
127-
include("tabletraits.jl")
128125
include("array_partition.jl")
129126
include("named_array_partition.jl")
130127

test/tabletraits.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using RecursiveArrayTools, Random, Test
1+
using RecursiveArrayTools, Random, Test, Tables, IteratorInterfaceExtensions
22

33
include("testutils.jl")
44

test/testutils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using RecursiveArrayTools
2-
using RecursiveArrayTools: Tables, IteratorInterfaceExtensions
2+
using Tables, IteratorInterfaceExtensions
33

44
# Test Tables interface with row access + IteratorInterfaceExtensions for QueryVerse
55
# (see https://tables.juliadata.org/stable/#Testing-Tables.jl-Implementations)

0 commit comments

Comments
 (0)