Skip to content
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

Make unit tests for nanoAOD-tools (and then CI) #86

Open
arizzi opened this issue May 8, 2018 · 3 comments
Open

Make unit tests for nanoAOD-tools (and then CI) #86

arizzi opened this issue May 8, 2018 · 3 comments

Comments

@arizzi
Copy link
Contributor

arizzi commented May 8, 2018

we need unit tests, once available we can implement continuous integration in gitlab

@AndreasAlbert
Copy link
Contributor

Let's revisit this issue. I think CI would be fantastic. Some considerations:

Environment
Easiest to use is probably github actions. IIUC, nanoaod-tools can run standalone already, so the only hurdle is to make ROOT avaialble. This could be achieved by using a precompiled binary like e.g. in hepdata_lib.

Testing procedure
Modules can do two things: calculating new quantities and filtering. Simple but useful checks that come to mind:

  1. Check that the code runs without crashing.
  2. Check that the expected output branches are present and have the right length (if this is possible to know)
  3. Check that the output numbers are as expected by comparing to a "known-to-be-good" reference file.
  4. Check for unintended consequences by testing whether branches that are meant to be unchanged are really unchanged.

Scope
Ideally, we'd have tests for everything, but that's not immediately realistic. A good start would be to have simple checks (1 above) for most things that are in regular use and implement stricter checks (2-4) for everything that can easily go wrong, or is just fundamentally important everywhere. Things that come to mind for the second category:

  • JES / JER implementation for 2016+2017+2018 nanoaod v5 and v6.
  • core framework functionalities: branch filtering, collection merging, etc.

Thoughts?

@arizzi
Copy link
Contributor Author

arizzi commented Feb 14, 2020

please note we can also use gitlab like we do for cmssw tests of nanoaod and we have a VM at cern nanoaod.cern.ch (hosting the dqm for example) that in principle can be used to run scripts and crons .
Working without cmssw is not possible for many POG modules as we get the calibration interfaces from the releases.
In any case if someone can start writing unit tests than I guess we can help providing gitlab integration.

cheers,
andrea

@peruzzim
Copy link
Contributor

definitely, @AndreasAlbert if you could put together a few tests it would be very useful, and we can easily integrate them with the validation routine we are already using for the development of the data format

bainbrid pushed a commit to bainbrid/nanoAOD-tools that referenced this issue Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants