idmtools_models.r.json_r_task module

idmtools jsonr task.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools_models.r.json_r_task.JSONConfiguredRTask(command: ~typing.Union[str, ~idmtools.entities.command_line.CommandLine] = <property object>, platform_requirements: ~typing.Set[~idmtools.entities.platform_requirements.PlatformRequirements] = <factory>, _ITask__pre_creation_hooks: ~typing.List[~typing.Callable[[~typing.Union[Simulation, IWorkflowItem], IPlatform], ~typing.NoReturn]] = <factory>, _ITask__post_creation_hooks: ~typing.List[~typing.Callable[[~typing.Union[Simulation, IWorkflowItem], IPlatform], ~typing.NoReturn]] = <factory>, common_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, transient_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, image_name: str = None, build: bool = False, build_path: ~typing.Optional[str] = None, Dockerfile: ~typing.Optional[str] = None, pull_before_build: bool = True, use_nvidia_run: bool = False, _DockerTask__image_built: bool = False, script_path: str = None, r_path: str = 'Rscript', parameters: dict = <factory>, envelope: str = None, config_file_name: str = 'config.json', is_config_common: bool = False, configfile_argument: ~typing.Optional[str] = '--config', command_line_argument_no_filename: bool = False)

Bases: JSONConfiguredTask, RTask

JSONConfiguredRTask combines JSONConfiguredTask and RTask.

Notes

  • TODO Add example references here

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

Return the common assets for a JSON Configured Task.

Returns:

Assets

gather_transient_assets() AssetCollection

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

Returns:

Transient assets

reload_from_simulation(simulation: Simulation, **kwargs)

Reload task details from a simulation. Used in some fetch operations.

Parameters:
  • simulation – Simulation that is parent item

  • **kwargs

Returns:

None

pre_creation(parent: Union[Simulation, IWorkflowItem], platform: IPlatform)

Pre-creation event.

Proxy calls to JSONConfiguredTask and RTask

Parameters:
  • parent – Parent item

  • platform – Platform item is being created on

Returns:

None

post_creation(parent: Union[Simulation, IWorkflowItem], platform: IPlatform)

Post-creation of task.

Proxy calls to JSONConfiguredTask and RTask

Parameters:
  • parent – Parent item

  • platform – Platform we are executing on

Returns:

None

__init__(command: ~typing.Union[str, ~idmtools.entities.command_line.CommandLine] = <property object>, platform_requirements: ~typing.Set[~idmtools.entities.platform_requirements.PlatformRequirements] = <factory>, _ITask__pre_creation_hooks: ~typing.List[~typing.Callable[[~typing.Union[Simulation, IWorkflowItem], IPlatform], ~typing.NoReturn]] = <factory>, _ITask__post_creation_hooks: ~typing.List[~typing.Callable[[~typing.Union[Simulation, IWorkflowItem], IPlatform], ~typing.NoReturn]] = <factory>, common_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, transient_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, image_name: str = None, build: bool = False, build_path: ~typing.Optional[str] = None, Dockerfile: ~typing.Optional[str] = None, pull_before_build: bool = True, use_nvidia_run: bool = False, _DockerTask__image_built: bool = False, script_path: str = None, r_path: str = 'Rscript', parameters: dict = <factory>, envelope: str = None, config_file_name: str = 'config.json', is_config_common: bool = False, configfile_argument: ~typing.Optional[str] = '--config', command_line_argument_no_filename: bool = False) None
class idmtools_models.r.json_r_task.JSONConfiguredRTaskSpecification

Bases: TaskSpecification

JSONConfiguredRTaskSpecification provides the plugin info for JSONConfiguredRTask.

get(configuration: dict) JSONConfiguredRTask

Get instance of JSONConfiguredRTaskSpecification with configuration provided.

Parameters:

configuration – Configuration for object

Returns:

JSONConfiguredRTaskSpecification with configuration

get_description() str

Get description of plugin.

Returns:

Description of plugin

get_example_urls() List[str]

Get Examples for JSONConfiguredRTask.

Returns:

List of Urls that point to examples for JSONConfiguredRTask

get_type() Type[JSONConfiguredRTask]

Get Type for Plugin.

Returns:

JSONConfiguredRTask

get_version() str

Returns the version of the plugin.

Returns:

Plugin Version