-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add the tool data_product_writer with unit test. #163
Conversation
Often times data products wind up storing opaque binary data - it might be nice to provide a mode that decodes the DP header/metadata to a json file but stores the contents of the dp as a binary data instead. |
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.
Since I was in there already, I made the few changes that make your test cases runnable in CI and with pytest
, I hope you don't mind.
A few comments below:
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.
The code looks good to me! Question about the dictionary, and one comment about reusability.
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.
LGTM!
Change Description
Added the Data Product writer tool which reads a data product binary file and deserializes the data into a JSON output file.
The binary file may contain 1 or more Records which are specified in the FPP.
A unit test is also added which reads in a collection of binary files and produces the resultant JSON data.
The unit test includes a JSON Dictionary which is a manual translation of the
DpTool
component's FPP.By running the DpTool component's unit test will generate a collection of binary files.
DpTool
and its unit test are in the F prime repo underFpTools/dpTool
In addition another JSON file is part of the tool which encapsulates the specification of the data product header information.
Rationale
A tool to deserialize and display F prime data products.
Testing/Review Recommendations
The
data_product_writer.py
is located insrc/fprime_gds/executables
The unit test is located in
test/fprime_gds/executables
Run
test_data_product_writer.py
. The tool will be invoked for each *.bin file in this directory. All the JSON output is placed inJSONoutput
Future Work
Once the F prime JSON dictionary is part of the build, the tool will need to be changed to access this file.