Skip to content
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

Add specification version to the metadata in SigMFCollection #83

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -752,6 +752,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
Loading