From 8d4f20c6763a23a60028a5dc64f2abe9e7881056 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:46:53 +0000 Subject: [PATCH 1/2] Properly route standard output and standard error from nbopen subprocess call. Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com> --- bionetgen/core/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bionetgen/core/main.py b/bionetgen/core/main.py index 32de2a9d..208a8980 100644 --- a/bionetgen/core/main.py +++ b/bionetgen/core/main.py @@ -233,7 +233,6 @@ def generate_notebook(app): app.log.debug(f"Writing notebook to file: {fname}", f"{__file__} : notebook()") notebook.write(fname) # open the notebook with nbopen - # TODO: deal with stdout/err app.log.debug( f"Attempting to open notebook {fname} with nbopen", f"{__file__} : notebook()", @@ -242,4 +241,9 @@ def generate_notebook(app): stderr = getattr(subprocess, app.config["bionetgen"]["stderr"]) if args.open: command = ["nbopen", fname] - rc, _ = run_command(command) + process = subprocess.Popen(command, stdout=stdout, stderr=stderr) + p_out, p_err = process.communicate() + if p_out: + app.log.info(p_out.decode("utf-8") if isinstance(p_out, bytes) else p_out) + if p_err: + app.log.error(p_err.decode("utf-8") if isinstance(p_err, bytes) else p_err) From 10605966084d2272ad001b9fcf4b2f988951ae9d Mon Sep 17 00:00:00 2001 From: akutuva21 Date: Mon, 13 Apr 2026 10:11:00 -0400 Subject: [PATCH 2/2] chore: PR #40 remove forbidden artifacts and run black --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 39aa9026..f9bf9c80 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ temp_testing/* build dist Issues/rule_keywords/test_DeleteMolecules_changed.bngl +.jules/ +__pycache__/