-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 of text data record #303
base: main
Are you sure you want to change the base?
Draft of text data record #303
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #303 +/- ##
===========================================
- Coverage 100.00% 98.70% -1.30%
===========================================
Files 49 50 +1
Lines 2890 2928 +38
Branches 356 360 +4
===========================================
Hits 2890 2890
- Misses 0 38 +38
|
from .raw_data_record import RawDataRecord | ||
|
||
|
||
class TextDataRecord(RawDataRecord, AbstractDataRecord): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, call it TextTableDataRecord
(cause we are going to have one more text data record)
if isinstance(physical_value, int): | ||
return physical_value | ||
if isinstance(physical_value, str): | ||
if physical_value in self.__reversed_mapping: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use self.reversed_mapping
instead of self.__reversed_mapping
return physical_value | ||
if isinstance(physical_value, str): | ||
if physical_value in self.__reversed_mapping: | ||
return self.__reversed_mapping[physical_value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, just a few tiny remarks left from me.
Description
Draft implementation of TextDataRecord class which will translate provided data into human readable text.
How Has This Been Tested?
Unit tests will be available soon.
Process
I know the process and did my best to follow it