Skip to content

Commit

Permalink
clean up dependencies and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pellet committed Jun 29, 2024
1 parent f97a379 commit efe6caf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
13 changes: 4 additions & 9 deletions eegnb/analysis/streaming_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,12 @@ def check_report(eeg: EEG, n_times: int=60, pause_time=5, thres_std_low=None, th

prompt_time = time()
print(f"Starting next cycle in 5 seconds, press C and enter to cancel")

c_key_pressed = False

def check_c_key_pressed(key):
global c_key_pressed
if key.char == 'c':
c_key_pressed = True
listener = keyboard.Listener(on_press=check_c_key_pressed)
listener = keyboard.Listener(
on_press=lambda key: globals().update(c_key_pressed=True) if key.char == 'c' else None)
listener.start()
while time() < prompt_time + 5:
if c_key_pressed:
while time() < prompt_time + 5:
if c_key_pressed:
print("\nStopping signal quality checks!")
flag = True
break
Expand Down
20 changes: 5 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ h5py>=3.1.0
pytest-shutil
pyo>=1.0.3; platform_system == "Linux"
#pynput requires pyobjc, psychopy requires version less than 8, setting pyobjc to
# a specific version prevents dependency resolution deadlock.
# a specific version prevents endless dependency resolution loop.
pyobjc==7.3; sys_platform == 'darwin'
#Removed keyboard dependency due to using Carbon API not supported on Apple ARM64 chips,
#pynput is supported and under active development.
#keyboard==0.13.5
pynput
airium>=0.1.0
attrdict>=2.0.1
attrdict3
Expand All @@ -40,11 +36,9 @@ h5py>=3.1.0
pytest-shutil
pyo>=1.0.3; platform_system == "Linux"
#pynput requires pyobjc, psychopy requires version less than 8, setting pyobjc to
# a specific version prevents dependency resolution deadlock.
# a specific version prevents endless dependency resolution loop.
pyobjc==7.3; sys_platform == 'darwin'
#Removed keyboard dependency due to using Carbon API not supported on Apple ARM64 chips,
#pynput is supported and under active development.
#keyboard==0.13.5
#Removed keyboard dependency due segmentation fault on Apple Silicon: https://github.com/boppreh/keyboard/issues/507
pynput
airium>=0.1.0
attrdict>=2.0.1
Expand All @@ -55,11 +49,11 @@ click
## ~~ Stimpres Requirements ~~

#pynput requires pyobjc, psychopy requires version less than 8, setting pyobjc to
# a specific version prevents dependency resolution deadlock.
# a specific version prevents endless dependency resolution loop.
pyobjc==7.3; sys_platform == 'darwin'
#upgrade psychopy to use newer wxpython dependency which is prebuilt for m1 support.
psychopy==2023.2.2
# PTB does not yet support macOS ARM64, need to fallback to sounddevice.
# PTB does not yet support macOS Apple Silicon, need to fallback to sounddevice.
psychopy-sounddevice
psychtoolbox
scikit-learn>=0.23.2
Expand All @@ -72,10 +66,6 @@ pyserial>=3.5
h5py>=3.1.0
pytest-shutil
pyo>=1.0.3; platform_system == "Linux"
#Removed keyboard dependency due to using Carbon API not supported on Apple ARM64 chips,
#pynput is supported and under active development.
#keyboard==0.13.5
pynput
airium>=0.1.0
attrdict>=2.0.1
attrdict3
Expand Down

0 comments on commit efe6caf

Please sign in to comment.