Skip to content

Commit 23ad7c8

Browse files
author
Elias Werner
committed
remove MCM from child process, check for multiple truthy values
1 parent 00e237a commit 23ad7c8

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/scorep_jupyter/kernel.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ def append_multicellmode(self, code):
238238
f"print('Executing cell {self.multicell_cellcount}')\n"
239239
+ f"print('''{code}''')\n"
240240
+ f"print('-' * {max_line_len})\n"
241-
+ "print('MCM_TS'+str(time.time()))\n"
242241
+ f"{code}\n"
243242
+ "print('''\n''')\n"
244243
)
@@ -667,16 +666,18 @@ def start_reading_scorep_process_streams(
667666
long-running process animation.
668667
669668
Args:
670-
proc (subprocess.Popen[bytes]): The subprocess whose output is being read.
671-
is_multicell_final (bool): If multicell mode is finalizing - spinner must be disabled.
669+
proc (subprocess.Popen[bytes]): The subprocess whose output is
670+
being read.
671+
is_multicell_final (bool): If multicell mode is finalizing -
672+
spinner must be disabled.
672673
673-
Returns:
674-
list: A list of decoded strings containing "MCM_TS" timestamps.
675674
"""
676675

677676
stdout_lock = threading.Lock()
678677
spinner_stop_event = threading.Event()
679-
process_busy_spinner = create_busy_spinner(stdout_lock, spinner_stop_event, is_multicell_final)
678+
process_busy_spinner = create_busy_spinner(stdout_lock,
679+
spinner_stop_event,
680+
is_multicell_final)
680681
process_busy_spinner.start("Process is running...")
681682

682683
# Empty cell output, required for interactive output
@@ -693,7 +694,8 @@ def start_reading_scorep_process_streams(
693694
)
694695
t_stderr.start()
695696

696-
self.read_scorep_stdout(proc.stdout, stdout_lock, spinner_stop_event)
697+
self.read_scorep_stdout(proc.stdout, stdout_lock,
698+
spinner_stop_event)
697699

698700
t_stderr.join()
699701
process_busy_spinner.stop("Done.")

src/scorep_jupyter/userpersistence.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,8 @@ def stop(self, done_message="Done."):
501501

502502

503503
def create_busy_spinner(lock=None, stop_event=None, is_multicell_final=False):
504-
is_enabled = os.getenv("SCOREP_JUPYTER_DISABLE_PROCESSING_ANIMATIONS") != "1"
504+
is_enabled = (os.getenv("SCOREP_JUPYTER_DISABLE_PROCESSING_ANIMATIONS")
505+
.lower() not in ['true', '1', 't'])
505506
if is_enabled and not is_multicell_final:
506507
return BusySpinner(lock, stop_event)
507508
else:

0 commit comments

Comments
 (0)