Skip to content

Commit

Permalink
Add specification version to the metadata in SigMFCollection (#83)
Browse files Browse the repository at this point in the history
* add version for collections

---------

Co-authored-by: JKB <j.kuben@era.aero>
Co-authored-by: Kyle A Logue <kyle.a.logue@aero.org>
  • Loading branch information
3 people authored Dec 19, 2024
1 parent 9809de0 commit f358e30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sigmf/sigmffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def set_metadata(self, metadata):
if self.get_global_field(self.NUM_CHANNELS_KEY) is None:
self.set_global_field(self.NUM_CHANNELS_KEY, 1)

# set specification version to current implemented version
# set version to current implementation
self.set_global_field(self.VERSION_KEY, __specification__)

def set_global_info(self, new_global):
Expand Down Expand Up @@ -758,6 +758,9 @@ def __init__(self, metafiles=None, metadata=None, skip_checksums=False):
else:
self.set_streams(metafiles)

# set version to current implementation
self.set_collection_field(self.VERSION_KEY, __specification__)

if not self.skip_checksums:
self.verify_stream_hashes()

Expand Down

0 comments on commit f358e30

Please sign in to comment.