Skip to content

Commit df55e40

Browse files
committed
removing unimplemented methods
1 parent 76e7104 commit df55e40

File tree

2 files changed

+1
-54
lines changed

2 files changed

+1
-54
lines changed

pyclowder/api/v2/datasets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def submit_extraction(connector, host, key, datasetid, extractorname):
223223

224224
return result.status_code
225225

226+
226227
def upload_metadata(connector, host, key, datasetid, metadata):
227228
"""Upload dataset JSON-LD metadata to Clowder.
228229

pyclowder/api/v2/files.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -125,60 +125,6 @@ def submit_extraction(connector, host, key, fileid, extractorname):
125125
return result
126126

127127

128-
# TODO not implemented in v2
129-
def submit_extractions_by_dataset(connector, host, key, datasetid, extractorname, ext=False):
130-
"""Manually trigger an extraction on all files in a dataset.
131-
132-
This will iterate through all files in the given dataset and submit them to
133-
the provided extractor.
134-
135-
Keyword arguments:
136-
connector -- connector information, used to get missing parameters and send status updates
137-
host -- the clowder host, including http and port, should end with a /
138-
key -- the secret key to login to clowder
139-
datasetid -- the dataset UUID to submit
140-
extractorname -- registered name of extractor to trigger
141-
ext -- extension to filter. e.g. 'tif' will only submit TIFF files for extraction.
142-
"""
143-
144-
filelist = get_file_list(connector, host, key, datasetid)
145-
146-
for f in filelist:
147-
# Only submit files that end with given extension, if specified
148-
if ext and not f['filename'].endswith(ext):
149-
continue
150-
151-
submit_extraction(connector, host, key, f['id'], extractorname)
152-
153-
154-
# TODO not implemented in v2
155-
def submit_extractions_by_collection(connector, host, key, collectionid, extractorname, ext=False, recursive=True):
156-
"""Manually trigger an extraction on all files in a collection.
157-
158-
This will iterate through all datasets in the given collection and submit them to
159-
the submit_extractions_by_dataset(). Does not operate recursively if there are nested collections.
160-
161-
Keyword arguments:
162-
connector -- connector information, used to get missing parameters and send status updates
163-
host -- the clowder host, including http and port, should end with a /
164-
key -- the secret key to login to clowder
165-
collectionid -- the collection UUID to submit
166-
extractorname -- registered name of extractor to trigger
167-
ext -- extension to filter. e.g. 'tif' will only submit TIFF files for extraction
168-
recursive -- whether to also submit child collection files recursively (defaults to True)
169-
"""
170-
171-
dslist = get_datasets(connector, host, key, collectionid)
172-
173-
for ds in dslist:
174-
submit_extractions_by_dataset(connector, host, key, ds['id'], extractorname, ext)
175-
176-
if recursive:
177-
childcolls = get_child_collections(connector, host, key, collectionid)
178-
for coll in childcolls:
179-
submit_extractions_by_collection(connector, host, key, coll['id'], extractorname, ext, recursive)
180-
181-
182128
def upload_metadata(connector, host, key, fileid, metadata):
183129
"""Upload file JSON-LD metadata to Clowder.
184130

0 commit comments

Comments
 (0)