General Software Improvements (10 August 2022 Onwards)
General Software Improvements (10 August 2022 Onwards)
Just starting a new thread to track the latest set of improvements. I will post again when I have gotten started.
Last edited by hamishmb on 12/08/2022, 14:42, edited 1 time in total.
Hamish
Re: General Software Improvements (15 March 2022 Onwards)
Here are today's changes:
- Updated README.md with current code coverage statistics.
- Updated copyright for 2022.
- Make usage information display more nicely.
- Shortened system tick wait period on startup when running in test mode.
- Some minor fixed for the WIP wendy butts logic.
- Fixed incorrectly-formatted moduleauthor lines.
- Fix issues reported by pylint, do general code clean up, and add all notes into my to-do list to make sure they get addressed. (WIP)
Hamish
Re: General Software Improvements (15 March 2022 Onwards)
Here are the rest of this week's changes:
- More code clean up with pylint.
- Fixed unit tests.
- Disabled some tests until water backup logic is tested and re-enabled.
- Reorganise API docs to make them easier to navigate.
- Split control logic into more separate files in the spirit of what Patrick started.
- Update unit tests and make skeleton test files.
- Update documentation accordingly.
- Various other small fixes and improvements.
Hamish
Re: General Software Improvements (10 August 2022 Onwards)
Here is the latest set of changes from the last few weeks:
- Clean up some unnecessary print statements.
- Wait longer for the system tick when running in testing mode - was previously modified to be too short a wait.
- Use correct name for backup pump bypass gate valve socket - no longer being used for the matrix pump.
- Improve error handling in hall effect probe handling code.
- Note that this omission never seems to have caused a problem in the real world up to this point. Still good to make it more solid though.
- Refactoring: Don't pass extra obsolete arguments to the control logic functions.
- Update outdated incorrect docstrings in Logic/controllogic.py.
- Pylint: Silence unused argument warnings in Logic/controllogic.py.
- Report system memory usage as a percentage instead - more accessible and useful for the variety of different computers we use.
- Refactoring: A very large number of changes, mostly updating docstrings, making the code more consistent across files, and moving code to the correct file/some new files to make the organisation better.
- This work took a long time, but has made the code much easier to understand, get familiar with, and maintain.
- Cleanup: Removed various old bits of code that are no longer used/were built with old assumptions about the system that are no longer true.
- Minor improvements to the site-wide actions (aka updater). Still not fixed yet - don't use it.
- Improve teardown logic and verbosity during teardown.
- Make the System Tick wait on startup skippable with CTRL-C (useful for development and testing).
- Remove obsolete references to master and remote pis.
- package.py: Do not assume a default branch name for the river system git repo.
- Remove obsolete references to client pis.
- Use new terminology: Site ID, instead of System ID. This improves clarity.
- Write a custom print function.
- This includes severity levels and colours, which makes the status of a system much easier to determine at a glance when debugging or using the CLI (not yet implemented).
- More updates to docstrings.
- Fix broken logging in some submodules.
- This is an issue from a while ago - some issues may not have been showing in the log until now. Note that this code isn't yet deployed on-site.
- Refactor Tools/sockettools.py and use some framework-wide conventions for better consistency.
- Move DatabaseConnection class into new file Tools/dbtools.py.
- Consistency: Just use the module names when importing, rather than other similar names, eg use "coretools" instead of "core_tools".
- Remove references to the universal monitor (ran on the first remote pi at the beginning of this project).
- Use "tear down" when referring to just stopping the river control system.
- Consistency: More improvements in docstrings.
- Simplify some logic by using CONFIG.SOCKETSLIST more consistently.
Hamish