blissoda.wrappers.ewoks_macros.EwoksMacroHandler#

class blissoda.wrappers.ewoks_macros.EwoksMacroHandler(config=None, defaults=None)[source]#

Bases: BaseProcessor

Ewoks macro’s are the equivalent of Bliss macro’s with the difference that the functions are executed remotely via Ewoks.

Parameters:
  • config (Optional[Dict[str, Any]])

  • defaults (Optional[Dict[str, Any]])

CONFIG_MODEL_CLASS#

alias of BlissAutomationConfig

copy_and_remove_parameters(shared, name)#

Copy&Remove parameters from another scope (global or session, singleton or instance).

Parameters:
  • shared (bool)

  • name (Optional[str])

Return type:

None

disable()#
enable()#
property queue#
property trigger_at: str | None#
user_script_homedir()[source]#

Root directory for scripts with relative file paths.

Equivalent of user_script_homedir from Bliss for local Bliss macro’s.

Return type:

ESRFPath

user_script_list()[source]#

List python scripts from the proposal SCRIPTS directory.

Equivalent of user_script_list from Bliss for local Bliss macro’s.

user_script_load(scriptname, export_global='ewoks', blocking=False, timeout=None)[source]#

Parse a script to extract function definitions and expose them as Ewoks function proxies in the Bliss session’s env_dict.

Each proxy builds a one-node Ewoks workflow dict and submits it.

Equivalent of user_script_load from Bliss for local Bliss macro’s.

Parameters:
  • scriptname (str) – The python file to load (absolute path or relative to user_script_homedir).

  • export_global (Union[str, bool]) – Where to install the functions: - True: inject into global session namespace env_dict - “namespace” (default=”ewoks”): inject into that namespace - False: return a UserNamespace instead of injecting

  • blocking (bool) – Wait for result.

  • timeout (Optional[float]) – Timeout when waiting for the result.

Return type:

Optional[_Unavailable]

Returns:

If export_global is False, returns a UserNamespace containing function proxies. Otherwise, functions are injected into the session env_dict and nothing is returned.