diff --git a/Project.toml b/Project.toml index 1ad03ee21..25c4a5bcd 100644 --- a/Project.toml +++ b/Project.toml @@ -11,13 +11,11 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" Electron = "a1bb12fb-d4d1-54b4-b10a-ee7951ef7ad3" -ExcelFiles = "89b67f3b-d1aa-5f6f-9ca4-282e8d98620d" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" FilePaths = "8fc22ac5-c921-52a6-82fd-178b2807b824" GlobalSensitivityAnalysis = "1b10255b-6da3-57ce-9089-d24e8517b87e" GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231" IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -IterableTables = "1c8ee90f-4401-5389-894e-7a04a3dc0f4d" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -27,7 +25,6 @@ MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5" NamedArrays = "86f7a689-2022-50b4-a561-43c23ac3c673" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" -Query = "1a8c2f83-1ff3-5112-b086-8aa67b057ba1" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" @@ -35,6 +32,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" StringBuilders = "db12335b-fddc-5e1b-b0ee-42071d21ae50" TableTraits = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" VegaLite = "112f6efa-9a02-5b7d-90c0-432ed331239a" +IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d" [compat] GraphPlot = "0.3" @@ -51,6 +49,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" +Query = "1a8c2f83-1ff3-5112-b086-8aa67b057ba1" [targets] -test = ["Pkg", "Statistics", "NamedArrays", "ExcelFiles", "ExcelReaders", "DelimitedFiles", "Random", "Test", "ZipFile", "MacroTools"] +test = ["Pkg", "Statistics", "NamedArrays", "ExcelFiles", "ExcelReaders", "DelimitedFiles", "Random", "Test", "ZipFile", "MacroTools", "Query"] diff --git a/src/mcs/mcs_types.jl b/src/mcs/mcs_types.jl index dbef24c48..6b3e33b8f 100644 --- a/src/mcs/mcs_types.jl +++ b/src/mcs/mcs_types.jl @@ -1,4 +1,3 @@ -using IterableTables using Distributions using Statistics diff --git a/src/mcs/montecarlo.jl b/src/mcs/montecarlo.jl index 6894d5c4a..8d263be50 100644 --- a/src/mcs/montecarlo.jl +++ b/src/mcs/montecarlo.jl @@ -1,6 +1,6 @@ using IterTools -using IterableTables -using TableTraits +import IteratorInterfaceExtensions +import TableTraits using Random using ProgressMeter using Serialization @@ -550,10 +550,10 @@ function Base.iterate(sim::Simulation{T}, trialnum) where T <: AbstractSimulatio end end -TableTraits.isiterable(sim::Simulation{T}) where T <: AbstractSimulationData = true +IteratorInterfaceExtensions.isiterable(sim::Simulation{T}) where T <: AbstractSimulationData = true TableTraits.isiterabletable(sim::Simulation{T}) where T <: AbstractSimulationData = true -IterableTables.getiterator(sim::Simulation) = SimIterator{sim.nt_type}(sim) +IteratorInterfaceExtensions.getiterator(sim::Simulation) = SimIterator{sim.nt_type}(sim) column_names(sim::Simulation{T}) where T <: AbstractSimulationData = fieldnames(sim.nt_type) column_types(sim::Simulation{T}) where T <: AbstractSimulationData = [eltype(fld) for fld in values(sim.rvdict)] @@ -562,7 +562,7 @@ column_types(sim::Simulation{T}) where T <: AbstractSimulationData = [eltype(fld # Iteration support (which in turn supports the "save" method) # column_names(iter::SimIterator) = column_names(iter.sim) -column_types(iter::SimIterator) = IterableTables.column_types(iter.sim) +column_types(iter::SimIterator) = error("Not implemented") # Used to be `IterableTables.column_types(iter.sim)` function Base.iterate(iter::SimIterator) _reset_rvs!(iter.sim)