Skip to content
Snippets Groups Projects
Commit 338cb933 authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

remove initialize method from Composition and merge it with __init__

parent 6b243b1b
No related branches found
No related tags found
1 merge request!281Deprecate initialize method of Composition
...@@ -9,6 +9,7 @@ Composition ...@@ -9,6 +9,7 @@ Composition
:noindex: Composition :noindex: Composition
""" """
import logging import logging
import os import os
import sys import sys
...@@ -123,7 +124,6 @@ class Composition(Loggable): ...@@ -123,7 +124,6 @@ class Composition(Loggable):
self._dependencies = None self._dependencies = None
self._input_owners = None self._input_owners = None
self._output_owners = None self._output_owners = None
self._is_initialized = False
self._is_connected = False self._is_connected = False
self._time_frame = (None, None) self._time_frame = (None, None)
...@@ -131,14 +131,8 @@ class Composition(Loggable): ...@@ -131,14 +131,8 @@ class Composition(Loggable):
self._slot_memory_limit = slot_memory_limit self._slot_memory_limit = slot_memory_limit
self._slot_memory_location = slot_memory_location self._slot_memory_location = slot_memory_location
def initialize(self): # initialize
"""Initialize all modules.
After the call, module inputs and outputs are available for linking.
"""
self.logger.info("init composition") self.logger.info("init composition")
if self._is_initialized:
raise FinamStatusError("Composition was already initialized.")
for mod in self._modules: for mod in self._modules:
self._check_status(mod, [ComponentStatus.CREATED]) self._check_status(mod, [ComponentStatus.CREATED])
...@@ -163,8 +157,6 @@ class Composition(Loggable): ...@@ -163,8 +157,6 @@ class Composition(Loggable):
self._check_status(mod, [ComponentStatus.INITIALIZED]) self._check_status(mod, [ComponentStatus.INITIALIZED])
self._is_initialized = True
def connect(self, start_time=None): def connect(self, start_time=None):
"""Performs the connect and validate phases of the composition """Performs the connect and validate phases of the composition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment