diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 02:35:03 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 02:35:03 +0100 |
| commit | 7189336ef4538e232a851246476d09cb41ffc660 (patch) | |
| tree | b60e24d680926886039852ae4f4bb41d9d34276c /cli/app/utils | |
| parent | e4a32154c0f55f974c8fd210495898cb15027d8c (diff) | |
get results folder id from api
Diffstat (limited to 'cli/app/utils')
| -rw-r--r-- | cli/app/utils/cortex_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/app/utils/cortex_utils.py b/cli/app/utils/cortex_utils.py index bf49f96..0de9596 100644 --- a/cli/app/utils/cortex_utils.py +++ b/cli/app/utils/cortex_utils.py @@ -13,6 +13,12 @@ def api_url(path): def cortex_folder(opt_folder_id): return fetch_json(os.path.join(api_url('folder'), str(opt_folder_id) + "/")) +def results_folder(name="results", module="biggan"): + res = fetch_json(api_url('folder'), name=name, module=module) + if len(res): + return res[0] + raise Exception("No results folder!") + def download_cortex_files(opt_folder_id): """Fetch all new, non-generated files in a Cortex folder""" rows = fetch_json(api_url('file'), folder_id=opt_folder_id) |
