idmtools_models.python.python_task module¶
-
class
idmtools_models.python.python_task.
PythonTask
(command: Union[str, idmtools.entities.command_line.CommandLine] = <property object at 0x7f7634030b30>, platform_requirements: Set[idmtools.entities.platform_requirements.PlatformRequirements] = <factory>, _ITask__pre_creation_hooks: List[Callable[[Union[ForwardRef('Simulation'), ForwardRef('IWorkflowItem')], ForwardRef('IPlatform')], NoReturn]] = <factory>, _ITask__post_creation_hooks: List[Callable[[Union[ForwardRef('Simulation'), ForwardRef('IWorkflowItem')], ForwardRef('IPlatform')], NoReturn]] = <factory>, common_assets: idmtools.assets.asset_collection.AssetCollection = <factory>, transient_assets: idmtools.assets.asset_collection.AssetCollection = <factory>, script_path: str = None, python_path: str = 'python')¶ Bases:
idmtools.entities.itask.ITask
-
script_path
: str = None¶
-
python_path
: str = 'python'¶
-
platform_requirements
: Set[idmtools.entities.platform_requirements.PlatformRequirements]¶
-
gather_common_assets
() → idmtools.assets.asset_collection.AssetCollection¶ Get the common assets. This should be a set of assets that are common to all tasks in an experiment
- Returns
AssetCollection
-
gather_transient_assets
() → idmtools.assets.asset_collection.AssetCollection¶ Gather transient assets. Generally this is the simulation level assets
Returns:
-
reload_from_simulation
(simulation: idmtools.entities.simulation.Simulation, **kwargs)¶ Reloads a python task from a simulation
- Parameters
simulation – Simulation to reload
Returns:
-
pre_creation
(parent: Union[idmtools.entities.simulation.Simulation, idmtools.entities.iworkflow_item.IWorkflowItem], platform: IPlatform)¶ Called before creation of parent
- Parameters
parent – Parent
platform – Platform Python Task is being executed on
- Returns
None
- Raise:
ValueError if script name is not provided
-
-
class
idmtools_models.python.python_task.
PythonTaskSpecification
¶ Bases:
idmtools.registry.task_specification.TaskSpecification
-
get
(configuration: dict) → idmtools_models.python.python_task.PythonTask¶ Get instance of Python Task with specified configuration
- Parameters
configuration – Configuration for task
- Returns
Python task
-
get_description
() → str¶ Description of the plugin
- Returns
Description string
-
get_example_urls
() → List[str]¶ Return List of urls that have examples using PythonTask
- Returns
List of urls(str) that point to examples
-
get_type
() → Type[idmtools_models.python.python_task.PythonTask]¶ Get Type for Plugin
- Returns
PythonTask
-
get_version
() → str¶ Returns the version of the plugin
- Returns
Plugin Version
-