django_analyses.models.input.definitions package¶
Submodules¶
django_analyses.models.input.definitions.boolean_input_definition module¶
-
class
django_analyses.models.input.definitions.boolean_input_definition.BooleanInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr, default, is_output_switch)¶ Bases:
django_analyses.models.input.definitions.input_definition.InputDefinition-
default¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.boolean_input.BooleanInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
inputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
inputdefinition_ptr_id¶
-
is_output_switch¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
django_analyses.models.input.definitions.directory_input_definition module¶
-
class
django_analyses.models.input.definitions.directory_input_definition.DirectoryInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr, is_output_directory, default)¶ Bases:
django_analyses.models.input.definitions.input_definition.InputDefinition-
default¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.directory_input.DirectoryInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
inputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
inputdefinition_ptr_id¶
-
is_output_directory¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
django_analyses.models.input.definitions.file_input_definition module¶
-
class
django_analyses.models.input.definitions.file_input_definition.FileInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr, default)¶ Bases:
django_analyses.models.input.definitions.input_definition.InputDefinition-
default¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.file_input.FileInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
inputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
inputdefinition_ptr_id¶
-
django_analyses.models.input.definitions.float_input_definition module¶
-
class
django_analyses.models.input.definitions.float_input_definition.FloatInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr, numberinputdefinition_ptr, min_value, max_value, default)¶ Bases:
django_analyses.models.input.definitions.number_input_definition.NumberInputDefinition-
default¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.float_input.FloatInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
max_value¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
min_value¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
numberinputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
numberinputdefinition_ptr_id¶
-
django_analyses.models.input.definitions.input_definition module¶
Definition of the InputDefinition class.
-
class
django_analyses.models.input.definitions.input_definition.InputDefinition(*args, **kwargs)¶ Bases:
django.db.models.base.ModelRepresents a single input definition in the database. Instances are used to as the building blocks for
InputSpecificationinstances.-
booleaninputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
check_input_class_definition() → None¶ Checks the validity of the assigned
input_class.Raises: ValidationError– Invalidinput_classdefinition
-
content_type¶ If this input’s value references the value of a field in the database, this references the field’s model.
-
content_type_id¶
-
db_value_preprocessing¶ If values passed as inputs matching this input definition should be extracted from some object, this field specifies the name of the attribute which will be called using
get_db_value().
-
default= None¶ Child models may allow setting a default value using the appropriate
Fieldsubclass.
-
description¶ A description of this input definition.
-
directoryinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
extract_nested_value(obj: Any, location: str) → Any¶ Extract some nested attribute within an object.
Parameters: - obj (Any) – The object containing the nested value
- location (str) – Address of nested attribute within object
Returns: Nested attribute value
Return type: Any
-
field_name¶ If this input’s value references the value of a field in the database, this references the field’s name within the :att:`content_type` model.
-
fileinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
get_db_value(value: Any) → Any¶ Returns the appropriate DB value for inputs in which
db_value_preprocessingis defined.Parameters: value (Any) – The object containing the nested value Returns: Nested attribute value Return type: Any Raises: ValueError– Value extraction failure
-
get_or_create_input_instance(**kwargs) → django_analyses.models.input.input.Input¶ Creates an instance of the appropriate
django_analyses.models.input.input.Inputsubclass.Returns: Created instance Return type: Input
-
input_class= None¶ Each definition should override this class attribute in order to allow for Input instances creation.
-
is_configuration¶ Whether this input definition is a configuration of the analysis parameters or, e.g., a definition of the input or output of it.
-
key¶ Input key used when passing inputs to run some analysis.
-
listinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
numberinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
objects= <django_analyses.models.managers.input_definition.InputDefinitionManager object>¶
-
pipe_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
required¶ Whether this input is required for the execution of the analysis.
-
run_method_input¶ Whether the created inputs instances should be passed to interface’s class at initialization (False) or upon calling the run method (True).
-
specification_set¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
stringinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
validate() → None¶ Validates input definition instances before calling
save(). This method should be overridden by subclasses that require some kind of custom validation.
-
value_attribute¶ If the actual input to the analysis class is meant to be some attribute of given input, the attribute name may be set here.
-
django_analyses.models.input.definitions.input_definitions module¶
django_analyses.models.input.definitions.integer_input_definition module¶
-
class
django_analyses.models.input.definitions.integer_input_definition.IntegerInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr, numberinputdefinition_ptr, min_value, max_value, default)¶ Bases:
django_analyses.models.input.definitions.number_input_definition.NumberInputDefinition-
default¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.integer_input.IntegerInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
max_value¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
min_value¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
numberinputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
numberinputdefinition_ptr_id¶
-
django_analyses.models.input.definitions.list_input_definition module¶
-
class
django_analyses.models.input.definitions.list_input_definition.ListInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr, element_type, min_length, max_length, default, as_tuple)¶ Bases:
django_analyses.models.input.definitions.input_definition.InputDefinition-
as_tuple¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
default¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
element_type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
expected_type_definition¶
-
get_element_type_display(*, field=<django.db.models.fields.CharField: element_type>)¶
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.list_input.ListInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
inputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
inputdefinition_ptr_id¶
-
max_length¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
min_length¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
raise_max_length_error() → None¶
-
raise_min_length_error() → None¶
-
raise_not_list_error() → None¶
-
raise_wrong_type_error() → None¶
-
validate()¶ Validates input definition instances before calling
save(). This method should be overridden by subclasses that require some kind of custom validation.
-
validate_default_value() → None¶
-
validate_default_value_max_length() → bool¶
-
validate_default_value_min_length() → bool¶
-
validate_elements_type_for_default() → bool¶
-
django_analyses.models.input.definitions.messages module¶
django_analyses.models.input.definitions.number_input_definition module¶
-
class
django_analyses.models.input.definitions.number_input_definition.NumberInputDefinition(id, key, description, required, is_configuration, value_attribute, db_value_preprocessing, run_method_input, content_type, field_name, inputdefinition_ptr)¶ Bases:
django_analyses.models.input.definitions.input_definition.InputDefinition-
floatinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
inputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
inputdefinition_ptr_id¶
-
integerinputdefinition¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurantis aReverseOneToOneDescriptorinstance.
-
raise_default_over_max_error()¶
-
raise_default_under_min_error()¶
-
validate() → None¶ Validates input definition instances before calling
save(). This method should be overridden by subclasses that require some kind of custom validation.
-
validate_default()¶
-
django_analyses.models.input.definitions.string_input_definition module¶
Definition of the StringInputDefinition class.
-
class
django_analyses.models.input.definitions.string_input_definition.StringInputDefinition(*args, **kwargs)¶ Bases:
django_analyses.models.input.definitions.input_definition.InputDefinitionRepresents a single string input definition in the database.
-
choices¶ Possible choices for the string input value.
-
default¶ Default value.
-
dynamic_default¶ Dynamic default value expressed as some formatting template which requires run-dependent information.
-
get_type() → django_analyses.models.input.definitions.input_definitions.InputDefinitions¶
-
input_class¶ alias of
django_analyses.models.input.types.string_input.StringInput
-
input_set¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
inputdefinition_ptr¶ Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.placeis aForwardOneToOneDescriptorinstance.
-
inputdefinition_ptr_id¶
-
is_output_path¶ Whether this string determines the output path of the analysis.
-
is_output_switch¶ Whether this string determines if some output will be generated or not.
-
max_length¶ Maximal string length.
-
min_length¶ Minimal string length.
-
validate() → None¶ Overrides
django_analyses.models.input.definitions.input_definition.InputDefinition.validate()to validate choices (in cases wherechoicesis defined).Raises: ValidationError– Invalid choice
-
Module contents¶
InputDefinition
subclasses are used to create an
InputSpecification
that may be associated with some
AnalysisVersion.
Each type of input definition is used describe some kind of input that could be
passed to associated
AnalysisVersion.