Closed weibullguy closed 1 month ago
This pull request refactors the basedatabase methods to improve maintainability and error handling. The changes include restructuring the database connection process, enhancing error handling, and improving code organization.
Change | Details | Files |
---|---|---|
Refactored database connection process |
|
src/ramstk/models/db/basedatabase.py |
Enhanced error handling throughout the BaseDatabase class |
|
src/ramstk/models/db/basedatabase.py |
Improved code organization and readability |
|
src/ramstk/models/db/basedatabase.py |
Updated tests to reflect changes in the BaseDatabase class |
|
tests/db/test_base.py |
Modified DataAccessError exception |
|
src/ramstk/exceptions.py |
Does this PR introduce a breaking change?
Describe the purpose of this pull request.
Refactor database classes for maintainability.
Describe how this was implemented.
Use ChatGPT to help refactor classes.
Describe any particular area(s) reviewers should focus on.
None
Pull Request Checklist
Code Style
Static Checks
Tests
Chores
Summary by Sourcery
Refactor the BaseDatabase class to improve maintainability and error handling by introducing helper methods for database connections and query execution. Simplify error handling by consolidating exception management into a single method. Update tests to align with the refactored logic and verify the new error handling behavior.
Enhancements:
Tests: