From 4d99b53c345708a313be0974142de4e73813f351 Mon Sep 17 00:00:00 2001 From: Moelf Date: Sat, 28 Sep 2024 16:08:08 +0200 Subject: [PATCH 01/21] [RNTuple] write multiple cols --- src/RNTuple/Writing/TFileWriter.jl | 64 ++++++++++++++++++++---------- src/RNTuple/footer.jl | 2 + src/RNTuple/header.jl | 2 +- test/runtests.jl | 42 ++++++++++---------- 4 files changed, 67 insertions(+), 43 deletions(-) diff --git a/src/RNTuple/Writing/TFileWriter.jl b/src/RNTuple/Writing/TFileWriter.jl index fdb01854..15602cc1 100644 --- a/src/RNTuple/Writing/TFileWriter.jl +++ b/src/RNTuple/Writing/TFileWriter.jl @@ -473,19 +473,45 @@ function rnt_write_observe(io::IO, x::T) where T WriteObservable(io, pos, len, x) end +function add_field_column_record!(field_records, column_records, input_T::Type{<:Real}, NAME; parent_field_id) + fr = UnROOT.FieldRecord(zero(UInt32), zero(UInt32), parent_field_id, zero(UInt16), zero(UInt16), 0, -1, -1, string(NAME), RNTUPLE_WRITE_TYPE_CPPNAME_DICT[input_T], "", "") + cr = UnROOT.ColumnRecord(RNTUPLE_WRITE_TYPE_IDX_DICT[input_T]..., parent_field_id, 0x00, 0x00, 0) + push!(field_records, fr) + push!(column_records, cr) + nothing +end + +function schema_to_field_column_records(table) + input_schema = schema(table) + input_Ts = input_schema.types + input_names = input_schema.names + field_records = UnROOT.FieldRecord[] + column_records = UnROOT.ColumnRecord[] + + for (input_T, input_name) in zip(input_Ts, input_names) + add_field_column_record!(field_records, column_records, input_T, input_name, parent_field_id=length(field_records)) + end + return field_records, column_records +end + +function generate_page_links(column_records, pages_obses, Nitems) + outer_list = RNTuplePageOuterList{RNTuplePageInnerList{PageDescription}}([]) + for (cr, page_obs) in zip(column_records, pages_obses) + inner_list = RNTuplePageInnerList([ + PageDescription(Nitems, Locator(div(cr.nbits * Nitems, 8, RoundUp), page_obs.position)) + ]) + push!(outer_list, inner_list) + end + return RNTuplePageTopList([outer_list]) +end + function write_rntuple(file::IO, table; file_name="test_ntuple_minimal.root", rntuple_name="myntuple") if !istable(table) error("RNTuple writing accepts object compatible with Tables.jl interface, got type $(typeof(table))") end - input_schema = schema(table) - input_Ncols = length(input_schema.names) - if input_Ncols != 1 - error("Currently, RNTuple writing only supports a single, UInt32 column, got $input_Ncols columns") - end - input_T = only(input_schema.types) - input_col = only(columntable(table)) - input_length = length(input_col) + input_cols = columntable(table) + input_length = length(input_cols[begin]) if input_length > 65535 error("Input too long: RNTuple writing currently only supports a single page (65535 elements)") end @@ -507,28 +533,24 @@ function write_rntuple(file::IO, table; file_name="test_ntuple_minimal.root", rn RBlob1_obs = rnt_write_observe(file, Stubs.RBlob1) rntAnchor_update[:fSeekHeader] = UInt32(position(file)) - rnt_header = UnROOT.RNTupleHeader(zero(UInt64), rntuple_name, "", "ROOT v6.33.01", [ - UnROOT.FieldRecord(zero(UInt32), zero(UInt32), zero(UInt32), zero(UInt16), zero(UInt16), 0, -1, -1, string(only(input_schema.names)), RNTUPLE_WRITE_TYPE_CPPNAME_DICT[input_T], "", ""), - ], [UnROOT.ColumnRecord(RNTUPLE_WRITE_TYPE_IDX_DICT[input_T]..., zero(UInt32), 0x00, 0x00, 0),], UnROOT.AliasRecord[], UnROOT.ExtraTypeInfo[]) + field_records, col_records = schema_to_field_column_records(table) + rnt_header = UnROOT.RNTupleHeader( + zero(UInt64), rntuple_name, "", "ROOT v6.33.01", + field_records, col_records, + UnROOT.AliasRecord[], UnROOT.ExtraTypeInfo[] + ) rnt_header_obs = rnt_write_observe(file, rnt_header) rntAnchor_update[:fNBytesHeader] = rnt_header_obs.len rntAnchor_update[:fLenHeader] = rnt_header_obs.len RBlob2_obs = rnt_write_observe(file, Stubs.RBlob2) - page1 = rnt_ary_to_page(input_col) - page1_obs = rnt_write_observe(file, page1) + pages = [rnt_ary_to_page(col) for col in input_cols] + pages_obses = [rnt_write_observe(file, page) for page in pages] RBlob3_obs = rnt_write_observe(file, Stubs.RBlob3) cluster_summary = Write_RNTupleListFrame([ClusterSummary(0, input_length)]) - nested_page_locations = - UnROOT.RNTuplePageTopList([ - UnROOT.RNTuplePageOuterList([ - UnROOT.RNTuplePageInnerList([ - PageDescription(input_length, UnROOT.Locator(sizeof(input_T) * input_length, page1_obs.position, )), - ]), - ]), - ]) + nested_page_locations = generate_page_links(col_records, pages_obses, input_length) pagelink = UnROOT.PageLink(_checksum(rnt_header_obs.object), cluster_summary.payload, nested_page_locations) pagelink_obs = rnt_write_observe(file, pagelink) diff --git a/src/RNTuple/footer.jl b/src/RNTuple/footer.jl index 1af17fce..deb0e5c6 100644 --- a/src/RNTuple/footer.jl +++ b/src/RNTuple/footer.jl @@ -120,6 +120,8 @@ for x in (:RNTuplePageTopList, :RNTuplePageOuterList, :RNTuplePageInnerList) Base.size(r::$x) = size(r.payload) Base.getindex(r::$x, i) = r.payload[i] Base.setindex!(r::$x, v, i) = (r.payload[i] = v) + Base.push!(r::$x, v) = push!(r.payload, v) + Base.append!(r::$x, v) = append!(r.payload, v) end end diff --git a/src/RNTuple/header.jl b/src/RNTuple/header.jl index dc8653d3..429a462d 100644 --- a/src/RNTuple/header.jl +++ b/src/RNTuple/header.jl @@ -1,4 +1,4 @@ -struct FieldRecord +Base.@kwdef struct FieldRecord field_version::UInt32 type_version::UInt32 parent_field_id::UInt32 diff --git a/test/runtests.jl b/test/runtests.jl index d4be502c..364a4f2a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,30 +4,30 @@ using UnROOT nthreads = UnROOT._maxthreadid() nthreads == 1 && @warn "Running on a single thread. Please re-run the test suite with at least two threads (`julia --threads 2 ...`)" -@testset "UnROOT tests" verbose = true begin - include("Aqua.jl") - include("bootstrapping.jl") - include("compressions.jl") - include("jagged.jl") - include("lazy.jl") - include("histograms.jl") - include("views.jl") - include("multithreading.jl") - include("remote.jl") - include("displays.jl") - include("type_stability.jl") - include("utils.jl") - include("misc.jl") +# @testset "UnROOT tests" verbose = true begin +# include("Aqua.jl") +# include("bootstrapping.jl") +# include("compressions.jl") +# include("jagged.jl") +# include("lazy.jl") +# include("histograms.jl") +# include("views.jl") +# include("multithreading.jl") +# include("remote.jl") +# include("displays.jl") +# include("type_stability.jl") +# include("utils.jl") +# include("misc.jl") - include("type_support.jl") - include("custom_bootstrapping.jl") - include("lorentzvectors.jl") - include("NanoAOD.jl") +# include("type_support.jl") +# include("custom_bootstrapping.jl") +# include("lorentzvectors.jl") +# include("NanoAOD.jl") - include("issues.jl") +# include("issues.jl") if VERSION >= v"1.9" - include("rntuple.jl") + # include("rntuple.jl") include("./RNTupleWriting/lowlevel.jl") end -end +# end From 87041b93a512db5a6c013c2085c427d38e620c8f Mon Sep 17 00:00:00 2001 From: Moelf Date: Sat, 28 Sep 2024 16:16:51 +0200 Subject: [PATCH 02/21] restore tests --- test/RNTupleWriting/lowlevel.jl | 28 ++++++++++++++++++++-- test/runtests.jl | 42 ++++++++++++++++----------------- 2 files changed, 47 insertions(+), 23 deletions(-) diff --git a/test/RNTupleWriting/lowlevel.jl b/test/RNTupleWriting/lowlevel.jl index 14ccc7dc..405da977 100644 --- a/test/RNTupleWriting/lowlevel.jl +++ b/test/RNTupleWriting/lowlevel.jl @@ -242,8 +242,8 @@ write("/tmp/mine.root", mio) end @testset "RNTuple Writing - Single colunm round trips" begin -for _ = 1:50, T in [Float64, Float32, Float16, Int64, Int32, Int16, Int8, UInt64, UInt32, UInt16] - newtable = Dict(randstring(rand(2:10)) => rand(T, rand(1:1000))) +for _ = 1:10, T in [Float64, Float32, Float16, Int64, Int32, Int16, Int8, UInt64, UInt32, UInt16] + newtable = Dict(randstring(rand(2:10)) => rand(T, rand(1:100))) newio = IOBuffer() UnROOT.write_rntuple(newio, newtable) nio = take!(newio) @@ -263,3 +263,27 @@ for _ = 1:50, T in [Float64, Float32, Float16, Int64, Int32, Int16, Int8, UInt64 end end + +@testset "RNTuple Writing - Multiple colunm round trips" begin + Ts = rand([Float64, Float32, Float16, Int64, Int32, Int16, Int8, UInt64, UInt32, UInt16], 15) + Nitems = rand(10:1000) + newtable = Dict(randstring(rand(2:10)) => rand(T, Nitems) for T in Ts) + newio = IOBuffer() + UnROOT.write_rntuple(newio, newtable) + nio = take!(newio) + + if isfile("a.root") + rm("a.root") + end + + open("a.root", "w") do f + write(f, nio) + end + + rntuple_name = "myntuple" + t = LazyTree("a.root", rntuple_name) + @test sort(names(t)) == sort(collect(keys(newtable))) + for i in propertynames(t) + @test all(getproperty(t, i) .== newtable[String(i)]) + end +end diff --git a/test/runtests.jl b/test/runtests.jl index 364a4f2a..d4be502c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,30 +4,30 @@ using UnROOT nthreads = UnROOT._maxthreadid() nthreads == 1 && @warn "Running on a single thread. Please re-run the test suite with at least two threads (`julia --threads 2 ...`)" -# @testset "UnROOT tests" verbose = true begin -# include("Aqua.jl") -# include("bootstrapping.jl") -# include("compressions.jl") -# include("jagged.jl") -# include("lazy.jl") -# include("histograms.jl") -# include("views.jl") -# include("multithreading.jl") -# include("remote.jl") -# include("displays.jl") -# include("type_stability.jl") -# include("utils.jl") -# include("misc.jl") +@testset "UnROOT tests" verbose = true begin + include("Aqua.jl") + include("bootstrapping.jl") + include("compressions.jl") + include("jagged.jl") + include("lazy.jl") + include("histograms.jl") + include("views.jl") + include("multithreading.jl") + include("remote.jl") + include("displays.jl") + include("type_stability.jl") + include("utils.jl") + include("misc.jl") -# include("type_support.jl") -# include("custom_bootstrapping.jl") -# include("lorentzvectors.jl") -# include("NanoAOD.jl") + include("type_support.jl") + include("custom_bootstrapping.jl") + include("lorentzvectors.jl") + include("NanoAOD.jl") -# include("issues.jl") + include("issues.jl") if VERSION >= v"1.9" - # include("rntuple.jl") + include("rntuple.jl") include("./RNTupleWriting/lowlevel.jl") end -# end +end From dd351f66878255e6f59459c2244dfafedcf7ff9a Mon Sep 17 00:00:00 2001 From: Moelf Date: Wed, 2 Oct 2024 22:44:13 +0200 Subject: [PATCH 03/21] add pixi env for root-nightly --- .gitattributes | 2 ++ .gitignore | 3 +++ pixi.toml | 12 ++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 pixi.toml diff --git a/.gitattributes b/.gitattributes index b5a6eb1b..3bf1119b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,3 +7,5 @@ test/samples/RNTuple/* linguist-detectable=false # JOSS paper paper/** linguist-detectable=false +# GitHub syntax highlighting +pixi.lock linguist-language=YAML linguist-generated=true diff --git a/.gitignore b/.gitignore index 4f5484e8..94ee381e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ *__pycache__* /.benchmarkci /benchmark/*.json +# pixi environments +.pixi +*.egg-info diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 00000000..e17ac182 --- /dev/null +++ b/pixi.toml @@ -0,0 +1,12 @@ +[project] +authors = ["Moelf "] +channels = ["https://root.cern/download/conda-nightly/latest", "conda-forge"] +description = "Add a short description here" +name = "UnROOT" +platforms = ["linux-64"] +version = "0.1.0" + +[tasks] + +[dependencies] +root-nightly = ">=6.31.0,<7" From 263452db7df4abc3c3b503ceb8b2d37576410eee Mon Sep 17 00:00:00 2001 From: Moelf Date: Wed, 2 Oct 2024 23:35:33 +0200 Subject: [PATCH 04/21] add scripts --- test/samples/RNTuple/rntuple_nanoAOD_importer.C | 12 ++++++++++++ test/samples/RNTuple/runall.sh | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 test/samples/RNTuple/rntuple_nanoAOD_importer.C diff --git a/test/samples/RNTuple/rntuple_nanoAOD_importer.C b/test/samples/RNTuple/rntuple_nanoAOD_importer.C new file mode 100644 index 00000000..78eb2bbd --- /dev/null +++ b/test/samples/RNTuple/rntuple_nanoAOD_importer.C @@ -0,0 +1,12 @@ +R__LOAD_LIBRARY(ROOTNTuple) +#include +#include +#include +#include + +void rntuple_nanoAOD_importer() { + auto importer = ROOT::Experimental::RNTupleImporter::Create("./Run2012BC_DoubleMuParked_Muons.root", "Events", "./Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root"); + auto c = importer.get(); + c->SetMaxEntries(1000); + c->Import(); +} diff --git a/test/samples/RNTuple/runall.sh b/test/samples/RNTuple/runall.sh index 9d582dfd..0f082b44 100644 --- a/test/samples/RNTuple/runall.sh +++ b/test/samples/RNTuple/runall.sh @@ -4,3 +4,5 @@ root -q ./rntuple_stl_containers.C root -q ./rntuple_int_multicluster.C root -q ./rntuple_split_3e4.C root -q ./rntuple_minimal.C +rm ./Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root +root -q ./rntuple_nanoAOD_importer.C From 05a1c2a084837868d1b75475fbff6e7864b61dca Mon Sep 17 00:00:00 2001 From: Moelf Date: Thu, 3 Oct 2024 10:43:01 +0200 Subject: [PATCH 05/21] add 2col --- test/samples/RNTuple/rntuple_minimal_2col.C | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/samples/RNTuple/rntuple_minimal_2col.C diff --git a/test/samples/RNTuple/rntuple_minimal_2col.C b/test/samples/RNTuple/rntuple_minimal_2col.C new file mode 100644 index 00000000..c69ea917 --- /dev/null +++ b/test/samples/RNTuple/rntuple_minimal_2col.C @@ -0,0 +1,26 @@ +R__LOAD_LIBRARY(ROOTNTuple) +#include +#include +#include +#include + +using RNTupleModel = ROOT::Experimental::RNTupleModel; +using RNTupleWriter = ROOT::Experimental::RNTupleWriter; +using RNTupleWriteOptions = ROOT::Experimental::RNTupleWriteOptions; + +void rntuple_minimal_2col() { + auto writeOptions = RNTupleWriteOptions(); + writeOptions.SetCompression(0); + + std::string rootFileName1{"test_ntuple_minimal_2col.root"}; + auto model1 = RNTupleModel::Create(); + auto field1 = model1->MakeField("one_uint"); + auto field2 = model2->MakeField("two_uint"); + auto ntuple1 = + RNTupleWriter::Recreate(std::move(model1), "myntuple", rootFileName1, writeOptions); + // 0xcececece + *field1 = 3469659854; + // 0xabababab + *field2 = 2880154539; + ntuple1->Fill(); +} From 3cef208af4b13db15234a4b05af400f301a59eff Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Thu, 3 Oct 2024 03:51:55 -0500 Subject: [PATCH 06/21] add minimal RNTuple 2 col --- test/samples/RNTuple/rntuple_minimal_2col.C | 2 +- .../RNTuple/test_ntuple_minimal_2col.root | Bin 0 -> 1745 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 test/samples/RNTuple/test_ntuple_minimal_2col.root diff --git a/test/samples/RNTuple/rntuple_minimal_2col.C b/test/samples/RNTuple/rntuple_minimal_2col.C index c69ea917..cd0cbafc 100644 --- a/test/samples/RNTuple/rntuple_minimal_2col.C +++ b/test/samples/RNTuple/rntuple_minimal_2col.C @@ -15,7 +15,7 @@ void rntuple_minimal_2col() { std::string rootFileName1{"test_ntuple_minimal_2col.root"}; auto model1 = RNTupleModel::Create(); auto field1 = model1->MakeField("one_uint"); - auto field2 = model2->MakeField("two_uint"); + auto field2 = model1->MakeField("two_uint"); auto ntuple1 = RNTupleWriter::Recreate(std::move(model1), "myntuple", rootFileName1, writeOptions); // 0xcececece diff --git a/test/samples/RNTuple/test_ntuple_minimal_2col.root b/test/samples/RNTuple/test_ntuple_minimal_2col.root new file mode 100644 index 0000000000000000000000000000000000000000..50f2836da1f7dd7a1a7f63c46c12fbe4433f3655 GIT binary patch literal 1745 zcmXTQ&o5zM`0mQUz>vbgz;+Rcdx2~hAZ7&OI2IrQ1S~&+{3#GNIpiz`kU`O9Z8moq z?7=1jZDU|y4ROoNNtG>0EiQ@AD=96=NsZ6V%*)J8%!xNj&d<>+0=bTWGy^NhRItem z40S+5Th$jYsR zxD_PG3&cVG{virwW_rfPdIpA7{~>@0C}9gyfdzmJ$((P=K-+7?8za27iI-0VzUe|M_}SX2#oR6M@23 z;ArGP1QwGvP!t|m=YT-$Yec%w@eS`+1Hr|W8S2m89IXVZIR@6b1W9KqvQB1(B|t6% z1I(^FP`7~GCIOZ~5HR=7KvJ^=$-g&{#6e78{4)50q5}F5w9-DN0SuO)c`wOUoB>$uCXHsZ_|x%*#$q z0aC>!Q9c~rj0|5`7%CX|PCDp!$U&g3UQ0^!;hKk!u7Vl3ztI`{@ z+d?bVZGOe=Ywq-aDE(rK08^*SmV=&Ux9-lJoB#X&)(L+Ps2R=Z?rDAVTfIHGeb$kN zFEdL-E53?aixnJsI+=M+_t&hehG##WP=Cwo(Y7dm)>rTJ7vDM0PdeSGYxirC$r`ij z<5ArjdEYvEUGwzTZEbkSv|EK~{ZkjaqtV+9EUZry>7850sPNv*gMHql)cCEt_B7ba zx&7Is!{sblA?x|}@PgGP8H{HQKO8$hUsLpAuvOlkxGweojX}Z>=Zo&1uT{o-m}#9* zJm0h0lRM2W9@gwMQ>_wZ$oU*0^>e0nt*W({!ZG3Cyo3*D{+;`EI!GjF0$Y)JtBH_@ zZsVKt^~cv$I~wsOx-Rvb!gYOJh}4NJuceA>7KFI=oYUO2SDop&{(sFH##O%$*#kr0 Z1)L(d5Gev&9T83uz_i15vD|bD0{}9X1DpT= literal 0 HcmV?d00001 From 2ffa4750a6a2c34e887b210983f4190051c01651 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Thu, 3 Oct 2024 11:04:03 -0500 Subject: [PATCH 07/21] fix Envelope Size bit shifting --- src/RNTuple/Writing/Stubs.jl | 5 +++-- src/RNTuple/Writing/TFileWriter.jl | 20 +++++++++++++----- ...DoubleMuParked_Muons_rntuple_1000evts.root | Bin 27631 -> 27631 bytes test/samples/RNTuple/rntuple_minimal_2col.C | 2 +- test/samples/RNTuple/test_ntuple_bit.root | Bin 1385 -> 1385 bytes test/samples/RNTuple/test_ntuple_int_5e4.root | Bin 2247 -> 2247 bytes .../RNTuple/test_ntuple_int_multicluster.root | Bin 1779 -> 1779 bytes test/samples/RNTuple/test_ntuple_minimal.root | Bin 1592 -> 1725 bytes .../RNTuple/test_ntuple_split_3e4.root | Bin 1887 -> 1887 bytes .../RNTuple/test_ntuple_stl_containers.root | Bin 2996 -> 2996 bytes 10 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/RNTuple/Writing/Stubs.jl b/src/RNTuple/Writing/Stubs.jl index 86f204c2..38bf68cd 100644 --- a/src/RNTuple/Writing/Stubs.jl +++ b/src/RNTuple/Writing/Stubs.jl @@ -1,7 +1,7 @@ module Stubs using ..UnROOT -const WRITE_TIME = 0x7670F8CD +const WRITE_TIME = 0x76864067 const file_preamble = [ 0x72, 0x6F, 0x6F, 0x74, 0x00, 0x00, 0xF7, 0x45, @@ -23,7 +23,8 @@ const dummy_padding2 = [ ] -const RBlob1 = UnROOT.RBlob(0x00DC, 0x0004, 0x000000BA, WRITE_TIME, 0x0022, 0x0001, 244, 100, "RBlob", "", "") +const RBlob1 = UnROOT.RBlob(; fNbytes = 0x00DC, fVersion = 0x0004, fObjLen = 0x000000BA, fDatime = WRITE_TIME, fKeyLen = 0x0022, +fCycle = 0x0001, fSeekKey = 244, fSeekPdir = 100, fClassName = "RBlob", fName = "", fTitle = "") const rnt_header = UnROOT.RNTupleHeader(zero(UInt64), "myntuple", "", "ROOT v6.33.01", [ UnROOT.FieldRecord(zero(UInt32), zero(UInt32), zero(UInt32), zero(UInt16), zero(UInt16), 0, -1, -1, "one_uint", "std::uint32_t", "", ""), ], [UnROOT.ColumnRecord(0x14, 0x20, zero(UInt32), 0x00, 0x00, 0),], UnROOT.AliasRecord[], UnROOT.ExtraTypeInfo[]) diff --git a/src/RNTuple/Writing/TFileWriter.jl b/src/RNTuple/Writing/TFileWriter.jl index 15602cc1..2a33a935 100644 --- a/src/RNTuple/Writing/TFileWriter.jl +++ b/src/RNTuple/Writing/TFileWriter.jl @@ -134,7 +134,7 @@ function rnt_write(io::IO, x::UnROOT.ROOTDirectoryHeader32) rnt_write(io, x.fSeekKeys; legacy=true) end -struct RBlob +Base.@kwdef struct RBlob fNbytes::Int32 fVersion::Int16 fObjLen::Int32 @@ -237,7 +237,8 @@ function _checksum(x::UnROOT.RNTupleHeader) envelope_size = temp_io.size + sizeof(Int64) + sizeof(UInt64) id_type = 0x0001 - id_length = (UInt64(envelope_size & 0xff) << 16) | id_type + id_length = (UInt64(envelope_size) << 16) | id_type + @show id_length payload_ary = take!(temp_io) prepend!(payload_ary, reinterpret(UInt8, [id_length])) @@ -260,7 +261,8 @@ function rnt_write(io::IO, x::UnROOT.RNTupleHeader; envelope=true) envelope_size = temp_io.size + sizeof(Int64) + sizeof(UInt64) id_type = 0x0001 - id_length = (UInt64(envelope_size & 0xff) << 16) | id_type + id_length = (UInt64(envelope_size) << 16) | id_type + @show id_length payload_ary = take!(temp_io) @@ -531,8 +533,10 @@ function write_rntuple(file::IO, table; file_name="test_ntuple_minimal.root", rn tdirectory32_obs = rnt_write_observe(file, Stubs.tdirectory32) dummy_padding2_obs = rnt_write_observe(file, Stubs.dummy_padding2) - RBlob1_obs = rnt_write_observe(file, Stubs.RBlob1) - rntAnchor_update[:fSeekHeader] = UInt32(position(file)) + RBlob1 = UnROOT.RBlob(; fNbytes = 0x00DC, fVersion = 0x0004, fObjLen = 0x000000BA, fDatime = Stubs.WRITE_TIME, fKeyLen = 34, + fCycle = 0x0001, fSeekKey = position(file), fSeekPdir = 100, fClassName = "RBlob", fName = "", fTitle = "") + RBlob1_update = Dict{Symbol, Any}() + RBlob1_obs = rnt_write_observe(file, RBlob1) field_records, col_records = schema_to_field_column_records(table) rnt_header = UnROOT.RNTupleHeader( zero(UInt64), rntuple_name, "", "ROOT v6.33.01", @@ -540,9 +544,14 @@ function write_rntuple(file::IO, table; file_name="test_ntuple_minimal.root", rn UnROOT.AliasRecord[], UnROOT.ExtraTypeInfo[] ) + rntAnchor_update[:fSeekHeader] = UInt32(position(file)) rnt_header_obs = rnt_write_observe(file, rnt_header) rntAnchor_update[:fNBytesHeader] = rnt_header_obs.len rntAnchor_update[:fLenHeader] = rnt_header_obs.len + RBlob1_update[:fObjLen] = rnt_header_obs.len + RBlob1_update[:fNbytes] = rnt_header_obs.len + 34 + + Base.setindex!(RBlob1_obs, RBlob1_update) RBlob2_obs = rnt_write_observe(file, Stubs.RBlob2) pages = [rnt_ary_to_page(col) for col in input_cols] @@ -587,6 +596,7 @@ function write_rntuple(file::IO, table; file_name="test_ntuple_minimal.root", rn tfile_end_obs = rnt_write_observe(file, Stubs.tfile_end) fileheader_obs[:fEND] = UInt32(position(file)) + flush!(RBlob1_obs) flush!(tkey32_anchor_obs1) flush!(tkey32_anchor_obs2) flush!(tkey32_tfile_obs) diff --git a/test/samples/RNTuple/Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root b/test/samples/RNTuple/Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root index d224465700dcfd7ea221ee805db1eb58c1e73ab5..63c23964c9be5ec1f157e504c6d432c0f4f4568a 100644 GIT binary patch delta 151 zcmaEVo$>v3#tHfYO^qLaHL?l5U+^fmXT^bi?v3#tHfY7H=o~s#X?!zh^;K&x!;4-cNK?<7Hqt!@$D8z)(_FMakeField("one_uint"); auto field2 = model1->MakeField("two_uint"); diff --git a/test/samples/RNTuple/test_ntuple_bit.root b/test/samples/RNTuple/test_ntuple_bit.root index 64c7de263e46f74decbab693d154ed73c93e3fae..c7d7ac34c9a27d8c093f8f305505e64713ec809a 100644 GIT binary patch delta 100 zcmaFK^^$8sK65L_%ZWvf>_Dmv#N1^I7Wp+9L`|N+s0pU`FqVR86Q&|CoyBZ0`6g2& Ym~F~z1QoLe(VJH=Pht>VJrpHCQLucwBHoK65L_^NB^C>_Dmv#5`mR5}C}zI3GlBUc#8g3>FY%Ed$eCtVLk@KWitL i?q)NC@(uVH7#OE8urM&Nd;uA?nTdTOBUo-4hamv!`zJ>L delta 109 zcmX>ucwBHoK6Am3trLqp*@09Uh_Dmv#Jpk)5}7Q*I3GxVp1h55Hg_w>cLpT}Mg|5Zx5@h$ zl_u9Q6$0hHPyWQT3QW&uE(g<+ES+Grb|AGZ(f*ay!|q01t*Qr~m)} delta 140 zcmey&`>|rx=tN7#SFt+$Qg1 zRGM7JR0xziHTe_MDlk2txg1POvUGyg+JV%vOrLy^O>^=!7Cxw)0UrYc;}ixKpwt(j RO{X@ivQA_K%k5;d0sy{+ICTI3 diff --git a/test/samples/RNTuple/test_ntuple_minimal.root b/test/samples/RNTuple/test_ntuple_minimal.root index fbbbc0cada1b0d9d4027e4b5e27429790f7f901b..3837cbbc8b48893df7ea7b54bb3ab94776b6a625 100644 GIT binary patch delta 768 zcmdnNvzJ%5C_lf1f#JI=0|P?}0|VP$Ag%+l?SYsPh(lO_1Q4*i0`jL!G&Gy&z`{L& z0VEn$*5;5tvB*;fNP(C@p-LbQ0b-y@Aiz?{Fu9RQc%lQ33ZpJa4K*hKj6re0rF_6zD|6`J=|MT^v%#63sCIb0ZU{7%%9LS^y6ootR z91w_ojY#)7zTy39Ah@_PL;cyCqaYt21M6IZq%#^>Co{tmAeVswX4f64LxGN%Y|SKD zKLf#MSc2q<8%W|HCMe9EnZQP&5ZKiDV^J5^H1pG!Nt(4l&4<7)UI2EnJ~%d*Q9R4U zumHshnA0tQqM&e_%*V_F#U@4&-!XuFSqrt-;K+gsz90YMfa?3ecKLzrasWj<^W(|Z zELxN2G0O-sazm_v(ag@1&oE2KO=M9C`0!BSCs48ytlI^w+Z3dmrEoGon}Q@L#o#jA hlpB;9!FI8{+FZ@j$p{tzYiFwiYFA<1TW&gq0RVp7$3Xx9 delta 599 zcmdnXyMsr!C_lf1f#JI=0|P?}0|T1{0|V<%Aln{@8G$&21xNq^ODd2*Wul?kL=&SH3Tu#4 zPJR-|o?Q%+r5JTNxBrI##>oMU4w4UGJfK<;ka0jD!l1ywFgb=)`veLkG_cl2;_Ca=PhSCr4}mRPfUt~d4p0>CG$w`xD0<xRL>*W0wE00rDiT0mAJ}L=u+a{nKxK}be1Ju3vNDT|5HLU?07^6Mn;gg@p%ff< zB>cI}R8S~Xf_1xqb(?~9zX6J-Oq?q-c{vLoHz+z0hMFSyEUBAVI~n;w@?dS?!~)XB N33LIQMY-t|1_0~=o=yM& diff --git a/test/samples/RNTuple/test_ntuple_split_3e4.root b/test/samples/RNTuple/test_ntuple_split_3e4.root index 712436f1842ce1fd71594e6e1392488ad1432da6..b61fd93c5ebb8f7cfe34005f33cf97b941bd0e00 100644 GIT binary patch delta 103 zcmcc5cb{)UK65L_&xu98>_Dmv#5`sT64}hgD8&e7C^JQY8Iv2BXMqGJ%d!-M=_po% b$%k1Y!EAX}3#gbih~7Mdbs|KQ4!bb`=&~hD delta 103 zcmcc5cb{)UK6Am3GZTw^*@09UhqLkq9d=^?obWAl diff --git a/test/samples/RNTuple/test_ntuple_stl_containers.root b/test/samples/RNTuple/test_ntuple_stl_containers.root index a4e1f6f3584795f3f8a99c67d85d4138cd47731a..8cf16352885a08532784305acb0f89c6aa583240 100644 GIT binary patch delta 111 zcmdlYzD0aOK65L_yNN~N>_Dmv#Jpe&64@-k_?!vM_{Dq)!Z^<+#t0Ib{DQp@Ovi9^ lLiikDEt6w74EPurn8X-Z7#P@kK!$Bj;}iyKo?OFi0RVaEC(i%? delta 111 zcmdlYzD0aOK6Am3-4lz#*@09Uh Date: Fri, 4 Oct 2024 15:27:24 -0500 Subject: [PATCH 08/21] fix test --- src/RNTuple/Writing/Stubs.jl | 2 +- src/RNTuple/Writing/TFileWriter.jl | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/RNTuple/Writing/Stubs.jl b/src/RNTuple/Writing/Stubs.jl index 38bf68cd..cc87ef6c 100644 --- a/src/RNTuple/Writing/Stubs.jl +++ b/src/RNTuple/Writing/Stubs.jl @@ -1,7 +1,7 @@ module Stubs using ..UnROOT -const WRITE_TIME = 0x76864067 +const WRITE_TIME = 0x7670F8CD const file_preamble = [ 0x72, 0x6F, 0x6F, 0x74, 0x00, 0x00, 0xF7, 0x45, diff --git a/src/RNTuple/Writing/TFileWriter.jl b/src/RNTuple/Writing/TFileWriter.jl index 2a33a935..bef5bfbf 100644 --- a/src/RNTuple/Writing/TFileWriter.jl +++ b/src/RNTuple/Writing/TFileWriter.jl @@ -238,7 +238,6 @@ function _checksum(x::UnROOT.RNTupleHeader) id_type = 0x0001 id_length = (UInt64(envelope_size) << 16) | id_type - @show id_length payload_ary = take!(temp_io) prepend!(payload_ary, reinterpret(UInt8, [id_length])) From 58e487d7951f9915ec13e4522b712df5eb536cdf Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Sat, 5 Oct 2024 05:37:05 -0500 Subject: [PATCH 09/21] fix test --- src/RNTuple/Writing/TFileWriter.jl | 1 - ...DoubleMuParked_Muons_rntuple_1000evts.root | Bin 27631 -> 27639 bytes test/samples/RNTuple/rntuple_minimal_2col.C | 2 +- test/samples/RNTuple/test_ntuple_bit.root | Bin 1385 -> 1385 bytes test/samples/RNTuple/test_ntuple_int_5e4.root | Bin 2247 -> 2247 bytes .../RNTuple/test_ntuple_int_multicluster.root | Bin 1779 -> 1779 bytes test/samples/RNTuple/test_ntuple_minimal.root | Bin 1725 -> 1592 bytes .../RNTuple/test_ntuple_split_3e4.root | Bin 1887 -> 1887 bytes .../RNTuple/test_ntuple_stl_containers.root | Bin 2996 -> 2996 bytes 9 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/RNTuple/Writing/TFileWriter.jl b/src/RNTuple/Writing/TFileWriter.jl index bef5bfbf..bbc3b11f 100644 --- a/src/RNTuple/Writing/TFileWriter.jl +++ b/src/RNTuple/Writing/TFileWriter.jl @@ -261,7 +261,6 @@ function rnt_write(io::IO, x::UnROOT.RNTupleHeader; envelope=true) id_type = 0x0001 id_length = (UInt64(envelope_size) << 16) | id_type - @show id_length payload_ary = take!(temp_io) diff --git a/test/samples/RNTuple/Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root b/test/samples/RNTuple/Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root index 63c23964c9be5ec1f157e504c6d432c0f4f4568a..fe90193918ddbce6523c9976c7574c312bfec22a 100644 GIT binary patch delta 984 zcmaEVo$>p1M*E`t{1OI+@2(6C3@Ho@+24V9Dv+H7#Ed{ZfdxpUGB9KTIgC>n7&+}& zo0^#g-*5b%+q2@pzV{Oy)p!{g&M<(Km6UabBu*@9bq7))CQxV@$Os??8Vv%O(U>Mc zWMCxYJ?1wI46NTl`X}2l%Ga-EWcbd?ps`i|Z^CyLUS5VneHP{c*;g1DcAYtM#w0n- z;&F%Cr4KnFj@xqW?Jw^?xwVL8OWQZuTC;zR4VGMowu-K3>6*P_m0)0Y@WZDSQfv~E z(jhF9d?OrEcwIuS_c_?Ay}YH$-!9UkbE<3G^rYL8nl5{H-pSZysh=BTU$&-xCR6gk z=@qM1x>|%x%aohJYit%9o>tAw9I-dg&!{-z>oc1PI-UQ-wjC=w=Qp`DX^CQo~m*KTEMv1S;^HiwSFe^117U_Fy#}nZcd46{%GnXE|sa%CCzklJr z=*T%EOl$3JGNdv_w&r-g*;b( zv|P>FQX{hj7~d_RXuL52oD8(UDG3FZ(wR8^jO9jIpWLjCTW3+jr?CQE1NqFR*!O6@?9;W{}!LqP>*mBp9;M}Qg`41gB8 zFm?i2d(u6bd*(A)nFmf@oT1DOa<3Q2GZ}{`U(5*f-U2cNlv*KlMm~gQ2!YZIK(qr8 zhs`sw|1rHW7|2`(&MJQ3fQbN^1H+gj?KbjRLlYeG%gT)*`O0yU@^JjH3 X@`Ky~)(g(6AiZ25>Fn?2rc)RIn2=W) delta 965 zcmexv3M*E`t{1OI+@2(6C3@Ho@+3$h47syTmVn!gIzyc&v85lBu0{K%I7@HbD z{%T|se81pPZqJGX``%A0&R_ajzc>x<~~jH>@+f*rIX6P_U%TlH)UxVvr9WNv^nNxeY~+g z&s=bl3ahB>EFSJ&&Msa?&Q{;)TNEaHIDdV^dPQYv`f?qf9+hJqwT5TE3kR`vf4%Xr zq&R8UX5PCO>a#k|sQNoxJ)^=W(pI?ab=|K?*W4z5x<9WWVD0kR!B=9o&a>ovqI&il z-?q8$=gil=)jpxlbdf@r2}{Gy`O9ucP4{)=xpnLGgB?HlcRr0`d%sRBc|+CzjsGv{ z{?}CQ<7QsFDOa>d<8?vIcYB9BH@l4f%da=kV~t(#agVc-t7q!Wdgc#IoGH(CFi!q3 zxjg$${np;{b=T%7J~~y@HgEle#fb;j%`$m;W!^rU6L#L=ML{8-CY_0$v%y4_`QSm0 zEe>BUI76)_2ZDS2KP}cmUH+N((6ZZcG42zZN)U0OOXK4HCi3Y?}?3b5q1Y$p$W&-UX3N z@0z?NU6o^c-Q&%deg4dy{4iZq*MRvas5hsW&FC&QRtCxz7va_>A3?&t{rT=FOCKUjs3U^(@rLbO_B50;Ly#Xa^u>-g@ti z4O`H4AafZwoA@EJNoMfm!puN4^X7pTFR6DXDazT9*Q F0|19CRRI71 diff --git a/test/samples/RNTuple/rntuple_minimal_2col.C b/test/samples/RNTuple/rntuple_minimal_2col.C index 4e835d84..cd0cbafc 100644 --- a/test/samples/RNTuple/rntuple_minimal_2col.C +++ b/test/samples/RNTuple/rntuple_minimal_2col.C @@ -12,7 +12,7 @@ void rntuple_minimal_2col() { auto writeOptions = RNTupleWriteOptions(); writeOptions.SetCompression(0); - std::string rootFileName1{"test_ntuple_minimal.root"}; + std::string rootFileName1{"test_ntuple_minimal_2col.root"}; auto model1 = RNTupleModel::Create(); auto field1 = model1->MakeField("one_uint"); auto field2 = model1->MakeField("two_uint"); diff --git a/test/samples/RNTuple/test_ntuple_bit.root b/test/samples/RNTuple/test_ntuple_bit.root index c7d7ac34c9a27d8c093f8f305505e64713ec809a..8fddbeb432fa33a46b62a0cfd4698be608245667 100644 GIT binary patch delta 100 zcmaFK^^$8sK66(H$HXE>b|6&-V(zj9i~O1lq9#vZ)CALe7)!yl2~!c6&SEy0e3K~> X%r<2_Dmv#N1^I7Wp+9L`|N+s0pU`FqVR86Q&|CoyBZ0`6g2& Ym~F~z1QoLe(VJH=PhucwBHoK66(H`@|wob|6&-Vji*uiA-i+dpS2TA ice9y6`38Ip42)A4SQr>szJQF{%)~yC5iB>2!w>*w(jb!n delta 109 zcmX>ucwBHoK65L_^NB^C>_Dmv#5`mR5}C}zI3GlBUc#8g3>FY%Ed$eCtVLk@KWitL i?q)NC@(uVH7#OE8urM&Nd;uA?nTdTOBUo-4hamv!`zJ>L diff --git a/test/samples/RNTuple/test_ntuple_int_multicluster.root b/test/samples/RNTuple/test_ntuple_int_multicluster.root index 34439bc85ea7094cdab80fb81864b4901a376596..88480da3af22dec9736c1b416acfd29638de36e5 100644 GIT binary patch delta 140 zcmey&`_Dmv#Jpk)5}7Q*I3GxVp1h55Hg_w>cLpT}Mg|5Zx5@h$ zl_u9Q6$0hHPyWQT3QW&uE(g<+ES+Grb|AGZ(f*ay!|q01t*Qr~m)} diff --git a/test/samples/RNTuple/test_ntuple_minimal.root b/test/samples/RNTuple/test_ntuple_minimal.root index 3837cbbc8b48893df7ea7b54bb3ab94776b6a625..398c90f16f65fdeddc1d72a95c4a2193060b0f09 100644 GIT binary patch delta 599 zcmdnXyMsr!C_lf1f#JI=0|P?}0|T1{0|V<%Aln{@8G$&21xNq^ODd2*Wul?kLZfYt8;D^da*`voYQ!W!h1 zlb-~#XBWd{DMnq+?f)TwadH5ogX9Ak52#iIWE>E1Gbk`HOpale&q&?dd8|sYa}!Wd z4{SUO!g$6DKvB5y=YT-$Yec%w@eS{R;`6|&Ymij`LsreqPy^&LFu=^8+{>gQdH~5O zXJG8f@0i5HK7j%W4W#U=n47Wm=L4YdA+Ti&5SB5`0gA$%#>B7y$VC9SrP0heMi6%} zfZe0O1W{zUeVet8MdC~#uMcdrAJ}LIP@po$O+LV)HCdTOMhF<75CEl__Dv3Ckx&Yb zI}-lfW-2HYD#5y4z`9Mry59grQzp)pnY^5Zj~f)72t!Q~e3sNrteuSfAbGGhaAE;z O;{>{Z&7$0N3IhPUoRNe8 delta 768 zcmdnNvzJ%5C_lf1f#JI=0|P?}0|VP$Ag%+l?SYsPh(lO_1Q4*i0`jL!G&Gy&z`{L& z0VEn$*5;5tvB*;fNP(C@p-LbQ0b-y@Aiz?{Fu9RQc%lQ33ZpJa4K*hKj6re0rF_6zD|6`J=|MT^v%#63sCIb0ZU{7%%9LS^y6ootR z91w_ojY#)7zTy39Ah@_PL;cyCqaYt21M6IZq%#^>Co{tmAeVswX4f64LxGN%Y|SKD zKLf#MSc2q<8%W|HCMe9EnZQP&5ZKiDV^J5^H1pG!Nt(4l&4<7)UI2EnJ~%d*Q9R4U zumHshnA0tQqM&e_%*V_F#U@4&-!XuFSqrt-;K+gsz90YMfa?3ecKLzrasWj<^W(|Z zELxN2G0O-sazm_v(ag@1&oE2KO=M9C`0!BSCs48ytlI^w+Z3dmrEoGon}Q@L#o#jA hlpB;9!FI8{+FZ@j$p{tzYiFwiYFA<1TW&gq0RVp7$3Xx9 diff --git a/test/samples/RNTuple/test_ntuple_split_3e4.root b/test/samples/RNTuple/test_ntuple_split_3e4.root index b61fd93c5ebb8f7cfe34005f33cf97b941bd0e00..2c6205d4326ef75d0c59e007abc2f179c6f56155 100644 GIT binary patch delta 103 zcmcc5cb{)UK66)y b_Dmv#5`sT64}hgD8&e7C^JQY8Iv2BXMqGJ%d!-M=_po% b$%k1Y!EAX}3#gbih~7Mdbs|KQ4!bb`=&~hD diff --git a/test/samples/RNTuple/test_ntuple_stl_containers.root b/test/samples/RNTuple/test_ntuple_stl_containers.root index 8cf16352885a08532784305acb0f89c6aa583240..6f7014edc039ed22726de73330e5ae7ef1860e40 100644 GIT binary patch delta 111 zcmdlYzD0aOK66(H@5G{Tb|6&-VqUNXiEI{Ne9i=B{9?WYVVq|ZV+4sze!*S{reiod lA$$(7mdP<327C+*OkxZy3=C{NAj3ANaSDSqPp;v%008Y$ArAlm delta 111 zcmdlYzD0aOK65L_yNN~N>_Dmv#Jpe&64@-k_?!vM_{Dq)!Z^<+#t0Ib{DQp@Ovi9^ lLiikDEt6w74EPurn8X-Z7#P@kK!$Bj;}iyKo?OFi0RVaEC(i%? From 87cd67b2af49ec302529e33c40f7dd93f863b7f9 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Sat, 5 Oct 2024 06:24:43 -0500 Subject: [PATCH 10/21] fix test --- src/RNTuple/Writing/constants.jl | 6 +- src/RNTuple/Writing/page_writing.jl | 70 +++++++++++++----- test/samples/RNTuple/rntuple_minimal.C | 1 + test/samples/RNTuple/test_ntuple_minimal.root | Bin 1592 -> 1604 bytes 4 files changed, 56 insertions(+), 21 deletions(-) diff --git a/src/RNTuple/Writing/constants.jl b/src/RNTuple/Writing/constants.jl index b70a2b2c..d63f8e73 100644 --- a/src/RNTuple/Writing/constants.jl +++ b/src/RNTuple/Writing/constants.jl @@ -2,9 +2,9 @@ const RNTUPLE_WRITE_TYPE_IDX_DICT = Dict( Float64 => (0x10, sizeof(UInt64) * 8), Float32 => (0x11, sizeof(UInt32) * 8), Float16 => (0x12, sizeof(UInt16) * 8), - UInt64 => (0x13, sizeof(UInt64) * 8), - UInt32 => (0x14, sizeof(UInt32) * 8), - UInt16 => (0x15, sizeof(UInt16) * 8), + UInt64 => (0x0A, sizeof(UInt64) * 8), + UInt32 => (0x0B, sizeof(UInt32) * 8), + UInt16 => (0x0C, sizeof(UInt16) * 8), Int64 => (0x16, sizeof(Int64) * 8), Int32 => (0x17, sizeof(Int32) * 8), Int16 => (0x18, sizeof(Int16) * 8), diff --git a/src/RNTuple/Writing/page_writing.jl b/src/RNTuple/Writing/page_writing.jl index 026a11e7..3075badb 100644 --- a/src/RNTuple/Writing/page_writing.jl +++ b/src/RNTuple/Writing/page_writing.jl @@ -1,48 +1,82 @@ """ - rnt_ary_to_page(ary::AbstractVector) end + rnt_ary_to_page(ary::AbstractVector, cr::ColumnRecord) end Turns an AbstractVector into a page of an RNTuple. The element type must be primitive for this to work. """ -function rnt_ary_to_page(ary::AbstractVector) end +function rnt_ary_to_page(ary::AbstractVector, cr::ColumnRecord) end -function rnt_ary_to_page(ary::AbstractVector{Float64}) - Page_write(split8_encode(reinterpret(UInt8, ary))) +function rnt_ary_to_page(ary::AbstractVector{Float64}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) + if split + Page_write(split8_encode(reinterpret(UInt8, ary))) + else + Page_write(reinterpret(UInt8, ary)) + end end -function rnt_ary_to_page(ary::AbstractVector{Float32}) - Page_write(split4_encode(reinterpret(UInt8, ary))) +function rnt_ary_to_page(ary::AbstractVector{Float32}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) + if split + Page_write(split4_encode(reinterpret(UInt8, ary))) + else + Page_write(reinterpret(UInt8, ary)) + end end -function rnt_ary_to_page(ary::AbstractVector{Float16}) - Page_write(split2_encode(reinterpret(UInt8, ary))) +function rnt_ary_to_page(ary::AbstractVector{Float16}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) + if split + Page_write(split2_encode(reinterpret(UInt8, ary))) + else + Page_write(reinterpret(UInt8, ary)) + end end -function rnt_ary_to_page(ary::AbstractVector{UInt64}) - Page_write(split8_encode(reinterpret(UInt8, ary))) +function rnt_ary_to_page(ary::AbstractVector{UInt64}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) + if split + Page_write(split8_encode(reinterpret(UInt8, ary))) + else + Page_write(reinterpret(UInt8, ary)) + end end -function rnt_ary_to_page(ary::AbstractVector{UInt32}) - Page_write(split4_encode(reinterpret(UInt8, ary))) +function rnt_ary_to_page(ary::AbstractVector{UInt32}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) + if split + Page_write(split4_encode(reinterpret(UInt8, ary))) + else + Page_write(reinterpret(UInt8, ary)) + end end -function rnt_ary_to_page(ary::AbstractVector{UInt16}) - Page_write(split2_encode(reinterpret(UInt8, ary))) +function rnt_ary_to_page(ary::AbstractVector{UInt16}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) + if split + Page_write(split2_encode(reinterpret(UInt8, ary))) + else + Page_write(reinterpret(UInt8, ary)) + end end -function rnt_ary_to_page(ary::AbstractVector{Int64}) +function rnt_ary_to_page(ary::AbstractVector{Int64}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) Page_write(reinterpret(UInt8, ary)) end -function rnt_ary_to_page(ary::AbstractVector{Int32}) +function rnt_ary_to_page(ary::AbstractVector{Int32}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) Page_write(reinterpret(UInt8, ary)) end -function rnt_ary_to_page(ary::AbstractVector{Int16}) +function rnt_ary_to_page(ary::AbstractVector{Int16}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) Page_write(reinterpret(UInt8, ary)) end -function rnt_ary_to_page(ary::AbstractVector{Int8}) +function rnt_ary_to_page(ary::AbstractVector{Int8}, cr::ColumnRecord) + (;split, zigzag, delta) = _detect_encoding(cr.type) Page_write(reinterpret(UInt8, ary)) end diff --git a/test/samples/RNTuple/rntuple_minimal.C b/test/samples/RNTuple/rntuple_minimal.C index cf6e7586..fe94228e 100644 --- a/test/samples/RNTuple/rntuple_minimal.C +++ b/test/samples/RNTuple/rntuple_minimal.C @@ -21,3 +21,4 @@ void rntuple_minimal() { *field1 = 3469659854; ntuple1->Fill(); } + diff --git a/test/samples/RNTuple/test_ntuple_minimal.root b/test/samples/RNTuple/test_ntuple_minimal.root index 398c90f16f65fdeddc1d72a95c4a2193060b0f09..c05f787b704186bf8b9b048b1d691aeec4729829 100644 GIT binary patch delta 415 zcmdnNbA(5?C_lf1f#JI=0|P?}0|T225VHc=_CU-C#33v|0ti?Nf&3{G4b3Jxuy9Xc z0Evc`btUvqEb@|0=m)WYB9%ZK0>nUrK!EuN!{kOL;fW5s+;_k_c7fDQW@5a^Z3X5F zfcf_rCA7{V0sU|8>CdwR1A!*Y11qZm8?OX%4-?m95he>pmdU zEb5l4voya4^7_C= z_<@aZ0BK;(nrzLYHF+MhF5{`mXP71APVI>+-6<9&3{+eRR_p>+YzkKVV=_ORf+QsP jup4E@1q?2*$t;DNt691jL42@gHddf!6;_vW(k>sTbt1oHa8M)-k^Z~(c3 zIc{jv;&Y69CsxAxy@9NA1c9mUBG%x!Fu0J=3~+40tOMnC@nEic!E^2 hd_ma4lDfH_rHc`y6s(i=Cs3yXC(wR2i*nN`3;?C_R0#k8 From 98b588085b6922622011f023317a4c73b36295bd Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Sat, 5 Oct 2024 06:29:59 -0500 Subject: [PATCH 11/21] fix test --- test/samples/RNTuple/test_ntuple_minimal.root | Bin 1604 -> 1592 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/test/samples/RNTuple/test_ntuple_minimal.root b/test/samples/RNTuple/test_ntuple_minimal.root index c05f787b704186bf8b9b048b1d691aeec4729829..7d91b280006cabead4a6098ef14fc8daccb4666a 100644 GIT binary patch delta 434 zcmX@Yvx7&sC_lf1f#JI=0|P?}0|T1{0|V<%Aln{@8G$&21xNq^ODd2*Wul?kLk>sTbt1oHa8M)-k^Z~(c3 zIc{jv;&Y69CsxAxy@9NA1c9mUBG%x!Fu0J=3~+40tOMnC@nEic!E^2 hd_ma4lDfH_rHc`y6s(i=Cs3yXC(wR2i*nN`3;?F0Sls{s delta 415 zcmdnNbA(5?C_lf1f#JI=0|P?}0|T225VHc=_CU-C#33v|0ti?Nf&3{G4b3Jxuy9Xc z0Evc`btUvqEb@|0=m)WYB9%ZK0>nUrK!EuN!{kOL;fW5s+;_k_c7fDQW@5a^Z3X5F zfcf_rCA7{V0sU|8>CdwR1A!*Y11qZm8?OX%4-?m95he>pmdU zEb5l4voya4^7_C= z_<@aZ0BK;(nrzLYHF+MhF5{`mXP71APVI>+-6<9&3{+eRR_p>+YzkKVV=_ORf+QsP jup4E@1q?2*$t;DNt691jL42@gHddf!6;_vW( Date: Sat, 5 Oct 2024 14:04:16 +0200 Subject: [PATCH 12/21] fix tests --- src/RNTuple/Writing/Stubs.jl | 5 ++-- src/RNTuple/Writing/TFileWriter.jl | 2 +- test/RNTupleWriting/lowlevel.jl | 31 ++++----------------- test/runtests.jl | 44 +++++++++++++++--------------- 4 files changed, 31 insertions(+), 51 deletions(-) diff --git a/src/RNTuple/Writing/Stubs.jl b/src/RNTuple/Writing/Stubs.jl index cc87ef6c..e55d9450 100644 --- a/src/RNTuple/Writing/Stubs.jl +++ b/src/RNTuple/Writing/Stubs.jl @@ -1,7 +1,8 @@ module Stubs using ..UnROOT -const WRITE_TIME = 0x7670F8CD +const WRITE_TIME = 0x768A676E +const WRITE_TIME_ary = reverse(reinterpret(UInt8, [WRITE_TIME])) const file_preamble = [ 0x72, 0x6F, 0x6F, 0x74, 0x00, 0x00, 0xF7, 0x45, @@ -91,7 +92,7 @@ const tsreamerinfo_compressed = [ ] const tfile_end = [ - 0x00, 0x00, 0x00, 0x3F, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x76, 0x70, 0xF8, 0xCD, 0x00, 0x35, + 0x00, 0x00, 0x00, 0x3F, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, WRITE_TIME_ary..., 0x00, 0x35, 0x00, 0x01, 0x00, 0x00, 0x05, 0xF9, 0x00, 0x00, 0x00, 0x64, 0x00, 0x18, 0x74, 0x65, 0x73, 0x74, 0x5F, 0x6E, 0x74, 0x75, 0x70, 0x6C, 0x65, 0x5F, 0x6D, 0x69, 0x6E, 0x69, 0x6D, 0x61, 0x6C, 0x2E, 0x72, 0x6F, 0x6F, 0x74, 0x00, 0x00, 0x01, 0x00, 0x00, 0x06, 0x38, 0x77, 0x35, 0x94, 0x00, diff --git a/src/RNTuple/Writing/TFileWriter.jl b/src/RNTuple/Writing/TFileWriter.jl index bbc3b11f..91eb1451 100644 --- a/src/RNTuple/Writing/TFileWriter.jl +++ b/src/RNTuple/Writing/TFileWriter.jl @@ -552,7 +552,7 @@ function write_rntuple(file::IO, table; file_name="test_ntuple_minimal.root", rn Base.setindex!(RBlob1_obs, RBlob1_update) RBlob2_obs = rnt_write_observe(file, Stubs.RBlob2) - pages = [rnt_ary_to_page(col) for col in input_cols] + pages = [rnt_ary_to_page(col, cr) for (col, cr) in zip(input_cols, col_records)] pages_obses = [rnt_write_observe(file, page) for page in pages] RBlob3_obs = rnt_write_observe(file, Stubs.RBlob3) diff --git a/test/RNTupleWriting/lowlevel.jl b/test/RNTupleWriting/lowlevel.jl index 405da977..2667d213 100644 --- a/test/RNTupleWriting/lowlevel.jl +++ b/test/RNTupleWriting/lowlevel.jl @@ -1,10 +1,9 @@ -using UnROOT: rnt_write, RNTupleFrame, ClusterSummary, PageDescription, Write_RNTupleListFrame, RBlob +using UnROOT: rnt_write, RNTupleFrame, ClusterSummary, PageDescription, Write_RNTupleListFrame, RBlob, Stubs using XXHashNative: xxh3_64 using Tables: columntable using Random -const WRITE_TIME = 0x7670F8CD -const WRITE_TIME_ary = reverse(reinterpret(UInt8, [WRITE_TIME])) +const WRITE_TIME_ary = Stubs.WRITE_TIME_ary const REFERENCE_BYTES = read(joinpath(@__DIR__, "../samples/RNTuple/test_ntuple_minimal.root")) @@ -105,9 +104,7 @@ test_io(UnROOT.Stubs.rnt_header, dummy_rnt_header_payload; envelope=false) # ==================================== side tests end ==================================== -dummy_rnt_header = [ - 0x01, 0x00, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, dummy_rnt_header_payload..., 0x28, 0x7E, 0xC6, 0x09, 0xC0, 0x59, 0xEC, 0x3D, -] +dummy_rnt_header = [0x01, 0x00, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, dummy_rnt_header_payload..., 0x28, 0x7E, 0xC6, 0x09, 0xC0, 0x59, 0xEC, 0x3D] test_io(UnROOT.Stubs.rnt_header, dummy_rnt_header; envelope=true) dummy_RBlob2 = [ @@ -155,9 +152,7 @@ test_io(UnROOT.Stubs.pagelink, dummy_pagelink_noenvelope; envelope=false) # ================= side tests end ================= -dummy_pagelink = [ - 0x03, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, dummy_pagelink_noenvelope..., -] +dummy_pagelink = [0x03, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, dummy_pagelink_noenvelope...] dummy_pagelink = [dummy_pagelink; reinterpret(UInt8, [xxh3_64(dummy_pagelink)])] test_io(UnROOT.Stubs.pagelink, dummy_pagelink) @@ -216,29 +211,13 @@ dummy_tkey32_TStreamerInfo = [ test_io(UnROOT.Stubs.tkey32_TStreamerInfo, dummy_tkey32_TStreamerInfo) -MINE = [ - UnROOT.Stubs.file_preamble; - dummy_FileHeader; UnROOT.Stubs.dummy_padding1; - dummy_tkey32_tfile; dummy_tfile; - dummy_tdirectory32; UnROOT.Stubs.dummy_padding2; - dummy_RBlob1; dummy_rnt_header; - dummy_RBlob2; UnROOT.Stubs.page1; reinterpret(UInt8, [xxh3_64(UnROOT.Stubs.page1)]); - dummy_RBlob3; dummy_pagelink; - dummy_RBlob4; dummy_rnt_footer; - dummy_tkey32_anchor; UnROOT.Stubs.magic_6bytes; dummy_rnt_anchor; - dummy_tkey32_TDirectory; UnROOT.Stubs.n_keys; dummy_tkey32_anchor; - dummy_tkey32_TStreamerInfo; UnROOT.Stubs.tsreamerinfo_compressed; - UnROOT.Stubs.tfile_end -] - mytable = Dict("one_uint" => UInt32[0xcececece]) myio = IOBuffer() UnROOT.write_rntuple(myio, mytable; rntuple_name="myntuple") -@test MINE == REFERENCE_BYTES mio = take!(myio) write("/tmp/mine.root", mio) -@test MINE == mio +@test mio == REFERENCE_BYTES end @testset "RNTuple Writing - Single colunm round trips" begin diff --git a/test/runtests.jl b/test/runtests.jl index d4be502c..3e89fa05 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,30 +4,30 @@ using UnROOT nthreads = UnROOT._maxthreadid() nthreads == 1 && @warn "Running on a single thread. Please re-run the test suite with at least two threads (`julia --threads 2 ...`)" -@testset "UnROOT tests" verbose = true begin - include("Aqua.jl") - include("bootstrapping.jl") - include("compressions.jl") - include("jagged.jl") - include("lazy.jl") - include("histograms.jl") - include("views.jl") - include("multithreading.jl") - include("remote.jl") - include("displays.jl") - include("type_stability.jl") - include("utils.jl") - include("misc.jl") +# @testset "UnROOT tests" verbose = true begin +# include("Aqua.jl") +# include("bootstrapping.jl") +# include("compressions.jl") +# include("jagged.jl") +# include("lazy.jl") +# include("histograms.jl") +# include("views.jl") +# include("multithreading.jl") +# include("remote.jl") +# include("displays.jl") +# include("type_stability.jl") +# include("utils.jl") +# include("misc.jl") - include("type_support.jl") - include("custom_bootstrapping.jl") - include("lorentzvectors.jl") - include("NanoAOD.jl") +# include("type_support.jl") +# include("custom_bootstrapping.jl") +# include("lorentzvectors.jl") +# include("NanoAOD.jl") - include("issues.jl") +# include("issues.jl") - if VERSION >= v"1.9" +# if VERSION >= v"1.9" include("rntuple.jl") include("./RNTupleWriting/lowlevel.jl") - end -end + # end +# end From b1c204061c43c05cdece8819e6d5dfcd469bc75c Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Sat, 5 Oct 2024 07:19:17 -0500 Subject: [PATCH 13/21] fix C++ names --- src/RNTuple/Writing/constants.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RNTuple/Writing/constants.jl b/src/RNTuple/Writing/constants.jl index d63f8e73..953f9afc 100644 --- a/src/RNTuple/Writing/constants.jl +++ b/src/RNTuple/Writing/constants.jl @@ -13,8 +13,8 @@ const RNTUPLE_WRITE_TYPE_IDX_DICT = Dict( const RNTUPLE_WRITE_TYPE_CPPNAME_DICT = Dict( Float16 => "std::float16_t", - Float32 => "std::float32_t", - Float64 => "std::float64_t", + Float32 => "float", + Float64 => "double", Int8 => "std::int8_t", Int16 => "std::int16_t", Int32 => "std::int32_t", From 8493629b10fb0515e5f15639ea6cd8e38ec9e26b Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Sat, 5 Oct 2024 07:24:13 -0500 Subject: [PATCH 14/21] uncomment tests --- test/runtests.jl | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 3e89fa05..d4be502c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,30 +4,30 @@ using UnROOT nthreads = UnROOT._maxthreadid() nthreads == 1 && @warn "Running on a single thread. Please re-run the test suite with at least two threads (`julia --threads 2 ...`)" -# @testset "UnROOT tests" verbose = true begin -# include("Aqua.jl") -# include("bootstrapping.jl") -# include("compressions.jl") -# include("jagged.jl") -# include("lazy.jl") -# include("histograms.jl") -# include("views.jl") -# include("multithreading.jl") -# include("remote.jl") -# include("displays.jl") -# include("type_stability.jl") -# include("utils.jl") -# include("misc.jl") +@testset "UnROOT tests" verbose = true begin + include("Aqua.jl") + include("bootstrapping.jl") + include("compressions.jl") + include("jagged.jl") + include("lazy.jl") + include("histograms.jl") + include("views.jl") + include("multithreading.jl") + include("remote.jl") + include("displays.jl") + include("type_stability.jl") + include("utils.jl") + include("misc.jl") -# include("type_support.jl") -# include("custom_bootstrapping.jl") -# include("lorentzvectors.jl") -# include("NanoAOD.jl") + include("type_support.jl") + include("custom_bootstrapping.jl") + include("lorentzvectors.jl") + include("NanoAOD.jl") -# include("issues.jl") + include("issues.jl") -# if VERSION >= v"1.9" + if VERSION >= v"1.9" include("rntuple.jl") include("./RNTupleWriting/lowlevel.jl") - # end -# end + end +end From 2f0ce872991a6eef95c40ba53e4f023d500cb732 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Sat, 5 Oct 2024 12:07:52 -0400 Subject: [PATCH 15/21] Delete pixi.toml --- pixi.toml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 pixi.toml diff --git a/pixi.toml b/pixi.toml deleted file mode 100644 index e17ac182..00000000 --- a/pixi.toml +++ /dev/null @@ -1,12 +0,0 @@ -[project] -authors = ["Moelf "] -channels = ["https://root.cern/download/conda-nightly/latest", "conda-forge"] -description = "Add a short description here" -name = "UnROOT" -platforms = ["linux-64"] -version = "0.1.0" - -[tasks] - -[dependencies] -root-nightly = ">=6.31.0,<7" From 88d4e34b7248f3438c193a9811bbd48324f3b85f Mon Sep 17 00:00:00 2001 From: Moelf Date: Mon, 7 Oct 2024 15:25:58 +0200 Subject: [PATCH 16/21] format --- test/samples/RNTuple/rntuple_minimal.C | 1 - 1 file changed, 1 deletion(-) diff --git a/test/samples/RNTuple/rntuple_minimal.C b/test/samples/RNTuple/rntuple_minimal.C index fe94228e..cf6e7586 100644 --- a/test/samples/RNTuple/rntuple_minimal.C +++ b/test/samples/RNTuple/rntuple_minimal.C @@ -21,4 +21,3 @@ void rntuple_minimal() { *field1 = 3469659854; ntuple1->Fill(); } - From 2e7a1c92629e0f083de829bc9901f97c3801288e Mon Sep 17 00:00:00 2001 From: Moelf Date: Mon, 7 Oct 2024 15:38:55 +0200 Subject: [PATCH 17/21] add cvmfs ci --- .github/workflows/cvmfs.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/cvmfs.yml diff --git a/.github/workflows/cvmfs.yml b/.github/workflows/cvmfs.yml new file mode 100644 index 00000000..743986e0 --- /dev/null +++ b/.github/workflows/cvmfs.yml @@ -0,0 +1,27 @@ +name: CVMFS generate root files +on: + pull_request: + branches: + - main + push: + branches: + - main + tags: '*' +jobs: + test: + name: Gen rntuple test files ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.allow_failure }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-22.04] + arch: [x64] + allow_failure: [false] + steps: + - uses: actions/checkout@v2 + - uses: cvmfs-contrib/github-action-cvmfs@v4 + - name: Generate root files + run: | + source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-ubuntu2204-gcc11-opt/setup.sh + root --version From 01fb46ef39b034a53f50763f954280fcb8380da5 Mon Sep 17 00:00:00 2001 From: Moelf Date: Fri, 11 Oct 2024 22:59:24 +0200 Subject: [PATCH 18/21] add C++ ROOT readback test --- .github/workflows/cvmfs.yml | 17 +++++++++++++---- test/RNTupleWriting/output_sample.jl | 11 +++++++++++ test/RNTupleWriting/test1.py | 9 +++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 test/RNTupleWriting/output_sample.jl create mode 100644 test/RNTupleWriting/test1.py diff --git a/.github/workflows/cvmfs.yml b/.github/workflows/cvmfs.yml index 743986e0..bd519dec 100644 --- a/.github/workflows/cvmfs.yml +++ b/.github/workflows/cvmfs.yml @@ -1,4 +1,4 @@ -name: CVMFS generate root files +name: Test C++ ROOT read back on: pull_request: branches: @@ -9,7 +9,7 @@ on: tags: '*' jobs: test: - name: Gen rntuple test files ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: C++ ROOT read back rntuple files ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.allow_failure }} strategy: @@ -20,8 +20,17 @@ jobs: allow_failure: [false] steps: - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 + - name: Generate root file + run: | + julia --project ./test/RNTupleWriting/output_sample.jl test1.root - uses: cvmfs-contrib/github-action-cvmfs@v4 - - name: Generate root files + - name: Read root file in C++ run: | source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-ubuntu2204-gcc11-opt/setup.sh - root --version + python ./test/RNTupleWriting/test1.py test1.root diff --git a/test/RNTupleWriting/output_sample.jl b/test/RNTupleWriting/output_sample.jl new file mode 100644 index 00000000..094be4bf --- /dev/null +++ b/test/RNTupleWriting/output_sample.jl @@ -0,0 +1,11 @@ +using UnROOT + +Nitems = 10 +data = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14] +newtable = Dict( + "x1" => Float64.(data), + "x2" => Float32.(data), + "x3" => Int32.(data), + "y1" => UInt16.(data), +) +UnROOT.write_rntuple(open(only(ARGS), "w"), newtable; rntuple_name="myntuple") diff --git a/test/RNTupleWriting/test1.py b/test/RNTupleWriting/test1.py new file mode 100644 index 00000000..400785ae --- /dev/null +++ b/test/RNTupleWriting/test1.py @@ -0,0 +1,9 @@ +import ROOT +import sys + +df = ROOT.RDataFrame("myntuple", sys.argv[1]) +if len(list(df.GetColumnNames())) != 4: + sys.exit(1) + +if list(df.Take['std::int32_t']("x3")) != [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]: + sys.exit(1) From 09cc6c9160620803547aa01bcc5a54fbd4f6042f Mon Sep 17 00:00:00 2001 From: Moelf Date: Fri, 11 Oct 2024 23:08:29 +0200 Subject: [PATCH 19/21] increase compat --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 37cb96a1..4ef78214 100644 --- a/Project.toml +++ b/Project.toml @@ -59,14 +59,14 @@ PrettyTables = "^2.1" Random = "^1.0" SHA = "^0.7, ^1.0" SentinelArrays = "^1.3" -StaticArrays = "^1" +StaticArrays = "^1.5" StructArrays = "0.6" TOML = "^1.0" Tables = "^1.9" Test = "^1.0" XRootD = "^0.1" XXHashNative = "^1.0.1" -julia = "^1.7" +julia = "^1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" From 5644f36f89e7a477f42d5f224685e0129583913e Mon Sep 17 00:00:00 2001 From: Moelf Date: Fri, 11 Oct 2024 23:10:11 +0200 Subject: [PATCH 20/21] bump julia compat and CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eb9f2ab..e6e17968 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,15 +16,15 @@ jobs: fail-fast: false matrix: version: - - '1.7' - - '1.8' + - 'lts' - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. + - 'pre' os: [ubuntu-latest] arch: [x64] allow_failure: [false] steps: - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} From ae035f51f656e62b85a2191d32b8ee6da3bb80ed Mon Sep 17 00:00:00 2001 From: Moelf Date: Sat, 12 Oct 2024 00:01:29 +0200 Subject: [PATCH 21/21] bump HTTP compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 4ef78214..24ffc652 100644 --- a/Project.toml +++ b/Project.toml @@ -43,7 +43,7 @@ CodecXz = "^0.7" CodecZstd = "^0.8" DataFrames = "^1.5" FHist = "^0.10, ^0.11" -HTTP = "^1" +HTTP = "^1.10" InteractiveUtils = "^1.0" IterTools = "^1" LRUCache = "^1.3.0"