-
Notifications
You must be signed in to change notification settings - Fork 85
Add TGraph, RooCurve, and RooHist behaviours. #350
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
Conversation
|
It passes tests, but let me know when it's out of "draft" status (when you think it's ready for merging). A comment: I'd prefer to not introduce new specialized exception types; it looks like both of these could be ValueError. I know that having more exception types can be good for writing more fine-grained |
|
Let me know when this is done! |
|
Sorry, I was a little busy with other things. Here's the test file I'd like to use: |
|
If you add that file in the directory below with name "uproot-issue-350.root", we can make a real test around it: I'll approve that scikit-hep-testdata PR and make a new version quickly so that you can test it here. |
|
PR made here. Sorry for the delay. |
|
@beojan, uproot-issue-350.root is now available in scikit-hep-testdata 0.4.4. Tests using it should now work! |
|
Tests now added. It looks like it failed because of a conda issue though. |
|
I restarted the tests, and they're failing in a relevant part now: Maybe you've set up the new fixture locally but haven't checked it in? (Unless it simplifies things in a noticeable way, I don't think it's necessary to use a lot of pytest features, such as fixtures. For instance, is this fixture used in many places, such that replacing redundancy with indirection is a good trade-off? I generally see tests as requiring a lower level of DRY than the main codebase, since the majority of them are written once and never updated, whereas the main codebase is frequently operated upon.) |
That's what's used in the test definitions
Needs an explicit Could use NumPy's |
|
(I'm going offline now. Might be unresponsive; sorry!) |
That wasn't it (I copied the TGraphAsymmErrors test). I just spelled "behaviors" the British way. I've also fixed the other test. |
|
All tests passed. I think this is ready for review. |
jpivarski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks absolutely great, thank you very much!
|
By the way, are you planning to cut a new release soon? It's not urgent (I can just build from git), I'm just curious. |
|
I am. A lot of things have been coming in on Awkward and I'm looking for a good gap in which to cut a release there, and I would then do both, but there's no reason I shouldn't do it for Uproot now. |
This adds a behaviour for
TGraph(based on that forTGraphAsymmErrors), and behaviours forRooHistandRooCurvebased on these. These make it easier to plot RooFit objects on a plot that's otherwise made with Python.Draft because I haven't added any tests yet. I thought it would be better to discuss first.