Skip to content

Commit 08f958e

Browse files
committed
remove update notebook support
1 parent 2132403 commit 08f958e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/sempy_labs/_git.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ def commit_to_git(
322322
)
323323

324324

325-
326325
def update_from_git(
327326
remote_commit_hash: str,
328327
conflict_resolution_policy: str,

src/sempy_labs/_notebooks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ def import_notebook_from_web(
143143
description=description,
144144
)
145145
elif len(dfI_filt) > 0 and overwrite:
146-
update_notebook_definition(
147-
name=notebook_name, notebook_content=response.content, workspace=workspace
148-
)
146+
print(f"{icons.info} Overwrite of notebooks is currently not supported.")
147+
# update_notebook_definition(
148+
# name=notebook_name, notebook_content=response.content, workspace=workspace
149+
# )
149150
else:
150151
raise ValueError(
151152
f"{icons.red_dot} The '{notebook_name}' already exists within the '{workspace}' workspace and 'overwrite' is set to False."
@@ -189,7 +190,7 @@ def create_notebook(
189190
"format": "ipynb",
190191
"parts": [
191192
{
192-
"path": f"{_notebook_prefix}{type}",
193+
"path": f"{_notebook_prefix}.{type}",
193194
"payload": notebook_payload,
194195
"payloadType": "InlineBase64",
195196
}
@@ -236,11 +237,10 @@ def update_notebook_definition(
236237
type = _get_notebook_type(notebook_name=name, workspace=workspace_id)
237238

238239
request_body = {
239-
"displayName": name,
240240
"definition": {
241241
"parts": [
242242
{
243-
"path": f"{_notebook_prefix}{type}",
243+
"path": f"{_notebook_prefix}.{type}",
244244
"payload": notebook_payload,
245245
"payloadType": "InlineBase64",
246246
}

0 commit comments

Comments
 (0)