-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Artifact system to ship test .root files #173
Comments
Where can I download the file (as a |
Or maybe the question should be "where should the file be uploaded to?" |
yeah right now they are https://github.com/JuliaHEP/UnROOT.jl/tree/master/test/samples we can upload to a repo in JuliaHEP, and then you can point to URLs like: https://pkgdocs.julialang.org/v1/artifacts/#Basic-Usage |
Makes sense. Can I be a member of JuliaHEP and do that? |
Yep sure, I invited you 🙂 We can figure out the details of that repository later. |
According to https://pkgdocs.julialang.org/v1/artifacts/, it seems that we need to compress those sample files before we can list them as Artifacts. Should they be compressed separately, or packed into a single The latter would be easier, since if we have a |
I believe they have to be |
I created another I stole a call related to those samples and adopt the change. Now it looks like julia> using UnROOT
julia> ROOTFile(joinpath(artifact"flat_sample_tar", "km3net_online.root"))
ROOTFile with 10 entries and 54 streamers.
/Users/yuanrulin/.julia/artifacts/75217ef39ca402609e402e1143faf3bac86f218b/km3net_online.root
├─ E (TTree)
│ └─ "Evt"
├─ KM3NET_TIMESLICE (TTree)
│ └─ "KM3NET_TIMESLICE"
├─ KM3NET_TIMESLICE_L0 (TTree)
│ └─ "km3net_timeslice_L0"
├─ KM3NET_TIMESLICE_L1 (TTree)
│ └─ "km3net_timeslice_L1"
├─ KM3NET_TIMESLICE_L2 (TTree)
│ └─ "km3net_timeslice_L2"
├─ KM3NET_TIMESLICE_SN (TTree)
│ └─ "km3net_timeslice_SN"
├─ KM3NET_EVENT (TTree)
│ └─ "KM3NET_EVENT"
├─ KM3NET_SUMMARYSLICE (TTree)
│ └─ "KM3NET_SUMMARYSLICE"
├─ JTRIGGER::JTriggerParameters (JTRIGGER::JTriggerParameters)
└─ META (TDirectory)
├─ JMeta (TNamed)
└─ JDataWriter (TNamed) It wouldn't be hard to replace all relevant calls with the adopted ones. |
But I do realize that the artifact will have to change if there are new files in the future. Maybe that's something of concern, or maybe not? |
good point... maybe we should keep these small files as how they are for now, and if we have larger (>5MB) test files in the future, use artifact system for those one by one to avoid changing artifact every time? |
Yeah. That sounds reasonable. I'd say maybe those test samples should be grouped according to some criteria. Otherwise, we will have to write something like |
Another possibility is to make a macro samples_str(file)
:( joinpath(@artifact_str(replace($file, ".root"=>"")), $file) )
end so that What do you think? |
https://github.com/simeonschaub/ArtifactUtils.jl
The text was updated successfully, but these errors were encountered: