File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,14 @@ def _get_project_name_type(project_name):
493493 )
494494
495495 project_type = ConcreteProject
496+ if config .environment == 'Colaboratory' :
497+ # colab name/type logic works slightly differently -- there's
498+ # only ever one "real" notebook per VM session, but it doesn't
499+ # exist on the VM filesystem
500+ curr_notebook_name = get_notebook_path ()
501+ if project_name == curr_notebook_name :
502+ return project_name , project_type
503+ return project_name , AbstractProject
496504 if project_name .endswith ('.ipynb' ):
497505 # `project_name` is a path to a notebook file, either the
498506 # default (absolute path to the current notebook) or
@@ -849,5 +857,8 @@ def use_default_project():
849857 else :
850858 proj_name = get_notebook_path ()
851859
852- default_project = Project (proj_name )
860+ # will always be an absolute path to a real Jupyter notebook file,
861+ # or name of real Colab notebook, so we can skip project type
862+ # decision logic
863+ default_project = ConcreteProject (proj_name )
853864 config .project = default_project
Original file line number Diff line number Diff line change 11[metadata]
22name = davos
3- version = 0.2.0
3+ version = 0.2.1
44description = Install and manage Python packages at runtime using the " smuggle" statement.
55long_description = file: README.md
66long_description_content_type = text/markdown
You can’t perform that action at this time.
0 commit comments