cloudos-cli 2.82.0__tar.gz → 2.82.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/PKG-INFO +1 -1
- cloudos_cli-2.82.1/cloudos_cli/_version.py +1 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/clos.py +39 -28
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli.egg-info/PKG-INFO +1 -1
- cloudos_cli-2.82.0/cloudos_cli/_version.py +0 -1
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/LICENSE +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/README.md +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/__main__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/bash/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/bash/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/configure/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/configure/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/configure/configure.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/constants.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/cost/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/cost/cost.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/cromwell/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/cromwell/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/datasets/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/datasets/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/datasets/datasets.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/import_wf/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/import_wf/import_wf.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/jobs/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/jobs/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/jobs/job.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/link/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/link/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/link/link.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/logging/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/logging/logger.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/procurement/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/procurement/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/procurement/images.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/projects/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/projects/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/queue/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/queue/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/queue/queue.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/related_analyses/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/related_analyses/related_analyses.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/array_job.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/cli_helpers.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/cloud.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/details.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/errors.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/last_wf.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/requests.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/utils/resources.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/workflows/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli/workflows/cli.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli.egg-info/SOURCES.txt +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli.egg-info/dependency_links.txt +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli.egg-info/entry_points.txt +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli.egg-info/requires.txt +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/cloudos_cli.egg-info/top_level.txt +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/setup.cfg +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/setup.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/functions_for_pytest.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_cli_project_create.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_cost/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_cost/test_job_cost.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_error_messages.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_logging/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_logging/test_logger.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_related_analyses/__init__.py +0 -0
- {cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_related_analyses/test_related_analyses.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.82.1'
|
|
@@ -1179,6 +1179,24 @@ class Cloudos:
|
|
|
1179
1179
|
user_id = self.resolve_user_id(filter_owner, workspace_id, verify)
|
|
1180
1180
|
params["user.id"] = user_id
|
|
1181
1181
|
|
|
1182
|
+
# --- Resolve queue ID before pagination (for local filtering during pagination) ---
|
|
1183
|
+
queue_id = None
|
|
1184
|
+
if filter_queue:
|
|
1185
|
+
try:
|
|
1186
|
+
from cloudos_cli.queue.queue import Queue
|
|
1187
|
+
queue_api = Queue(self.cloudos_url, self.apikey, self.cromwell_token, workspace_id, verify)
|
|
1188
|
+
queues = queue_api.get_job_queues()
|
|
1189
|
+
|
|
1190
|
+
for queue in queues:
|
|
1191
|
+
if queue.get("label") == filter_queue or queue.get("name") == filter_queue:
|
|
1192
|
+
queue_id = queue.get("id") or queue.get("_id")
|
|
1193
|
+
break
|
|
1194
|
+
|
|
1195
|
+
if not queue_id:
|
|
1196
|
+
raise ValueError(f"Queue with name '{filter_queue}' not found in workspace '{workspace_id}'")
|
|
1197
|
+
except Exception as e:
|
|
1198
|
+
raise ValueError(f"Error resolving queue '{filter_queue}'. {str(e)}")
|
|
1199
|
+
|
|
1182
1200
|
# --- Fetch jobs page by page ---
|
|
1183
1201
|
all_jobs = []
|
|
1184
1202
|
params["limit"] = current_page_size
|
|
@@ -1201,47 +1219,40 @@ class Cloudos:
|
|
|
1201
1219
|
if not page_jobs:
|
|
1202
1220
|
break
|
|
1203
1221
|
|
|
1222
|
+
# Apply queue filter during pagination (if specified)
|
|
1223
|
+
# jobQueue is a dict with "id" and "name" keys, extract the id for comparison
|
|
1224
|
+
if filter_queue and queue_id:
|
|
1225
|
+
filtered_jobs = []
|
|
1226
|
+
for job in page_jobs:
|
|
1227
|
+
job_queue = job.get("batch", {}).get("jobQueue", {})
|
|
1228
|
+
# jobQueue is a dict like {"id": "...", "name": "...", ...}
|
|
1229
|
+
job_queue_id = job_queue.get("id") if isinstance(job_queue, dict) else job_queue
|
|
1230
|
+
if job_queue_id == queue_id:
|
|
1231
|
+
filtered_jobs.append(job)
|
|
1232
|
+
page_jobs = filtered_jobs
|
|
1233
|
+
|
|
1204
1234
|
all_jobs.extend(page_jobs)
|
|
1205
1235
|
|
|
1206
1236
|
# Check stopping conditions based on mode
|
|
1207
1237
|
if use_pagination_mode:
|
|
1208
|
-
# In pagination mode (last_n_jobs), continue until we have enough jobs
|
|
1238
|
+
# In pagination mode (last_n_jobs), continue until we have enough jobs (after filtering)
|
|
1209
1239
|
if target_job_count != 'all' and len(all_jobs) >= target_job_count:
|
|
1210
1240
|
break
|
|
1211
1241
|
else:
|
|
1212
|
-
# In direct mode (page/page_size), only get one page
|
|
1213
|
-
|
|
1242
|
+
# In direct mode (page/page_size), only get one page unless filter_queue is used
|
|
1243
|
+
# When filter_queue is used, continue fetching pages until we have enough filtered results
|
|
1244
|
+
if not filter_queue or len(all_jobs) >= current_page_size:
|
|
1245
|
+
break
|
|
1214
1246
|
|
|
1215
1247
|
# Check if we reached the last page (fewer jobs than requested page size)
|
|
1216
|
-
|
|
1248
|
+
# Note: For queue filter, we check the unfiltered page_jobs count from the API
|
|
1249
|
+
# This ensures we stop when the API has exhausted results
|
|
1250
|
+
raw_page_jobs = content.get('jobs', [])
|
|
1251
|
+
if len(raw_page_jobs) < params["limit"]:
|
|
1217
1252
|
break # Last page
|
|
1218
1253
|
|
|
1219
1254
|
current_page += 1
|
|
1220
1255
|
|
|
1221
|
-
# --- Local queue filtering (not supported by API) ---
|
|
1222
|
-
if filter_queue:
|
|
1223
|
-
try:
|
|
1224
|
-
batch_jobs=[job for job in all_jobs if job.get("batch", {})]
|
|
1225
|
-
if batch_jobs:
|
|
1226
|
-
from cloudos_cli.queue.queue import Queue
|
|
1227
|
-
queue_api = Queue(self.cloudos_url, self.apikey, self.cromwell_token, workspace_id, verify)
|
|
1228
|
-
queues = queue_api.get_job_queues()
|
|
1229
|
-
|
|
1230
|
-
queue_id = None
|
|
1231
|
-
for queue in queues:
|
|
1232
|
-
if queue.get("label") == filter_queue or queue.get("name") == filter_queue:
|
|
1233
|
-
queue_id = queue.get("id") or queue.get("_id")
|
|
1234
|
-
break
|
|
1235
|
-
|
|
1236
|
-
if not queue_id:
|
|
1237
|
-
raise ValueError(f"Queue with name '{filter_queue}' not found in workspace '{workspace_id}'")
|
|
1238
|
-
|
|
1239
|
-
all_jobs = [job for job in all_jobs if job.get("batch", {}).get("jobQueue", {}) == queue_id]
|
|
1240
|
-
else:
|
|
1241
|
-
raise ValueError(f"The environment is not a batch environment so queues do not exist. Please remove the --filter-queue option.")
|
|
1242
|
-
except Exception as e:
|
|
1243
|
-
raise ValueError(f"Error filtering by queue '{filter_queue}'. {str(e)}")
|
|
1244
|
-
|
|
1245
1256
|
# --- Apply limit after all filtering ---
|
|
1246
1257
|
if use_pagination_mode and target_job_count != 'all' and isinstance(target_job_count, int) and target_job_count > 0:
|
|
1247
1258
|
all_jobs = all_jobs[:target_job_count]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.82.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudos_cli-2.82.0 → cloudos_cli-2.82.1}/tests/test_related_analyses/test_related_analyses.py
RENAMED
|
File without changes
|