@@ -279,14 +279,16 @@ async def create_session(
279
279
async def get_kernel_env (self , path : str , name : Optional [str ] = None ) -> Dict [str , str ]:
280
280
"""Return the environment variables that need to be set in the kernel
281
281
282
+ path : str
283
+ the path for the given session – seem to be a session id sometime.
282
284
name: str
283
285
Here the name is likely to be the name of the associated file
284
286
with the current kernel at startup time.
285
287
286
288
287
289
"""
288
290
if name is not None :
289
- session_dir = await self .contents_manager .get_kernel_path (path = path )
291
+ session_dir = await ensure_async ( self .contents_manager .get_kernel_path (path = path ) )
290
292
cwd = self .kernel_manager .cwd_for_path (path )
291
293
path = os .path .join (cwd , session_dir , name )
292
294
assert isinstance (path , str )
@@ -295,9 +297,15 @@ async def get_kernel_env(self, path: str, name: Optional[str] = None) -> Dict[st
295
297
async def start_kernel_for_session (self , session_id , path , name , type , kernel_name ):
296
298
"""Start a new kernel for a given session.
297
299
298
- name: str
300
+ session_id : str
301
+ uuid for the session; this method must be given a session_id
302
+ path : str
303
+ the path for the given session – seem to be a session id sometime.
304
+ name : str
299
305
Usually the model name, like the filename associated with current
300
306
kernel.
307
+ type : string
308
+ the type of the session, seem to be unused.
301
309
302
310
"""
303
311
# allow contents manager to specify kernels cwd
@@ -324,9 +332,9 @@ async def save_session(self, session_id, path=None, name=None, type=None, kernel
324
332
uuid for the session; this method must be given a session_id
325
333
path : str
326
334
the path for the given session
327
- name: str
335
+ name : str
328
336
the name of the session
329
- type: string
337
+ type : string
330
338
the type of the session
331
339
kernel_id : str
332
340
a uuid for the kernel associated with this session
0 commit comments