|
7 | 7 | from .state import ApplicationState
|
8 | 8 |
|
9 | 9 | from app_pack_generator import GitManager, DockerUtil, ApplicationNotebook
|
10 |
| -from app_pack_generator import ProcessCWL, BundledDataStagingCWL, Descriptor |
| 10 | +from app_pack_generator import ProcessCWL, DataStagingCWL, Descriptor |
11 | 11 |
|
12 | 12 | from unity_sds_client.services.application_service import DockstoreAppCatalog
|
13 | 13 |
|
@@ -101,17 +101,22 @@ def create_cwl(self, cwl_output_path=None, docker_url=None, monolithic=False):
|
101 | 101 | app = ApplicationNotebook(notebook_filename)
|
102 | 102 |
|
103 | 103 | logger.info("Parameters:\n" + app.parameter_summary())
|
| 104 | + |
| 105 | + # Create CWL files depending on the mode of production |
| 106 | + cwl_generators = [ ProcessCWL(app) ] |
104 | 107 |
|
105 | 108 | if monolithic:
|
106 |
| - cwl = BundledDataStagingCWL(app) |
107 |
| - else: |
108 |
| - cwl = ProcessCWL(app) |
| 109 | + cwl_generators.append( DataStagingCWL(app) ) |
109 | 110 |
|
| 111 | + files_created = [] |
| 112 | + for cwl_gen in cwl_generators: |
| 113 | + files_created += cwl_gen.generate_all(cwl_output_path, dockerurl=docker_url) |
| 114 | + |
| 115 | + # Add the JSON descriptor file |
110 | 116 | desc = Descriptor(app, self.repo_info)
|
| 117 | + files_created.append(desc.generate_descriptor(cwl_output_path, docker_url)) |
111 | 118 |
|
112 |
| - files = cwl.generate_all(cwl_output_path, dockerurl=docker_url) |
113 |
| - files.append(desc.generate_descriptor(cwl_output_path, docker_url)) |
114 |
| - |
| 119 | + # Add Dockstore.cwl, point it to the appropriate entry point |
115 | 120 | if monolithic:
|
116 | 121 | self._generate_dockstore_cwl(cwl_output_path, "workflow.cwl")
|
117 | 122 | else:
|
|
0 commit comments