FilingManager¶
-
class
managers.filing.FilingManager¶ Available methods:
Method name Method type available_modelscales()static method modelscale_inventory()static method get_responsepath_check_create()static method responsepath_check_create()class method -
static
available_modelscales()¶ Returns a list of available model_scale.
Arguments: No arguments
Returned value: list of model scales (directory names)
Raised Exceptions:
ValueErrorif there are nomodel_scaleUse case:
>> fm = FilingManager()>> fm.available_modelscales()
-
static
get_responsepath_check_create(list_dir_names)¶ Crawler operator checks for the response path (if it already exists). Otherwise a reponse path is created by the PathSpawner operator. Regardless, the response is returned. The path is of the form
~/cerebmodels/responses/<model_scale>/<model_name>/.Argument: list of string elements of the form
["responses", "<model_scale>", "<model_name>"].NOTE:
['responses', chosenmodel.modelscale, chosenmodel.modelname]is equivalent to['responses', 'cells', 'DummyModel'].This is called by :py:meth:
.responsepath_check_create().
-
static
modelscale_inventory(model_scale=None)¶ Returns a list of available model for given
model_scale.Keyword argument:
Key Value type model_scale string; egs. “cells”, “microcircuits”, “networks” Returned value: list of model names (model directory names)
Raised exceptions:
ValueErrorif the givenmodel_scaleis not listedValueErrorif themodel_scalehas no models.
Use case:
>> fm = FilingManager()>> fm.modelscale_inventory(model_scale="cells")
-
classmethod
responsepath_check_create(list_dir_names=None, chosenmodel=None)¶ Returns path to the reponse.
Keyword argument:
Key Value type list_dir_namesorchosenmodellist of three strings
instantiated model
Returned value: path (string) `` ~/cerebmodel/responses/<model_scale>/<model_name>``
Raised exceptions:
ValueErrorif the argumentlist_dir_namesis not of the form["responses", "<model_scale>", "<model_name>"]Use case:
>> fm = FilingManager()Then,
>> fm.responsepath_check_create(list_dir_names=["responses", "cells", "DummyModel"])OR
>> fm.responsepath_check_create( chosenmodel = DummyModel() )
-
static