Skip to content

Commit

Permalink
Clean up and bump to 0.3.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
agricolab committed Feb 23, 2021
1 parent 98fa923 commit c333d16
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 31 deletions.
36 changes: 11 additions & 25 deletions liesl/files/labrecorder/cli_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,22 @@ def start_recording(
filename = Run(filename)
filename.parent.mkdir(exist_ok=True, parents=True)

if "win" in sys.platform:
# start encoding the command
streams = []
for idx, uid in enumerate(self.streamargs):
stream = '"'
prt = f"source_id='{uid}'"
stream += prt
stream += '"'
streams.append(stream)

cmd = " ".join((str(self.cmd), str(filename), *streams))
# print(cmd)
# start the recording process
# start encoding the command
streams = []
for idx, uid in enumerate(self.streamargs):
stream = '"'
prt = f"source_id='{uid}'"
stream += prt
stream += '"'
streams.append(stream)

cmd = " ".join((str(self.cmd), str(filename), *streams))

if "win" in sys.platform:
self.process = Popen(
cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, bufsize=1,
)
else: # linux
streams = []
for idx, uid in enumerate(self.streamargs):
stream = '"'
prt = f"source_id='{uid}'"
stream += prt
stream += '"'
streams.append(stream)
cmd = [str(self.cmd), str(filename), *streams]
cmd = " ".join((str(self.cmd), str(filename)))
for s in streams:
cmd += f" {s}"
print(cmd)
self.process = Popen(
cmd,
stdin=PIPE,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pylsl
pyxdf
pylsl==1.14
pyxdf==1.16.3
numpy
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="liesl",
version="0.3.4.7",
version="0.3.4.8",
description="Toolbox to receive and process LSL streams and handle XDF files.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
7 changes: 4 additions & 3 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def test_cli_xdf(xdf_file):
stderr=PIPE,
)
o, e = p.communicate()
assert f"Loading {xdf_file}" in o.decode()
assert "Liesl-Mock-EEG" in o.decode()
assert "Liesl-Mock-Marker" in o.decode()
out = o.decode()
assert f"Loading {xdf_file}" in out
assert "Liesl-Mock-EEG" in out
assert "Liesl-Mock-Marker" in out


@pytest.mark.skipif(
Expand Down

0 comments on commit c333d16

Please sign in to comment.