@@ -89,7 +89,13 @@ def _write_docker_compose(output_path):
8989 if not services :
9090 return None
9191
92- compose_lines = ["networks:" , " concore-net:" , " driver: bridge" , "" , "services:" ]
92+ compose_lines = [
93+ "networks:" ,
94+ " concore-net:" ,
95+ " driver: bridge" ,
96+ "" ,
97+ "services:" ,
98+ ]
9399
94100 prev_service_name = None
95101 named_volumes = set ()
@@ -110,20 +116,20 @@ def _write_docker_compose(output_path):
110116 compose_lines .append (" restart: on-failure" )
111117 compose_lines .append (" networks:" )
112118 compose_lines .append (" - concore-net" )
113-
119+
114120 # Chain services sequentially to prevent ZMQ race conditions
115121 if prev_service_name :
116122 compose_lines .append (" depends_on:" )
117123 compose_lines .append (f" - { prev_service_name } " )
118-
124+
119125 if service ["volumes" ]:
120126 compose_lines .append (" volumes:" )
121127 for volume_spec in service ["volumes" ]:
122128 compose_lines .append (f" - { _yaml_quote (volume_spec )} " )
123- part1 = volume_spec .split (':' )[0 ]
129+ part1 = volume_spec .split (":" )[0 ]
124130 if re .match (r"^[a-zA-Z0-9_-]+$" , part1 ):
125131 named_volumes .add (part1 )
126-
132+
127133 prev_service_name = service_name
128134
129135 if named_volumes :
@@ -219,9 +225,15 @@ def build_workflow(
219225 if s_path .exists ():
220226 content = s_path .read_text (encoding = "utf-8" )
221227 if s_name == "build" :
222- content = content .replace ("docker build" , "cp ../src/requirements.txt .\n docker build" )
228+ content = content .replace (
229+ "docker build" ,
230+ "cp ../src/requirements.txt .\n docker build" ,
231+ )
223232 else :
224- content = content .replace ("docker build" , "copy ..\\ src\\ requirements.txt .\n docker build" )
233+ content = content .replace (
234+ "docker build" ,
235+ "copy ..\\ src\\ requirements.txt .\n docker build" ,
236+ )
225237 s_path .write_text (content , encoding = "utf-8" )
226238
227239 if result .stdout :
0 commit comments