woger.manager module

class woger.manager.WorkspaceManager(root, path_structure_cls=None, data_cls=None, workspace_cls=None)[source]

Bases: object

Manages workspaces

Allows you to - create workspaces - load workspaces from directory - manage current, target and latest workspaces - search for workspaces with finished actions

Examples

Workspace management

Manager with data bindings

create(ws_id) → woger.workspace.Workspace[source]

Creates a Workspace

Parameters:ws_id (str or int) – Workspace id
current() → typing.Union[woger.workspace.Workspace, NoneType][source]

Returns current workspace

current_ws_id

Returns current workspace id

find_latest_finished(action) → typing.Union[woger.workspace.Workspace, NoneType][source]

Searches for latest workspace with finished action action

latest() → woger.workspace.Workspace[source]

Returns latest workspace

target() → woger.workspace.Workspace[source]

Returns target workspace

target_latest()[source]

Sets the target id equal to the latest id

target_ws_id

Returns target workspace id

update()[source]

Migrates from current workspace to target one

Sets the current workspace id equal to the target workspace id