Skip to content

Overhaul Decparser warnings for CI test

Emir Muhammad requested to merge emmuhamm_add_warning_to_ci into master

Overhaul the Decparser CI test

This MR has some minor changes and improvements to the check-decfiles CI test, mostly centered around the new definitions for the warnings given by the test

New Messages

The outputs of decparser.py now come in three flavours:

  • \textcolor{red}{\text{Errors}}
  • \textcolor{orange}{\text{Warnings}}
  • \textcolor{olive}{\text{Cautions}}

Red Errors are remain the same as before. Errors will fail the CI. Examples of errors include no CPUTime information, Eventtype not being a number, etc. Typically, MR with errors can only be merged after an in depth review to find out the sources of these errors

The orange Warnings are things that are less dangerous than the errors, but more important than the cautions. Warnings will allow the CI test to pass, but throw a yellow ! warning sign These should be fixed before it goes before the maintainers, and will be caught by the shifters as well. Prime examples of this include a wrong Eventtype.

The yellow Cautions are what the old warnings used to be. They are meant to warn the user that 'something is not ideal', but its not too big an issue if they are not fixed. Cautions will let the CI pass. Current examples include The decfile: X uses this extra flag, but the decay seems different. Please check and use a unique extra flag.

Technical

All of this is now mostly handled by the WarningsHandler class in the beginning of decparser.py

Current list of problems in each category

This list is from my experience as a shifter, what I typically prod people to fix before they go to the maintainers. Feedback on which should go where would be greatly appreciated :)

Errors

  • Everything that was Failed before

Warnings

  • Unknown cuts
  • email format
  • Date
  • Eventtype flags not complient
  • Duplicate eventtypes
  • Obselete eventtype
  • Filename not same as nickname
  • Missing Tightcut in name
  • = not in nickname while cuts are present
  • Decfile X should contain the same decay, therefore first 7 digits of the eventtype should match

Cautions

  • Everything else

Docs on shifting and contribution

Useful for DecFiles shifters and Maintainers

Full description to be added...

TODO:

  • Test to see if the warnings
  • Make warning a different color
  • Unify code that throws the error / warning
  • Check which tests should be flagged and which one shouldn't be
  • Make a decfiles shifter document
Edited by Emir Muhammad

Merge request reports