Multi recording archive#1
Conversation
aromanielloNTIA
left a comment
There was a problem hiding this comment.
Justin- I like the approach you took overall here. See the comments I provided for a couple suggested tweaks or things to consider. Aside from these, I don't think these changes are too big to consider opening a PR in sigmf/sigmf-python. I do think that it would make sense to add similar functionality for SigMF Collections at the same time. It might be helpful to consider the different possibilities documented here
… "name" to "path", rename duplicate test name
…n archive, add __eq__ method for SigMFCollection, improved handling of metadata in collection, fixed bug in read_samples()
… to fromarchive()
|
Note: no changes made to support GUI |
|
Recommend merging sigmf/sigmf:main into this branch before opening the PR there- looks like there are 2 commits to merge in |
…i-recording-archive
Done |
…ve usability with SigMFArchiveReader
aromanielloNTIA
left a comment
There was a problem hiding this comment.
Overall, looks good- left a few minor comments/suggestions to consider below
dboulware
left a comment
There was a problem hiding this comment.
See in-line comments. I believe only one remains regarding adding a test for fromarchive with a SigMFCollection.
| self._check_input() | ||
|
|
||
| archive_name = self._get_archive_name() | ||
| mode = "a" if fileobj is not None else "w" |
There was a problem hiding this comment.
Eventual PR should call out this change in behavior and note that it could be changed to preserver the original behavior of writing over the archive.
| """Dump contents to SigMF archive format. | ||
|
|
||
| `name` and `fileobj` are passed to SigMFArchive and are defined there. | ||
| `file_path` is passed to SigMFArchive `path` and `fileobj` is passed to |
There was a problem hiding this comment.
This should probably describe the handling of file_path and name
| assert file2_ext in file_extensions | ||
|
|
||
|
|
||
| def test_sf_fromarchive_multirec(test_sigmffile, test_alternate_sigmffile): |
There was a problem hiding this comment.
I may have missed it, but is there a similar test for SigMFCollection.fromarchive?
…istency with collection stream names, also adding files directly to tar instead of using temp folder
This PR should not be merged into NTIA/sigmf-python main. This is just for discussion.
Tested on my computer using mock sigan.