Skip to content

Commit

Permalink
more prints again
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer committed Oct 1, 2021
1 parent c3f2ed0 commit ab775b9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions nbclassic/nbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def sorted_extensions(self):
return {key: self.extensions[key] for key in keys}

manager.__class__.sorted_extensions = property(sorted_extensions)
print("\n\nDid this work 2? \n\n")

# Look to see if nbclassic is enabled. if so,
# link the nbclassic extension here to load
Expand All @@ -109,16 +110,22 @@ def sorted_extensions(self):
except Exception:
nbapp = NotebookAppTraits()

print("\n\nDid this work 3? \n\n")

# Proxy NotebookApp traits through serverapp to notebookapp.
members = diff_members(serverapp, nbapp)
for m in members:
proxy(serverapp, nbapp, m)

print("\n\nDid this work 4? \n\n")

# Find jupyter server extensions listed as notebook server extensions.
jupyter_paths = jupyter_config_path()
config_dirs = jupyter_paths + [serverapp.config_dir]
nbserver_extensions = get_nbserver_extensions(config_dirs)

print("\n\nDid this work 5? \n\n")

# Link all extensions found in the old locations for
# notebook server extensions.
for name, enabled in nbserver_extensions.items():
Expand All @@ -135,6 +142,9 @@ def sorted_extensions(self):
)
manager.link_extension(name, serverapp)

print("\n\nDid this work 6? \n\n")


# Monkey-patch Jupyter Server's template and static path list to include
# the classic notebooks template folder. Since there are some
# redundancy in the template names between these two packages,
Expand All @@ -151,6 +161,9 @@ def template_file_path(self):
notebook.DEFAULT_TEMPLATE_PATH_LIST + \
jupyter_server.DEFAULT_TEMPLATE_PATH_LIST

print("\n\nDid this work 7? \n\n")


serverapp.__class__.template_file_path = property(template_file_path)
print(f"\n\ntemplate path: {serverapp.__class__.template_file_path}\n\n")

Expand All @@ -160,6 +173,9 @@ def static_file_path_jupyter_server(self):

serverapp.__class__.static_file_path = property(static_file_path_jupyter_server)

print("\n\nDid this work 8? \n\n")


def static_file_path_nbclassic(self):
"""return extra paths + the default location"""
# NBExtensions look for classic notebook static files under the `/static/notebook/...`
Expand All @@ -172,6 +188,8 @@ def static_file_path_nbclassic(self):

nbapp.__class__.static_file_path = property(static_file_path_nbclassic)

print("\n\nDid this work 9? \n\n")


def _load_jupyter_server_extension(serverapp):
# Patch the config service manager to find the
Expand Down

0 comments on commit ab775b9

Please sign in to comment.