Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] API for Databases #298

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

[Draft] API for Databases #298

wants to merge 12 commits into from

Conversation

mdabrowski1990
Copy link
Owner

Description

  • Abstract Database class defined

How Has This Been Tested?

  • unit tests

Process

I know the process and did my best to follow it

@mdabrowski1990 mdabrowski1990 added the implementation Changes to code label Nov 20, 2024
@mdabrowski1990 mdabrowski1990 self-assigned this Nov 20, 2024
@mdabrowski1990 mdabrowski1990 linked an issue Nov 20, 2024 that may be closed by this pull request
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c65988b) to head (8bd4691).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #298   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        49    +3     
  Lines         2818      2875   +57     
  Branches       345       350    +5     
=========================================
+ Hits          2818      2875   +57     
Flag Coverage Δ
integration-tests 80.86% <63.63%> (-0.47%) ⬇️
integration-tests-branch 75.93% <63.63%> (-0.37%) ⬇️
unit-tests 100.00% <100.00%> (ø)
unit-tests-branch 100.00% <100.00%> (ø)
Files with missing lines Coverage Δ
uds/database/__init__.py 100.00% <100.00%> (ø)
uds/database/abstract_database.py 100.00% <100.00%> (ø)
uds/database/data_record/__init__.py 100.00% <100.00%> (ø)
uds/database/data_record/abstract_data_record.py 100.00% <100.00%> (ø)
uds/database/data_record/raw_data_record.py 100.00% <100.00%> (ø)
uds/database/services/__init__.py 100.00% <100.00%> (ø)
uds/database/services/abstract_service.py 100.00% <100.00%> (ø)
---- 🚨 Try these New Features:

@mdabrowski1990 mdabrowski1990 changed the title API for Databases [Draft] API for Databases Nov 20, 2024
@mdabrowski1990
Copy link
Owner Author

It must be merged after #297

raise ValueError("Database has no encoding defined for provided SID value.")
return self.services[sid].encode(**data_records_values)

def decode(self, message: Union[UdsMessage, UdsMessageRecord]) -> List[DecodedDataRecord]:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider switching output to:
Dict[str, DecodedDataRecord] to simplify output (order does not matter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation Changes to code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Messages database API
2 participants