Skip to content

paths.py

get_session_directory(session_key)

Return relative path from SessionDirectory table given key

Parameters:

Name Type Description Default
session_key dict

Key uniquely identifying a session

required

Returns:

Name Type Description
path str

Relative path of session directory

Source code in workflow_session/paths.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
def get_session_directory(session_key: dict) -> str:
    """Return relative path from SessionDirectory table given key

    Args:
        session_key (dict): Key uniquely identifying a session

    Returns:
        path (str): Relative path of session directory
    """
    from .pipeline import session

    session_dir = (session.SessionDirectory & session_key).fetch1("session_dir")
    return session_dir