idmtools_models.python.json_python_task module

class idmtools_models.python.json_python_task.JSONConfiguredPythonTask(command: Union[str, idmtools.entities.command_line.CommandLine] = None, platform_requirements: Set[idmtools.entities.platform_requirements.PlatformRequirements] = <factory>, _ITask__pre_creation_hooks: List[Callable[[Union[ForwardRef('Simulation'), ForwardRef('IWorkflowItem')]], NoReturn]] = <factory>, _ITask__post_creation_hooks: List[Callable[[Union[ForwardRef('Simulation'), ForwardRef('IWorkflowItem')]], NoReturn]] = <factory>, common_assets: idmtools.assets.asset_collection.AssetCollection = <factory>, transient_assets: idmtools.assets.asset_collection.AssetCollection = <factory>, _task_log: logging.Logger = <factory>, script_path: str = None, python_path: str = 'python', parameters: dict = <factory>, envelope: str = None, config_file_name: str = 'config.json', is_config_common: bool = False, command_line_argument: str = None, command_line_argument_no_filename: bool = True, configfile_argument: Union[str, NoneType] = '--config')

Bases: idmtools_models.json_configured_task.JSONConfiguredTask, idmtools_models.python.python_task.PythonTask

configfile_argument: Optional[str] = '--config'
gather_common_assets()

Return the common assets for a JSON Configured Task a derived class Returns:

gather_transient_assets()idmtools.assets.asset_collection.AssetCollection

Get Transient assets. This should general be the config.json

Returns

Transient assets

reload_from_simulation(simulation: idmtools.entities.simulation.Simulation, **kwargs)

Reload the task from a simulation

Parameters
  • simulation – Simulation to reload from

  • **kwargs

Returns

None

See Also

idmtools_models.json_configured_task.JSONConfiguredTask.reload_from_simulation() idmtools_models.python.python_task.PythonTask.reload_from_simulation()

pre_creation(parent: Union[idmtools.entities.simulation.Simulation, idmtools.entities.iworkflow_item.IWorkflowItem])

Pre-creation

Parameters

parent

Returns

None

See Also

idmtools_models.json_configured_task.JSONConfiguredTask.pre_creation() idmtools_models.python.python_task.PythonTask.pre_creation()

post_creation(parent: Union[idmtools.entities.simulation.Simulation, idmtools.entities.iworkflow_item.IWorkflowItem])

Post-creation

Parameters

parent – Parent

Returns:

See Also

idmtools_models.json_configured_task.JSONConfiguredTask.post_creation() idmtools_models.python.python_task.PythonTask.post_creation()

class idmtools_models.python.json_python_task.JSONConfiguredPythonTaskSpecification

Bases: idmtools.registry.task_specification.TaskSpecification

get(configuration: dict)idmtools_models.python.json_python_task.JSONConfiguredPythonTask

Get instance of JSONConfiguredPythonTask with configuration

Parameters

configuration – Configuration for task

Returns

JSONConfiguredPythonTask with configuration

get_description() → str

Get description for plugin

Returns

Plugin Description

get_type() → Type[idmtools_models.python.json_python_task.JSONConfiguredPythonTask]

Get Type for Plugin

Returns

JSONConfiguredPythonTask