Refactored database management into multiple files
Description
Refactored the database management module. The module still functions identically, it's just a lot nicer to look at.
Changes Made
- Change 1: Separated database management functions in to separate files, plus an init file. Benefits:
- Improved readability
- Separation of private and public functions
- Change 2: Refactored some of the larger functions by breaking them down into their component parts. Bemefits:
- Reduced complexity
- Improved readability
- Improved documentation
- Change 3: Made a few minor changes to test_database_management
- Restructured imports, since private functions can no longer be imported directly
- Fixed a small issue with an out-of-range value.
Test Plan
make test
Checklist
-
Code follows the project's coding style and conventions. -
Automated tests for the changes have been added or existing tests have been updated. -
Code coverage for new or modified code is maintained or improved. -
The code builds and runs without errors or warnings. -
Documentation has been updated to reflect the changes made. -
All discussions and feedback on the PR have been addressed. -
CI/CD pipelines pass successfully, including any required checks or tests. -
The PR has been reviewed and approved by the designated reviewers.
Additional Notes
- Please prioritize your own work - as long as nobody makes changes to the database_management module, this merge can be performed at pretty much any time.
- I discovered most of these complexity issues with the radon package - check it out, it's pretty cool!
Edited by Danny Love