I pushed some changes to salsa, but I'm still running into: ______________________ NixIOWriteTest.test_multiref_write ______________________ self = <neo.test.iotest.test_nixio.NixIOWriteTest testMethod=test_multiref_write> def test_multiref_write(self): blk = Block("blk1") signal = AnalogSignal(name="sig1", signal=[0, 1, 2], units="mV", sampling_period=pq.Quantity(1, "ms")) othersignal = IrregularlySampledSignal( name="i1", signal=[0, 0, 0], units="mV", times=[1, 2, 3], time_units="ms" ) imgseq = ImageSequence( name="img1", image_data=self.rquant((10, 20, 10), pq.mV), frame_duration=pq.Quantity(1, "ms"), spatial_scale=pq.meter, ) event = Event(name="Evee", times=[0.3, 0.42], units="year") epoch = Epoch(name="epoche", times=[0.1, 0.2] * pq.min, durations=[0.5, 0.5] * pq.min) st = SpikeTrain(name="the train of spikes", times=[0.1, 0.2, 10.3], t_stop=11, units="us") for idx in range(3): segname = "seg" + str(idx) seg = Segment(segname) blk.segments.append(seg) seg.analogsignals.append(signal) seg.imagesequences.append(imgseq) seg.irregularlysampledsignals.append(othersignal) seg.events.append(event) seg.epochs.append(epoch) seg.spiketrains.append(st) chidx = Group(index=[10, 20, 29]) seg = blk.segments[0] st = SpikeTrain(name="choochoo", times=[10, 11, 80], t_stop=1000, units="s") seg.spiketrains.append(st) blk.groups.append(chidx) for idx in range(6): unit = Group(name="unit" + str(idx)) chidx.add(unit) unit.add(st) self.writer.write_block(blk) > self.compare_blocks([blk], self.reader.blocks) neo/test/iotest/test_nixio.py:1147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ neo/test/iotest/test_nixio.py:74: in compare_blocks self.compare_segment_group(neoseg, nixgrp) neo/test/iotest/test_nixio.py:103: in compare_segment_group self.compare_eests_mtags(neo_eests, nixgroup.multi_tags) neo/test/iotest/test_nixio.py:177: in compare_eests_mtags self.compare_epoch_mtag(eest, mtag) neo/test/iotest/test_nixio.py:189: in compare_epoch_mtag posquant = create_quantity(pos[:], pos.unit) neo/io/nixio.py:78: in create_quantity return pq.Quantity(values, unit) /usr/lib/python3/dist-packages/quantities/quantity.py:131: in __new__ ret._dimensionality.update(validate_dimensionality(units)) /usr/lib/python3/dist-packages/quantities/quantity.py:34: in validate_dimensionality return unit_registry[value].dimensionality /usr/lib/python3/dist-packages/quantities/registry.py:71: in __getitem__ return self.__registry[label] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <quantities.registry.UnitRegistry.__Registry object at 0x7f3784692150> string = 'min' def __getitem__(self, string): # easy hack to prevent arbitrary evaluation of code all_builtins = dir(builtins) # because we have kilobytes, other bytes we have to remove bytes all_builtins.remove("bytes") # have to deal with octet as well all_builtins.remove("oct") for builtin in all_builtins: if builtin in string: > raise RuntimeError(f"String parsing error for {string}. Enter a string accepted by quantities") E RuntimeError: String parsing error for min. Enter a string accepted by quantities /usr/lib/python3/dist-packages/quantities/registry.py:28: RuntimeError
This is still a "quantities" error, but stems from somewhere else. I've begun to dig into it, but for now I'm not sure that I understand what happens; I'm not even sure whether neo or quantities is at fault, it could even stem from python-nixio. The issue is reproducible on Salsa CI[1]. Looking back at the original test log[2], I see that it is not a regression, so it could have been an oversight. [1]: https://salsa.debian.org/med-team/neo/-/jobs/6478394 [2]: https://ci.debian.net/packages/n/neo/testing/arm64/51068351/#L2518 I may continue digging into it tomorrow evening, unless someone finds a fix in the meantime. Hope this helps, -- .''`. Étienne Mollier <emoll...@debian.org> : :' : pgp: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da `. `' sent from /dev/pts/2, please excuse my verbosity `- on air: Teramaze - The Will of Eli
signature.asc
Description: PGP signature