Skip to content

Commit 3e33033

Browse files
committed
Update for modified class structure in app-pack-generator
1 parent 1786cb8 commit 3e33033

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

unity_app_generator/generator.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .state import ApplicationState
88

99
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
1111

1212
from unity_sds_client.services.application_service import DockstoreAppCatalog
1313

@@ -101,17 +101,22 @@ def create_cwl(self, cwl_output_path=None, docker_url=None, monolithic=False):
101101
app = ApplicationNotebook(notebook_filename)
102102

103103
logger.info("Parameters:\n" + app.parameter_summary())
104+
105+
# Create CWL files depending on the mode of production
106+
cwl_generators = [ ProcessCWL(app) ]
104107

105108
if monolithic:
106-
cwl = BundledDataStagingCWL(app)
107-
else:
108-
cwl = ProcessCWL(app)
109+
cwl_generators.append( DataStagingCWL(app) )
109110

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
110116
desc = Descriptor(app, self.repo_info)
117+
files_created.append(desc.generate_descriptor(cwl_output_path, docker_url))
111118

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
115120
if monolithic:
116121
self._generate_dockstore_cwl(cwl_output_path, "workflow.cwl")
117122
else:

0 commit comments

Comments
 (0)