This composite dataset is composed of the following files:
')
+ for composite_name, composite_file in self.get_composite_files(dataset=dataset).items():
+ fn = composite_name
+ opt_text = ''
+ if composite_file.optional:
+ opt_text = ' (optional)'
+ if composite_file.get('description'):
+ rval.append('- %s (%s)%s
' % (fn, fn, composite_file.get('description'), opt_text))
+ else:
+ rval.append('- %s%s
' % (fn, fn, opt_text))
+ rval.append('
\n')
+ return "\n".join(rval)
+
+ def set_peek(self, dataset, is_multi_byte=False):
+ """Set the peek and blurb text."""
+ if not dataset.dataset.purged:
+ dataset.peek = "Shapefile data"
+ dataset.blurb = "Shapefile data"
+ else:
+ dataset.peek = "file does not exist"
+ dataset.blurb = "file purged from disk"
+
+ def display_peek(self, dataset):
+ """Create HTML content, used for displaying peek."""
+ try:
+ return dataset.peek
+ except Exception:
+ return "Shapefile data"
diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py
index 13cc8767373..ca1c5b3b4ce 100644
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -1348,7 +1348,7 @@ class JobWrapper(HasResourceParameters):
# Handle composite datatypes of auto_primary_file type
if dataset.datatype.composite_type == 'auto_primary_file' and not dataset.has_data():
try:
- with NamedTemporaryFile() as temp_fh:
+ with NamedTemporaryFile(mode='w') as temp_fh:
temp_fh.write(dataset.datatype.generate_primary_file(dataset))
temp_fh.flush()
self.object_store.update_from_file(dataset.dataset, file_name=temp_fh.name, create=True)
diff --git a/test/functional/tools/composite_shapefile.xml b/test/functional/tools/composite_shapefile.xml
new file mode 100644
index 00000000000..34caff62a46
--- /dev/null
+++ b/test/functional/tools/composite_shapefile.xml
@@ -0,0 +1,39 @@
+