From 338cb933ac52d0cd4ed0e0a7e7a70b33b71b7f64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20M=C3=BCller?= <mueller.seb@posteo.de>
Date: Mon, 1 Jul 2024 17:29:51 +0200
Subject: [PATCH] remove initialize method from Composition and merge it with
 __init__

---
 src/finam/schedule.py | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/finam/schedule.py b/src/finam/schedule.py
index 1025c0fe..46056efa 100644
--- a/src/finam/schedule.py
+++ b/src/finam/schedule.py
@@ -9,6 +9,7 @@ Composition
 
     :noindex: Composition
 """
+
 import logging
 import os
 import sys
@@ -123,7 +124,6 @@ class Composition(Loggable):
         self._dependencies = None
         self._input_owners = None
         self._output_owners = None
-        self._is_initialized = False
         self._is_connected = False
 
         self._time_frame = (None, None)
@@ -131,14 +131,8 @@ class Composition(Loggable):
         self._slot_memory_limit = slot_memory_limit
         self._slot_memory_location = slot_memory_location
 
-    def initialize(self):
-        """Initialize all modules.
-
-        After the call, module inputs and outputs are available for linking.
-        """
+        # initialize
         self.logger.info("init composition")
-        if self._is_initialized:
-            raise FinamStatusError("Composition was already initialized.")
 
         for mod in self._modules:
             self._check_status(mod, [ComponentStatus.CREATED])
@@ -163,8 +157,6 @@ class Composition(Loggable):
 
             self._check_status(mod, [ComponentStatus.INITIALIZED])
 
-        self._is_initialized = True
-
     def connect(self, start_time=None):
         """Performs the connect and validate phases of the composition
 
-- 
GitLab