From 3581f6962f67adbf75eea7618f5180afa0022211 Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Tue, 29 Oct 2024 10:45:16 -0700 Subject: [PATCH 1/3] ugh, shut UP, GHA --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 13792fac..7ac21624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # - Runs a non-root user. # - Sets up the entrypoint and port. -FROM python:3.12.7-slim-bookworm as base-image +FROM python:3.12.7-slim-bookworm AS base-image # Update system packages COPY scripts/install-base-packages.sh . From 54a246f0c68f6ea0e1631e13547be505ffbc8235 Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Tue, 29 Oct 2024 10:04:40 -0700 Subject: [PATCH 2/3] Be more cautious about cell 'id' --- src/mobu/services/business/notebookrunner.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mobu/services/business/notebookrunner.py b/src/mobu/services/business/notebookrunner.py index 335c2425..593d2b22 100644 --- a/src/mobu/services/business/notebookrunner.py +++ b/src/mobu/services/business/notebookrunner.py @@ -296,14 +296,11 @@ async def execute_code(self, session: JupyterLabSession) -> None: for cell in self.read_notebook(self._notebook): code = "".join(cell["source"]) - if "id" in cell: - cell_id = f'`{cell["id"]}` (#{cell["_index"]})' - else: - cell_id = f'#{cell["_index"]}' + cell_id = cell.get("id") or cell["_index"] ctx = CodeContext( notebook=self._notebook.name, path=str(self._notebook), - cell=cell["id"], + cell=cell_id, cell_number=f"#{cell['_index']}", cell_source=code, ) From cd42cf311408f442c6d4bde2f3b8a29f5724f25a Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Tue, 29 Oct 2024 10:57:24 -0700 Subject: [PATCH 3/3] Add changelog fragment --- changelog.d/20241029_105636_athornton_DM_46480.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog.d/20241029_105636_athornton_DM_46480.md diff --git a/changelog.d/20241029_105636_athornton_DM_46480.md b/changelog.d/20241029_105636_athornton_DM_46480.md new file mode 100644 index 00000000..c6ae15bb --- /dev/null +++ b/changelog.d/20241029_105636_athornton_DM_46480.md @@ -0,0 +1,5 @@ + + +### Bug fixes + +- cell["id"] is not always set: be more cautious