MCPcopy Create free account
hub / github.com/assemblerflow/flowcraft / write_configs

Method write_configs

flowcraft/generator/engine.py:1412–1447  ·  view source on GitHub ↗

Wrapper method that writes all configuration files to the pipeline directory

(self, project_root)

Source from the content-addressed store, hash-verified

1410 return self._render_config("pipeline_graph.html", {"data": dict_viz})
1411
1412 def write_configs(self, project_root):
1413 """Wrapper method that writes all configuration files to the pipeline
1414 directory
1415 """
1416
1417 # Write resources config
1418 with open(join(project_root, "resources.config"), "w") as fh:
1419 fh.write(self.resources)
1420
1421 # Write containers config
1422 with open(join(project_root, "containers.config"), "w") as fh:
1423 fh.write(self.containers)
1424
1425 # Write containers config
1426 with open(join(project_root, "params.config"), "w") as fh:
1427 fh.write(self.params)
1428
1429 # Write manifest config
1430 with open(join(project_root, "manifest.config"), "w") as fh:
1431 fh.write(self.manifest)
1432
1433 # Write user config if not present in the project directory
1434 if not exists(join(project_root, "user.config")):
1435 with open(join(project_root, "user.config"), "w") as fh:
1436 fh.write(self.user_config)
1437
1438 lib_dir = join(project_root, "lib")
1439 if not exists(lib_dir):
1440 os.makedirs(lib_dir)
1441 with open(join(lib_dir, "Helper.groovy"), "w") as fh:
1442 fh.write(self.help)
1443
1444 # Generate the pipeline DAG
1445 pipeline_to_json = self.render_pipeline()
1446 with open(splitext(self.nf_file)[0] + ".html", "w") as fh:
1447 fh.write(pipeline_to_json)
1448
1449 def export_params(self):
1450 """Export pipeline params as a JSON to stdout

Callers 1

buildMethod · 0.95

Calls 1

render_pipelineMethod · 0.95

Tested by

no test coverage detected