blueetl.repository¶
Repository.
Classes
|
BaseExtractor class. |
CompartmentReportExtractor class. |
|
|
FilteredRepository class. |
|
NeuronClassesExtractor class. |
|
NeuronsExtractor class. |
|
Repository class. |
|
SimulationsExtractor class. |
|
SomaReportExtractor class. |
|
SpikesExtractor class. |
|
WindowsExtractor class. |
- class blueetl.repository.BaseExtractor(repo: Repository)¶
Bases:
ABC
,Generic
[ExtractorT
]BaseExtractor class.
Initialize the object.
- extract(name: str) ExtractorT ¶
Return an object extracted from the cache or as new.
- Parameters:
name – name of the dataframe.
- abstract extract_cached(df: DataFrame, name: str) ExtractorT ¶
Instantiate an object from a cached DataFrame.
- abstract extract_new() ExtractorT ¶
Instantiate an object from the configuration.
- class blueetl.repository.CompartmentReportExtractor(repo: Repository)¶
Bases:
BaseExtractor
[CompartmentReport
]CompartmentReportExtractor class.
Initialize the object.
- extract_cached(df: DataFrame, name: str) CompartmentReport ¶
Instantiate an object from a cached DataFrame.
- extract_new() CompartmentReport ¶
Instantiate an object from the configuration.
- class blueetl.repository.FilteredRepository(parent: Repository, simulations_filter: dict[str, Any])¶
Bases:
Repository
FilteredRepository class.
Initialize the object using the given dict of DataFrames.
Filtered dataframes are never written to disk.
- needs_filter(name: str) bool ¶
Return True if the repository needs to be filtered during the extraction.
- class blueetl.repository.NeuronClassesExtractor(repo: Repository)¶
Bases:
BaseExtractor
[NeuronClasses
]NeuronClassesExtractor class.
Initialize the object.
- extract_cached(df: DataFrame, name: str) NeuronClasses ¶
Instantiate an object from a cached DataFrame.
- extract_new() NeuronClasses ¶
Instantiate an object from the configuration.
- class blueetl.repository.NeuronsExtractor(repo: Repository)¶
Bases:
BaseExtractor
[Neurons
]NeuronsExtractor class.
Initialize the object.
- class blueetl.repository.Repository(simulations_config: SimulationCampaign, extraction_config: ExtractionConfig, cache_manager: CacheManager, simulations_filter: dict[str, Any] | None = None, resolver: Resolver | None = None)¶
Bases:
object
Repository class.
Initialize the repository.
- Parameters:
simulations_config – simulation campaign configuration.
extraction_config – extraction configuration.
cache_manager – cache manager responsible to load and dump dataframes.
simulations_filter – optional simulations filter.
resolver – resolver instance.
- apply_filter(simulations_filter: dict[str, Any]) Repository ¶
Apply the given filter and return a new object.
- property cache_manager: CacheManager¶
Access to the cache manager.
- check_extractions() None ¶
Check that all the dataframes have been extracted.
- extract() None ¶
Extract all the dataframes.
- property extraction_config: ExtractionConfig¶
Access to the extraction configuration.
- is_cached() bool ¶
Return True if all the dataframes have been cached (loaded in memory or not).
- is_extracted() bool ¶
Return True if all the dataframes have been extracted and loaded in memory.
- missing_simulations() DataFrame ¶
Return a DataFrame with the simulations ignored because of missing spikes.
- Returns:
- pd.DataFrame with the simulation conditions and simulation_path as columns,
and one record for each ignored and missing simulation.
- property names: list[str]¶
Return the list of names of the extracted objects.
- needs_filter(name: str) bool ¶
Return True if the repository needs to be filtered during the extraction.
- property neuron_classes: NeuronClasses¶
Return the NeuronClasses extraction.
- property report: ReportExtractor¶
Return the Report extraction.
- show() None ¶
Print some information about the instance, mainly for debug and inspection.
- property simulation_ids: list[int]¶
Return the list of simulation ids, possibly filtered.
- property simulations: Simulations¶
Return the Simulations extraction.
- property simulations_config: SimulationCampaign¶
Access to the simulation campaign configuration.
- property simulations_filter: dict[str, Any] | None¶
Access to the simulations filter.
- property spikes: ReportExtractor¶
Return the Spikes extraction.
- class blueetl.repository.SimulationsExtractor(repo: Repository)¶
Bases:
BaseExtractor
[Simulations
]SimulationsExtractor class.
Initialize the object.
- extract_cached(df: DataFrame, name: str) Simulations ¶
Instantiate an object from a cached DataFrame.
- extract_new() Simulations ¶
Instantiate an object from the configuration.
- class blueetl.repository.SomaReportExtractor(repo: Repository)¶
Bases:
BaseExtractor
[SomaReport
]SomaReportExtractor class.
Initialize the object.
- extract_cached(df: DataFrame, name: str) SomaReport ¶
Instantiate an object from a cached DataFrame.
- extract_new() SomaReport ¶
Instantiate an object from the configuration.
- class blueetl.repository.SpikesExtractor(repo: Repository)¶
Bases:
BaseExtractor
[Spikes
]SpikesExtractor class.
Initialize the object.
- class blueetl.repository.WindowsExtractor(repo: Repository)¶
Bases:
BaseExtractor
[Windows
]WindowsExtractor class.
Initialize the object.