-
Notifications
You must be signed in to change notification settings - Fork 67
[WIP] Drop ROOT files in tests/samples in favor of scikit-hep-testdata #237
Conversation
We're going to need
and it would be really nice to find a more consistent solution to |
I think this test failure is due to scikit-hep-testdata. Posting as issue scikit-hep/scikit-hep-testdata#14. |
Many bugs have been fixed, but ultimately, this will have to wait for scikit-hep/scikit-hep-testdata#14. |
…hat weren't in scikit-hep-testdata before 0.1.3.
…for-character identical, I hope that the PR can be merged automatically.
Just take the first commit of #237 because the rest won't work until scikit-hep-testdata is fixed
This is happening in uproot4. |
Ah nice, I didn’t know about this test-data repo. I should use it for UnROOT.jl |
That way, we don't have to all have the same test files clogging up our git repos. I also found uses for it in writing tutorials. When I needed an example of complex data, there was uproot-issue399.root with a jagged array of histograms! Also very useful in developing a ROOT-file reader: user-submitted issues are the only examples of files I have with TBaskets embedded inside the TTree. It's a situation I haven't been able to cause—I don't know how the files ended up this way. But the following "issues files" have good examples:
The way jaggedness (offsets, the fNevBuffer) is encoded is different in embedded baskets than free baskets, so it's important to have these tests. As for branches, I tend to go for the integer ones because small (< 256) integers are easy to recognize in a byte stream. Also, the files made by Geant4 are all a little weird—they have obscure class versions because the Geant4 file-writer is an independent implementation, not ROOT. |
Yes I see, thanks for the explanations! It's indeed extremely useful. The jaggedness is still something I struggle with, so it’s very helpful to have these examples consolidated. |
This may be helpful: In Uproot 1‒3, basket handling was distributed in many places because I was still figuring it out. This time, I managed to consolidate it. Strictly speaking, this is both the TBasket and its TKey, but it makes sense to handle this TKey in a special way, mixed with the TBasket handling. Even though I could consolidate it, the embedded/non-embedded cases have to be partially split in a big if/else clause. After the header, they're just different. Once you've identified what I call the |
I got it thanks, that looks quite consise! Yes, so currently the |
Most files should come from a version dependence on scikit-hep-testdata, but some, like Event.root, has to come from an HTTP request. (
tests_require
includesrequests
, souproot.open("http://...")
will work.)