|
1 | 1 | from cirro.api.clients.portal import DataPortalClient |
2 | 2 | from cirro.api.config import UserConfig, save_user_config |
3 | 3 | from cirro.api.models.dataset import CreateIngestDatasetInput |
4 | | -from cirro.api.models.file import FileAccessContext |
5 | 4 | from cirro.api.models.process import Executor |
6 | 5 | from cirro.cli.interactive.auth_args import gather_auth_config |
7 | 6 | from cirro.cli.interactive.download_args import gather_download_arguments, ask_dataset_files |
|
16 | 15 | from cirro.cli.models import ListArguments, UploadArguments, DownloadArguments |
17 | 16 | from cirro.file_utils import get_files_in_directory |
18 | 17 | from cirro.helpers import WorkflowConfigBuilder |
19 | | -from cirro.utils import print_credentials |
20 | 18 |
|
21 | 19 |
|
22 | 20 | def run_list_datasets(input_params: ListArguments, interactive=False): |
@@ -78,24 +76,10 @@ def run_ingest(input_params: UploadArguments, interactive=False): |
78 | 76 |
|
79 | 77 | create_resp = cirro.dataset.create(create_request) |
80 | 78 |
|
81 | | - if input_params['use_third_party_tool']: |
82 | | - token_lifetime = 1 # TODO: Max token lifetime is 1 hour? |
83 | | - access_context = FileAccessContext.upload_dataset(project_id=create_request.project_id, |
84 | | - dataset_id=create_resp['datasetId'], |
85 | | - token_lifetime_override=token_lifetime) |
86 | | - creds = cirro.file.get_access_credentials(access_context) |
87 | | - print() |
88 | | - print("Please use the following information in your tool:") |
89 | | - print(f"Bucket: {access_context.bucket}") |
90 | | - print(f"Data path: {create_resp['dataPath']}") |
91 | | - print() |
92 | | - print_credentials(creds) |
93 | | - |
94 | | - else: |
95 | | - cirro.dataset.upload_files(dataset_id=create_resp['datasetId'], |
96 | | - project_id=create_request.project_id, |
97 | | - directory=directory, |
98 | | - files=files) |
| 79 | + cirro.dataset.upload_files(dataset_id=create_resp['datasetId'], |
| 80 | + project_id=create_request.project_id, |
| 81 | + directory=directory, |
| 82 | + files=files) |
99 | 83 |
|
100 | 84 |
|
101 | 85 | def run_download(input_params: DownloadArguments, interactive=False): |
|
0 commit comments