Abstract class to aggregate common methods for resource downloader tasks
Attributes
config_specs: Dict
file_downloader: FileDownloader
input_specs: InputSpecs
message_dispatcher: MessageDispatcher
output_specs: OutputSpecs
resource_loader: ResourceLoader
style: TypingStyle
Functions
Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters
This can be overwritten to perform custom check before running task. See doc of CheckBeforeTaskResult for more information
Name | Type | Default value | Description |
---|---|---|---|
params | ConfigParams | ||
inputs | TaskInputs |
CheckBeforeTaskResult |
Methode to create the resource from a file (once downloaded) and return it as a task output
Name | Type | Default value | Description |
---|---|---|---|
resource_file | str | ||
uncompress_option | Literal |
Resource |
Create a temporary directory. This directory will be deleted after the task is run. Output file or folder are moved out of this directory before it is deleted.
str |
Name | Type | Default value | Description |
---|---|---|---|
spec_name | str |
Type |
This can be overwritten to perform custom initialization of the task. This method is called just after the init and before the check_before_run method
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Store a message in the progress
Name | Type | Default value | Description |
---|---|---|---|
message | str | Message to store in the progress | |
type_ | MessageLevel |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
This must be overiwritten to perform the task of the task.
This is where most of your code must go
Name | Type | Default value | Description |
---|---|---|---|
params | ConfigParams | [description] config | |
inputs | TaskInputs | [description] input |
Dict |
Save share info, clean temp files, etc
Update the progress value
Name | Type | Default value | Description |
---|---|---|---|
value | float | Value between 0 and 100 of the progress | |
message | str | If provided a message is stored on the progress |
Returns the name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | True to slugify the class name if true, defaults to false , optional |
snakefy | bool | False | True to snakefy the class name if true, defaults to false , optional |
replace_uppercase | bool | False | Replace upper cases by "-" if true, defaults to false , optional |
str |
Name | Type | Default value | Description |
---|---|---|---|
decorator_name | Any |
Returns the full name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | Slugify the returned class name if true, defaults to false , optional |
snakefy | bool | False | Snakefy the returned class name if true, defaults to false `` |
str |
str |
Returns the name of the first compatible input for the given resource types Returns None if no compatible input is found
Name | Type | Default value | Description |
---|---|---|---|
resource_types | List |
bool |
Returns the name of the first compatible output for the given resource types Returns None if no compatible output is found
Name | Type | Default value | Description |
---|---|---|---|
resource_types | List |
bool |
Get the human name of the resource
str |
Returns the input specs of the process
InputSpecs |
Returns the input specs of the process
OutputSpecs |
Get the short description of the resource
str |
Get the typing name of the resource
str |
Get all the classes that inherit this class
List |
Returns the list of the methods
List |
Returns the module name of the class
str |
Retrieves the property names
Name | Type | Default value | Description |
---|---|---|---|
instance | type | The s of the properties to retrieve. set `none` to retrieve all. `type` or `union[type]` | |
exclude | type |
List |