scientiflow-cli 0.4.16__tar.gz → 0.4.18__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.
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/PKG-INFO +1 -1
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/pyproject.toml +1 -1
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/main.py +4 -1
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/pipeline/get_jobs.py +6 -2
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/executor.py +6 -3
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/LICENSE.md +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/README.md +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/__init__.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/__main__.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/cli/__init__.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/cli/auth_utils.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/cli/login.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/cli/logout.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/pipeline/__init__.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/pipeline/container_manager.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/pipeline/decode_and_execute.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/__init__.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/auth_service.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/base_directory.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/modes.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/request_handler.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/rich_printer.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/status_updater.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/__init__.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/config.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/encryption.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/file_manager.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/logger.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/mock.py +0 -0
- {scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/utils/singularity.py +0 -0
|
@@ -3,7 +3,7 @@ mode = "prod"
|
|
|
3
3
|
|
|
4
4
|
[tool.poetry]
|
|
5
5
|
name = "scientiflow-cli"
|
|
6
|
-
version = "0.4.
|
|
6
|
+
version = "0.4.18"
|
|
7
7
|
description = "CLI tool for scientiflow. This application runs on the client side, decodes pipelines, and executes them in the configured order!"
|
|
8
8
|
authors = ["ScientiFlow <scientiflow@gmail.com>"]
|
|
9
9
|
license = "Proprietary"
|
|
@@ -117,7 +117,10 @@ def main():
|
|
|
117
117
|
elif args.logout:
|
|
118
118
|
logout_user()
|
|
119
119
|
elif args.list_jobs:
|
|
120
|
-
|
|
120
|
+
if args.cloud_job:
|
|
121
|
+
get_jobs(is_cloud=args.cloud_job)
|
|
122
|
+
else:
|
|
123
|
+
get_jobs()
|
|
121
124
|
elif args.set_base_directory:
|
|
122
125
|
set_base_directory(hostname=args.hostname)
|
|
123
126
|
elif args.execute_jobs is not None:
|
|
@@ -4,8 +4,12 @@ from scientiflow_cli.services.rich_printer import RichPrinter
|
|
|
4
4
|
|
|
5
5
|
printer = RichPrinter()
|
|
6
6
|
|
|
7
|
-
def get_jobs() -> list[dict]:
|
|
8
|
-
|
|
7
|
+
def get_jobs(is_cloud: bool = False) -> list[dict]:
|
|
8
|
+
if is_cloud:
|
|
9
|
+
response = make_auth_request(endpoint="/agent-application/check-cloud-jobs-to-execute", method="GET", error_message="Unable to fetch jobs!")
|
|
10
|
+
printer.print_message("Fetching cloud jobs to execute...", style="bold blue")
|
|
11
|
+
else:
|
|
12
|
+
response = make_auth_request(endpoint="/agent-application/check-jobs-to-execute", method="GET", error_message="Unable to fetch jobs!")
|
|
9
13
|
try:
|
|
10
14
|
jobs = response.json()
|
|
11
15
|
if len(jobs) == 0:
|
|
@@ -10,12 +10,15 @@ from scientiflow_cli.services.base_directory import get_base_directory
|
|
|
10
10
|
printer = RichPrinter()
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def get_all_pending_jobs() -> list[dict]:
|
|
13
|
+
def get_all_pending_jobs(is_cloud: bool = False) -> list[dict]:
|
|
14
14
|
"""
|
|
15
15
|
Gets all the pending and running jobs using the get_jobs function
|
|
16
16
|
"""
|
|
17
17
|
try:
|
|
18
|
-
|
|
18
|
+
if is_cloud:
|
|
19
|
+
return get_jobs(is_cloud=is_cloud)
|
|
20
|
+
else:
|
|
21
|
+
return get_jobs()
|
|
19
22
|
|
|
20
23
|
except Exception as e:
|
|
21
24
|
printer.print_error("An unexpected error occurred")
|
|
@@ -27,7 +30,7 @@ def execute_jobs(job_ids: list[int] = None, parallel: bool = False, is_cloud: bo
|
|
|
27
30
|
Execute jobs based on the provided job IDs. If no job IDs are provided, execute all pending jobs.
|
|
28
31
|
If `parallel` is True, execute jobs asynchronously.
|
|
29
32
|
"""
|
|
30
|
-
all_pending_jobs = get_all_pending_jobs()
|
|
33
|
+
all_pending_jobs = get_all_pending_jobs(is_cloud)
|
|
31
34
|
|
|
32
35
|
if job_ids:
|
|
33
36
|
# Filter jobs based on provided job IDs
|
|
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
|
{scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/pipeline/container_manager.py
RENAMED
|
File without changes
|
{scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/pipeline/decode_and_execute.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/base_directory.py
RENAMED
|
File without changes
|
|
File without changes
|
{scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/request_handler.py
RENAMED
|
File without changes
|
|
File without changes
|
{scientiflow_cli-0.4.16 → scientiflow_cli-0.4.18}/scientiflow_cli/services/status_updater.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|