UncountablePythonSDK 0.0.71__py3-none-any.whl → 0.0.72__py3-none-any.whl
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.
Potentially problematic release.
This version of UncountablePythonSDK might be problematic. Click here for more details.
- {UncountablePythonSDK-0.0.71.dist-info → UncountablePythonSDK-0.0.72.dist-info}/METADATA +1 -1
- {UncountablePythonSDK-0.0.71.dist-info → UncountablePythonSDK-0.0.72.dist-info}/RECORD +6 -6
- examples/integration-server/pyproject.toml +1 -1
- uncountable/integration/cli.py +18 -44
- {UncountablePythonSDK-0.0.71.dist-info → UncountablePythonSDK-0.0.72.dist-info}/WHEEL +0 -0
- {UncountablePythonSDK-0.0.71.dist-info → UncountablePythonSDK-0.0.72.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.72
|
|
4
4
|
Summary: Uncountable SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
|
|
@@ -21,7 +21,7 @@ examples/invoke_uploader.py,sha256=rEvmVY5TjigN_-4PTQdkjY-bC5DrYMcJgquyZ4Tt5FM,7
|
|
|
21
21
|
examples/set_recipe_metadata_file.py,sha256=oPBhMo9T17zj4YpJRkmVH9lknYcT8livph0KssxYtg4,1048
|
|
22
22
|
examples/set_recipe_output_file_sdk.py,sha256=Lz1amqppnWTX83z-C090wCJ4hcKmCD3kb-4v0uBRi0Y,782
|
|
23
23
|
examples/upload_files.py,sha256=tUfKFqiqwnw08OL5Y8_e4j5pSRhp94cFex8XTuVa_ig,487
|
|
24
|
-
examples/integration-server/pyproject.toml,sha256=
|
|
24
|
+
examples/integration-server/pyproject.toml,sha256=mB0uj-_Wo8WRmhdMwOwcdOB5lAhiW_8Kf-epMFrOq34,9133
|
|
25
25
|
examples/integration-server/jobs/materials_auto/example_cron.py,sha256=7VVQ-UJsq3DbGpN3XPnorRVZYo-vCwbfSU3VVDluIzA,699
|
|
26
26
|
examples/integration-server/jobs/materials_auto/profile.yaml,sha256=WZTNlgc8uH412oRmWHWWuenYo_6LnrIL11V0HMkGsB0,352
|
|
27
27
|
pkgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -85,7 +85,7 @@ uncountable/core/environment.py,sha256=n46mWvG5uBOy6H_aetu_iuaYmO_d23uSbQBRgb6xS
|
|
|
85
85
|
uncountable/core/file_upload.py,sha256=qR7BBBWVxFNrb1_WICreo3dkZygE9lcE1fmZCQrDZU0,3469
|
|
86
86
|
uncountable/core/types.py,sha256=s2CjqYJpsmbC7xMwxxT7kJ_V9bwokrjjWVVjpMcQpKI,333
|
|
87
87
|
uncountable/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
|
-
uncountable/integration/cli.py,sha256=
|
|
88
|
+
uncountable/integration/cli.py,sha256=h3RE0l1SdjkveOKeY2amlmrJppK4HEQJXk8VG9UJRWg,1359
|
|
89
89
|
uncountable/integration/construct_client.py,sha256=I2XTamht13vs-JYkV4PpNS_Pc4FJm-KVYqNNvxI4qNk,1916
|
|
90
90
|
uncountable/integration/cron.py,sha256=6eH-kIs3sdYPCyb62_L2M7U_uQTdMTdwY5hreEJb0hw,887
|
|
91
91
|
uncountable/integration/entrypoint.py,sha256=EjJdTmED80MrVcNoQ5BhFP3bAYHdU6CzRGiPSZF9y8w,802
|
|
@@ -277,7 +277,7 @@ uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr
|
|
|
277
277
|
uncountable/types/api/triggers/run_trigger.py,sha256=_Rpha9nxXI3Xr17CrGDtofg4HZ81x2lt0rMZ6As0qfE,893
|
|
278
278
|
uncountable/types/api/uploader/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
|
|
279
279
|
uncountable/types/api/uploader/invoke_uploader.py,sha256=Rc77y5q-3R9-SNQgm8P35zKaW2D1Hbtm7PDixnOn1G0,1025
|
|
280
|
-
UncountablePythonSDK-0.0.
|
|
281
|
-
UncountablePythonSDK-0.0.
|
|
282
|
-
UncountablePythonSDK-0.0.
|
|
283
|
-
UncountablePythonSDK-0.0.
|
|
280
|
+
UncountablePythonSDK-0.0.72.dist-info/METADATA,sha256=Tg7-rgPrn3Yym3NA4cOfJjdjawKYQFKmEi6mMe7rPi0,2051
|
|
281
|
+
UncountablePythonSDK-0.0.72.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
282
|
+
UncountablePythonSDK-0.0.72.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
|
|
283
|
+
UncountablePythonSDK-0.0.72.dist-info/RECORD,,
|
uncountable/integration/cli.py
CHANGED
|
@@ -2,20 +2,17 @@ import argparse
|
|
|
2
2
|
|
|
3
3
|
from opentelemetry.trace import get_current_span
|
|
4
4
|
|
|
5
|
-
from uncountable.core.
|
|
6
|
-
from uncountable.integration.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
from uncountable.integration.
|
|
10
|
-
from uncountable.
|
|
11
|
-
from uncountable.types import job_definition_t
|
|
5
|
+
from uncountable.core.environment import get_local_admin_server_port
|
|
6
|
+
from uncountable.integration.queue_runner.command_server.command_client import (
|
|
7
|
+
send_job_queue_message,
|
|
8
|
+
)
|
|
9
|
+
from uncountable.integration.telemetry import Logger
|
|
10
|
+
from uncountable.types import queued_job_t
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
def main() -> None:
|
|
15
14
|
logger = Logger(get_current_span())
|
|
16
15
|
|
|
17
|
-
profiles = load_profiles()
|
|
18
|
-
|
|
19
16
|
parser = argparse.ArgumentParser(
|
|
20
17
|
description="Process a job with a given command and job ID."
|
|
21
18
|
)
|
|
@@ -29,45 +26,22 @@ def main() -> None:
|
|
|
29
26
|
|
|
30
27
|
parser.add_argument("job_id", type=str, help="The ID of the job to process")
|
|
31
28
|
|
|
29
|
+
parser.add_argument(
|
|
30
|
+
"--host", type=str, default="localhost", nargs="?", help="The host to run on"
|
|
31
|
+
)
|
|
32
|
+
|
|
32
33
|
args = parser.parse_args()
|
|
33
34
|
|
|
34
35
|
with logger.push_scope(args.command):
|
|
35
36
|
if args.command == "run":
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
client_options=profile.definition.client_options,
|
|
45
|
-
)
|
|
46
|
-
job_logger = JobLogger(
|
|
47
|
-
base_span=logger.current_span,
|
|
48
|
-
profile_metadata=profile_meta,
|
|
49
|
-
job_definition=job,
|
|
50
|
-
)
|
|
51
|
-
client = construct_uncountable_client(
|
|
52
|
-
profile_meta=profile_meta, job_logger=job_logger
|
|
53
|
-
)
|
|
54
|
-
batch_processor = AsyncBatchProcessor(client=client)
|
|
55
|
-
job_args = CronJobArguments(
|
|
56
|
-
job_definition=job,
|
|
57
|
-
profile_metadata=profile_meta,
|
|
58
|
-
client=client,
|
|
59
|
-
batch_processor=batch_processor,
|
|
60
|
-
logger=job_logger,
|
|
61
|
-
payload=None,
|
|
62
|
-
)
|
|
63
|
-
job_result = execute_job(
|
|
64
|
-
job_definition=job,
|
|
65
|
-
profile_metadata=profile_meta,
|
|
66
|
-
args=job_args,
|
|
67
|
-
)
|
|
68
|
-
break
|
|
69
|
-
if job_result is None:
|
|
70
|
-
raise Exception(f"no such job id {args.job_id}")
|
|
37
|
+
send_job_queue_message(
|
|
38
|
+
job_ref_name=args.job_id,
|
|
39
|
+
payload=queued_job_t.QueuedJobPayload(
|
|
40
|
+
invocation_context=queued_job_t.InvocationContextManual()
|
|
41
|
+
),
|
|
42
|
+
host=args.host,
|
|
43
|
+
port=get_local_admin_server_port(),
|
|
44
|
+
)
|
|
71
45
|
else:
|
|
72
46
|
parser.print_usage()
|
|
73
47
|
|
|
File without changes
|
{UncountablePythonSDK-0.0.71.dist-info → UncountablePythonSDK-0.0.72.dist-info}/top_level.txt
RENAMED
|
File without changes
|