Support for Multiple Recordings in Archives#2
Draft
jhazentia wants to merge 15 commits into
Draft
Conversation
aromanielloNTIA
left a comment
There was a problem hiding this comment.
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
aromanielloNTIA
approved these changes
Jun 26, 2023
dboulware
requested changes
Jul 11, 2023
dboulware
left a comment
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
SigMFArchiveto accept multipleSigMFFilesSigMFArchivenametopathSigMFArchiveto append to existing tarfile when afileobjis passed that references an existing, open tarfile. Note that, if desired, this can be changed back to always overwrite existing file.prettyparameter toSigMFArchiveto control pretty printing ofSigMFmetadata in archivesnameparameter toSigMFFile.SigMFArchivewill use theSigMFFilenameparameter to create recording parent directories/file names in archiveSigMFArchiveReadernametopathSigMFArchiveReaderto read archives containing multiple recordings. The__len__(),__iter__(), and__getitem__()operate on the list ofSigMFFilesinstead of individualSigMFFileSigMFMetafiledump()anddumps()methods to append newline to the JSON to make this behavior consistent throughout the code.__eq__()method toSigMFFilefor 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.