Skip to content

Commit df45342

Browse files
author
Max Burnette
committed
improved comments
1 parent 355bd67 commit df45342

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pyclowder/extractors.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def process_message(self, connector, host, secret_key, resource, parameters):
364364
self.logger.info("upload preview")
365365
pyclowder.files.upload_preview(connector, host, secret_key, file_id, str(preview))
366366
else:
367-
# TODO: Add Clowder endpoint & pyclowder method to attach previews to datasets
367+
# TODO: Add Clowder endpoint (& pyclowder method) to attach previews to datasets
368368
self.logger.error("previews not currently supported for resource type: %s" % type)
369369

370370
# upload output files to the processed file's parent dataset or processed dataset
@@ -401,6 +401,10 @@ def process_message(self, connector, host, secret_key, resource, parameters):
401401
pyclowder.files.upload_to_dataset(connector, host, secret_key, new_dataset_id,
402402
str(output))
403403

404+
if 'previews' in nds.keys():
405+
# TODO: Add Clowder endpoint (& pyclowder method) to attach previews to datasets
406+
self.logger.error("previews not currently supported for resource type: %s" % type)
407+
404408
finally:
405409
self.cleanup_data(result)
406410

@@ -409,7 +413,7 @@ def process_file(self, input_file):
409413
This function will process the file and return a dict that contains the result. This
410414
dict can have the following keys:
411415
- metadata: the metadata to be associated with the processed file
412-
- previews: files on disk with the preview to be uploaded to the processed file
416+
- previews: images on disk with the preview to be uploaded to the processed file
413417
- outputs: files on disk to be added to processed file's parent
414418
:param input_file: the file to be processed.
415419
:return: the specially formatted dict.
@@ -422,10 +426,12 @@ def process_dataset(self, input_files):
422426
dict can have the following keys:
423427
- metadata: the metadata to be associated with the processed dataset
424428
- outputs: files on disk to be added to the dataset
429+
- previews: images to be associated with the dataset
425430
- new_dataset: a dict describing a new dataset to be created for the outputs, with the following keys:
426431
- name: the name of the new dataset to be created (including adding the outputs,
427432
metadata and previews contained in new_dataset)
428433
- description: description for the new dataset to be created
434+
- previews: (see above)
429435
- metadata: (see above)
430436
- outputs: (see above)
431437
:param input_files: the files to be processed.

0 commit comments

Comments
 (0)