Skip to content

Commit

Permalink
refactor: refactored basedatabase methods (#1400)
Browse files Browse the repository at this point in the history
* refactor: refactored basedatabase methods

* test: fix tests failing from db class refactors

Refactoring the database class resulted in new error message format.

* refactor: break up base table methods into smaller methods

* test: fix tests to pass with new refactoring

* chore: remove 3.8 and 3.9 from test suite add 3.11 and 3.12

* chore: remove 3.12 from test suite
  • Loading branch information
weibullguy authored Sep 28, 2024
1 parent a8aad9a commit 281215f
Show file tree
Hide file tree
Showing 15 changed files with 592 additions and 503 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/do-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ 3.8, 3.9, '3.10' ]
python: [ '3.10', 3.11 ]

services:
postgres:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ markers = [
ignore-paths = [
'tests*'
]
ignore-patterns = [
'\S*.pyi'
]
persistent = true
extension-pkg-whitelist = [
'pango'
Expand Down
6 changes: 3 additions & 3 deletions src/ramstk/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def __init__(self, msg: str = "") -> None:
:param str msg: the message to display to the user when this
exception is raised.
"""
self.msg = msg or "An error occured with RAMSTK."
self.msg = msg or "An error occurred with RAMSTK."
super().__init__(msg)


class DataAccessError(RAMSTKError):
"""Exception raised when attempting to access non-existent data."""

def __init__(self, msg: str) -> None:
def __init__(self, msg: str = "") -> None:
"""Initialize DataAccessError instance.
This exception is intended for use for non-existent data in the data
Expand All @@ -33,7 +33,7 @@ def __init__(self, msg: str) -> None:
:param msg: the message to display to the user when this
exception is raised.
"""
super().__init__(msg=msg)
super().__init__(msg)


class OutOfRangeError(RAMSTKError):
Expand Down
Loading

0 comments on commit 281215f

Please sign in to comment.