-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for Multiple Recordings in Archives #2
base: main
Are you sure you want to change the base?
Conversation
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 good, this is really close to ready. I have no suggestions/edits for the proposed PR message above. See a few comments to consider inline below.
…igmffile name when reading archives, change error to warning when no sigmf-data files in archive
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.
Consider in-line comments. There may be reasons why they shouldn't be made or it won't work, but I think it is worth considering.
This is a draft PR for discussion only. This is a simplified PR compared to #1. It does not include changes for collection. Tested in scos-sensor using mock signal analyzer. See below for proposed PR message to merge into the upstream repository:
This pull request is intended to add support for multiple recordings in archives. 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' (Doug Anderson and Todd Schumann) changes: https://github.com/ntia/sigmf/tree/multi-recording-archive.