mxcubecore.HardwareObjects.Gphl.GphlWorkflowConnection#

Workflow connection, interfacing to external workflow engine using py4j and Abstract Beamline Interface messages

License:

This file is part of MXCuBE.

MXCuBE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MXCuBE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MXCuBE. If not, see <https://www.gnu.org/licenses/>.

Classes

GphlWorkflowConnection(name)

This HO acts as a gateway to the Global Phasing workflow engine.

class mxcubecore.HardwareObjects.Gphl.GphlWorkflowConnection.GphlWorkflowConnection(name)[source]#

Bases: HardwareObject

This HO acts as a gateway to the Global Phasing workflow engine.

class HOConfig(*, software_paths: dict = {}, software_properties: dict = {}, directory_locations: dict = {}, gphl_subdir: str = 'GPHL', gphl_persistname: str = 'persistence', ssh_options: dict = {}, connection_parameters: dict = {}, **extra_data: Any)[source]#

Bases: HOConfig

Parameters:
  • software_paths (dict) –

  • software_properties (dict) –

  • directory_locations (dict) –

  • gphl_subdir (str) –

  • gphl_persistname (str) –

  • ssh_options (dict) –

  • connection_parameters (dict) –

  • extra_data (Any) –

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'connection_parameters': FieldInfo(annotation=dict, required=False, default={}), 'directory_locations': FieldInfo(annotation=dict, required=False, default={}), 'gphl_persistname': FieldInfo(annotation=str, required=False, default='persistence'), 'gphl_subdir': FieldInfo(annotation=str, required=False, default='GPHL'), 'software_paths': FieldInfo(annotation=dict, required=False, default={}), 'software_properties': FieldInfo(annotation=dict, required=False, default={}), 'ssh_options': FieldInfo(annotation=dict, required=False, default={})}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

abort_workflow(message=None)[source]#

Abort workflow - may be called from controller in any state

get_bdg_licence_dir(name)[source]#

Get directory containing specific licence file (if any) for program called ‘name’

get_executable(name)[source]#

Get location of executable binary for program called ‘name’

init()[source]#

‘public’ post-initialization method. Override as needed.

For ConfiguredObjects called after loading contained objects.

processMessage(py4j_message)[source]#

Receive and process message from workflow server Return goes to server

NB Called from external java) workflow

processText(py4j_message)[source]#

Receive and process info message from workflow server Return goes to server

NB Called from external java) workflow

toJStringArray(arr)[source]#

Modified from https://stackoverflow.com/questions/61230680/pyspark-py4j-create-java-string-array

to_java_time(time_in)[source]#

Convert time in seconds since the epoch (python time) to Java time value