diff --git a/setup.py b/setup.py index 83a6ae8..52106ef 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ def stamp_api_version(): setup( name="science-synapse", - version="2.8.4", + version="2.8.5", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz", diff --git a/synapse-api b/synapse-api index f9fc77f..551deca 160000 --- a/synapse-api +++ b/synapse-api @@ -1 +1 @@ -Subproject commit f9fc77f6c3a9b5ccfa6479b48f139e7d540e8843 +Subproject commit 551deca8d4f2cfd83be3264c371beb0b6fb70619 diff --git a/synapse/_api_version.py b/synapse/_api_version.py index 445971d..3e7e1a1 100644 --- a/synapse/_api_version.py +++ b/synapse/_api_version.py @@ -1,2 +1,2 @@ # Generated from synapse-api/VERSION by setup.py. Do not edit. -SYNAPSE_API_VERSION = "2.6.0" +SYNAPSE_API_VERSION = "2.6.1" diff --git a/synapse/tests/client/test_spike_detector.py b/synapse/tests/client/test_spike_detector.py index b64dcad..e7cc5b5 100644 --- a/synapse/tests/client/test_spike_detector.py +++ b/synapse/tests/client/test_spike_detector.py @@ -83,3 +83,13 @@ def test_to_proto_template_matcher(): test_to_proto_template_matcher() print("All tests passed!") + + +def test_negative_threshold_round_trips(): + # threshold_uV is int32 (synapse-api 2.6.1): the sign is the crossing direction. + detector = SpikeDetector(samples_per_spike=32, config=ThresholderConfig(threshold_uV=-400)) + proto = detector._to_proto().spike_detector + assert proto.thresholder.threshold_uV == -400 + + wire = SpikeDetectorConfig.FromString(proto.SerializeToString()) + assert SpikeDetector._from_proto(wire).threshold_uV == -400