-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat: Add ScoutingNanoAODSchema #1151
Conversation
Please add tests! |
I added a test file "test_nanoevents_scoutingnano.py". I'm not very experienced with pytest so I basically copied what was done in "test_nanoevents_pfnano.py". I had to add a sample file tests/samples/scouting_nano.root. The file I added was ~3.5 MB since I just grabbed the smallest root file I had on hand. This didn't seem to be too far from some of the other root files in that directory but let me know if it needs to be smaller. Is there any guidelines for what should be in sample file or is just a random root file fine? |
If you can pare down the test file to ~40 events or something like that it'll keep the repository more trim. |
And if you could rebase all your commits into one the larger file won't remain in the repository history. |
@jslawless if this is ready to go please mark it as ready for review :-) |
…in the ScoutingNANO format. Add a small test suite for ScoutingNanoAODSchema Trimmed example root file down to 157K
I changed the tests/sample to only be 157 KB instead of ~3.5 MB. I rebased the commit history so I think the old file is no longer present as well. |
Looks nice and tidy, thanks! |
@jslawless is there anything else you would like to add to this PR? |
This was all I had planned. ScoutingNanoAOD's features aren't frozen yet, so there will be more things to add in the coming months, particularly cross references, but I will add those once the exact format is frozen. |
This adds a ScoutingNanoAODSchema in src/coffea/nanoevents/schemas/nanoaod.py. Currently this only matches collections in ScoutingNANO to existing mixins in NanoAODSchema. This makes it a bit easier for coffea to work out of the box with scouting data and mc. In the future, the scouting groups could add more scouting specific functionality to this schema.
As a question for the maintainers, should I add a test class along with this new schema in this commit?