Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dboulware committed Dec 7, 2023
1 parent 245acb7 commit 245ddfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scos_actions/metadata/sigmf_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def set_sensor(self, sensor: Sensor) -> None:
self.sigmf_md.set_global_field("ntia-sensor:sensor", sensor)

def add_capture(self, capture: CaptureSegment) -> None:
capture_dict = json.loads(capture)
capture_dict = json.loads(msgspec_enc.encode(capture))
sample_start = capture_dict.pop("core:sample_start")
self.sigmf_md.add_capture(sample_start, metadata=capture_dict)

Expand Down
2 changes: 1 addition & 1 deletion scos_actions/metadata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _enc_hook(obj: Any) -> Any:


# A reusable encoder with custom hook to ensure serialization
msgspec_enc = msgspec.json.Encoder(enc_hook=_enc_hook)
msgspec_enc = msgspec.json.Encoder()

# A reusable decoder which outputs a Python dictionary
msgspec_dec_dict = msgspec.json.Decoder(type=dict)

0 comments on commit 245ddfb

Please sign in to comment.