Open jhazentia opened 1 year ago
Also note that this fixes a bug where SigMFFile
offset_and_size
was ignored by archive.py
@gmabey what are your thoughts on this one?
@gmabey what are your thoughts on this one?
Thanks for tagging me on this -- this PR had fallen off my radar, and I think I'm currently unsubcribed from changes to this project.
If we want this feature then I'll probably need to dive in and resolve these merge conflicts. Lately been spending free coding time on AoC.
@gmabey Thanks for the feedback! I plan to address your feedback, but it will probably be after the new year. Is Python 3.6 support still needed? It looks like Python 3.6 and 3.7 are end of life now.
@Teque5 I can work on the merge conflicts when I address the other feedback.
@jhazentia yeah so the reason why the SigMF project has persisted with python 3.6 support is (only because of) RedHat 8 ... that's just the reality of many users (including me), even though it's less than ideal.
This pull request is intended to add support for multiple recordings in archives. Fixes #11. Please let me know if you have any suggested improvements. Below is a summary of the changes:
SigMFArchive
to accept multipleSigMFFiles
SigMFArchive
name
topath
SigMFArchive
to append to existing tarfile when afileobj
is passed that references an existing, open tarfile. Note that, if desired, this can be changed back to always overwrite existing file.pretty
parameter toSigMFArchive
to control pretty printing ofSigMF
metadata in archivesname
parameter toSigMFFile
.SigMFArchive
will use theSigMFFile
name
parameter to create recording parent directories/file names in archiveSigMFArchiveReader
name
topath
SigMFArchiveReader
to read archives containing multiple recordings. The__len__()
,__iter__()
, and__getitem__()
operate on the list ofSigMFFiles
instead of individualSigMFFile
SigMFMetafile
dump()
anddumps()
methods to append newline to the JSON to make this behavior consistent throughout the code.__eq__()
method toSigMFFile
for testingNote that this PR does not include any changes to include a collection in archive, read collection from archive, or to update gui.py.
These changes are based on my colleagues' (Douglas Anderson @djanderson and Todd Schumann @ToddSchumann) changes: https://github.com/ntia/sigmf/tree/multi-recording-archive.