-
Notifications
You must be signed in to change notification settings - Fork 77
Github action to check database status after calibration updates #766
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
|
Amazing @jmbenlloch!!! Thank you!!!
In the case of DEMO we do not calibrate always both type of sensors. Here you mean that they are independent, right? Or does it check that the run numbers match for SiPMs and PMTs? |
The code will extract from the database the ( |
|
I doubt I'll have much more to say on this, but I think that someone who is familiar with the task that is being automated, should have a look at exactly what is being verified, whether it makes sense, and whether anything has been overlooked. AFAIAC: LGTM. |
Thanks @jacg. I have squashed all the commits. Maybe @carmenromo can have a look a give the final review. |
carmenromo
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.
I suggested to @jmbenlloch to make another test to check that there are no gaps between the run numbers. However, given the large number of required exceptions we agreed on leaving it for the future, after reviewing the database itself.
I have reviewed the function that checks the gain update and it does its work, so I approve!
Whenever a new calibration is done some tables are changed in our MySQL server, that are later reflected in the SQLite file uploaded to this repository (examples in #765, #759, #754, etc.). Usually I'm the one responsible of reviewing those PRs. Besides checking all tests passed in Travis there is an extra step to ensure everything is ok and there was no human error in the process of creating the
sqlitecopy. This PR shows a way to do it automatically.The calibration in the database affects the tables
ChannelGain,ChannelMaskandSipmNoisePDF. All of them are indexed using aMinRunand aMaxRun, delimiting the range of runs to which those values are applicable. The set of (MinRun,MaxRun) for each of those tables must be the same in our MySQL server and in thesqlite3file included in the corresponding PR.So far, I have been doing that step manually. This PR includes a Github action to do that check automatically. It will be triggered only for PR's modifying some
*.sqlite3file. This is what it does:MinRun,MaxRun) set for the relevant tables and checks the SQLite file contains the same thing both for SiPMs and PMTs (separately).As illustration I have already included the code in this PR into my fork's master and created several PR's two show you how it works:
A PR updating DEMOPP database without including the latest calibration in the MySQL server.
Another PR with the same idea for the NEW database.
One last PR modifying the DEMOPP sqlite file but keeping the latest calibration in place.
I think this automation will simplify the reviewing of calibration PR's (which are common) and can also be useful as a proof of concept for tests/tasks that we want to run occasionally and do not fit well in the pytest scheme. This can be the first Github action included in IC, but there may be more in the future.
PS: In the sample images you can see a check called
Python package / build (3.7) (pull_request), I have updated that name toCalibration check / build (3.7) (pull_request)