As per an email discussion with Penri, I have written some "Temporary Top Up" logic for the Lady Hanham SAC, which is supposed to use mains water to top the butts up to 500mm every day at about 15:00. Penri will leave the gate valves manually open in such a way that all three Lady Hanham butts groups will fill, but the logic will only pay attention to the level in the G1 group.
State diagram for the Temporary Top Up logic, from the documentation on GitLab:
Progress [updated 2021-04-22]:
- ✔ Logic written
- ✔ Unit tests written
- ✔ Unit tests passing
- ✔ Unit tests added to unittests.py
- ✔ Documentation compiles
- ✔ Tested logic on Virtual Machines
- ✘ Code review not yet done [but see below]
- ✘ Not yet merged into 'master' branch and released [but see below]
- ✘ Not yet deployed on-site
Normally what happens next is that Hamish does a code review and merges the new branch into master and then, perhaps, tags it as a new release. However, we are conscious that Hamish does not have much time at the moment.
There are a couple of options to avoid burdening Hamish with the code review and merge:
- Make Terry do it!
- Install the 'temporary-top-up' branch onto the Raspberry Pi, without doing a code review or merging it into master.
- Burden Hamish with it anyway.
- Mention it to Hamish, and then Hamish decides it's not a burden and does it anyway, but really it is still a burden.
For the actual deployment process, I would welcome any input about details I may have missed, as I have never done it before.
As I understand it, there is a site-wide updater that currently doesn't work, so the process is manual. I cannot locate the documentation for the site-wide updater anyway.
My thinking is:
- Check we have a way to manually shut off the mains water inlet, or the solenoid valve
- Check what version of the software is currently installed. Make a note of this in case it needs reverting.
- Stop the currently installed software
- git pull and git checkout the temporary-top-up branch onto the Pi
- Restart the software
- Stop the software
- Shut off the solenoid/water supply if necessary
- git checkout the previously-installed version of the software
- Restart the software