llamactl 0.2.7a1__py3-none-any.whl → 0.3.0a1__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.
- llama_deploy/cli/commands.py +28 -43
- llama_deploy/cli/textual/deployment_form.py +0 -1
- llama_deploy/cli/textual/git_validation.py +0 -2
- {llamactl-0.2.7a1.dist-info → llamactl-0.3.0a1.dist-info}/METADATA +3 -3
- {llamactl-0.2.7a1.dist-info → llamactl-0.3.0a1.dist-info}/RECORD +7 -7
- {llamactl-0.2.7a1.dist-info → llamactl-0.3.0a1.dist-info}/WHEEL +1 -1
- {llamactl-0.2.7a1.dist-info → llamactl-0.3.0a1.dist-info}/entry_points.txt +0 -0
llama_deploy/cli/commands.py
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import subprocess
|
|
3
1
|
from pathlib import Path
|
|
4
2
|
from typing import Optional
|
|
5
3
|
|
|
6
4
|
import click
|
|
7
|
-
from llama_deploy.appserver.
|
|
5
|
+
from llama_deploy.appserver.app import start_server
|
|
8
6
|
from llama_deploy.core.config import DEFAULT_DEPLOYMENT_FILE_PATH
|
|
9
7
|
from llama_deploy.core.schema.deployments import DeploymentUpdate
|
|
10
8
|
from rich import print as rprint
|
|
11
9
|
from rich.console import Console
|
|
12
10
|
from rich.table import Table
|
|
13
|
-
from tenacity import RetryError, Retrying, stop_after_attempt, wait_fixed
|
|
14
11
|
|
|
15
12
|
from .client import get_client
|
|
16
13
|
from .config import config_manager
|
|
@@ -493,54 +490,42 @@ def refresh_deployment(deployment_id: Optional[str]) -> None:
|
|
|
493
490
|
default=DEFAULT_DEPLOYMENT_FILE_PATH,
|
|
494
491
|
type=click.Path(dir_okay=False, resolve_path=True, path_type=Path), # type: ignore
|
|
495
492
|
)
|
|
493
|
+
@click.option(
|
|
494
|
+
"--no-install", is_flag=True, help="Skip installing python and js dependencies"
|
|
495
|
+
)
|
|
496
|
+
@click.option(
|
|
497
|
+
"--no-reload", is_flag=True, help="Skip reloading the API server on code changes"
|
|
498
|
+
)
|
|
499
|
+
@click.option("--no-open-browser", is_flag=True, help="Skip opening the browser")
|
|
500
|
+
@click.option(
|
|
501
|
+
"--preview",
|
|
502
|
+
is_flag=True,
|
|
503
|
+
help="Preview mode pre-builds the UI to static files, like a production build",
|
|
504
|
+
)
|
|
496
505
|
@global_options
|
|
497
|
-
def serve(
|
|
506
|
+
def serve(
|
|
507
|
+
deployment_file: Path,
|
|
508
|
+
no_install: bool,
|
|
509
|
+
no_reload: bool,
|
|
510
|
+
no_open_browser: bool,
|
|
511
|
+
preview: bool,
|
|
512
|
+
) -> None:
|
|
498
513
|
"""Run llama_deploy API Server in the foreground. If no deployment_file is provided, will look for a llama_deploy.yaml in the current directory."""
|
|
499
514
|
if not deployment_file.exists():
|
|
500
515
|
rprint(f"[red]Deployment file '{deployment_file}' not found[/red]")
|
|
501
516
|
raise click.Abort()
|
|
502
517
|
|
|
503
518
|
try:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
"llama_deploy.appserver.app:app",
|
|
513
|
-
"--host",
|
|
514
|
-
"localhost",
|
|
515
|
-
"--port",
|
|
516
|
-
"4501",
|
|
517
|
-
],
|
|
518
|
-
env=env,
|
|
519
|
+
start_server(
|
|
520
|
+
cwd=deployment_file.parent,
|
|
521
|
+
deployment_file=deployment_file,
|
|
522
|
+
proxy_ui=not preview,
|
|
523
|
+
reload=not no_reload,
|
|
524
|
+
install=not no_install,
|
|
525
|
+
build=preview,
|
|
526
|
+
open_browser=not no_open_browser,
|
|
519
527
|
)
|
|
520
528
|
|
|
521
|
-
retrying = Retrying(
|
|
522
|
-
stop=stop_after_attempt(5), wait=wait_fixed(RETRY_WAIT_SECONDS)
|
|
523
|
-
)
|
|
524
|
-
try:
|
|
525
|
-
for attempt in retrying:
|
|
526
|
-
with attempt:
|
|
527
|
-
client.sync.apiserver.deployments.create(
|
|
528
|
-
deployment_file.open("rb"),
|
|
529
|
-
base_path=deployment_file.parent,
|
|
530
|
-
local=True,
|
|
531
|
-
)
|
|
532
|
-
except RetryError as e:
|
|
533
|
-
uvicorn_p.terminate()
|
|
534
|
-
last: Optional[BaseException] = e.last_attempt.exception(0)
|
|
535
|
-
last_msg = ""
|
|
536
|
-
if last is not None:
|
|
537
|
-
last_msg = ": " + (
|
|
538
|
-
str(last.message) if hasattr(last, "message") else str(last)
|
|
539
|
-
)
|
|
540
|
-
raise click.ClickException(f"Failed to create deployment{last_msg}")
|
|
541
|
-
|
|
542
|
-
uvicorn_p.wait()
|
|
543
|
-
|
|
544
529
|
except KeyboardInterrupt:
|
|
545
530
|
print("Shutting down...")
|
|
546
531
|
|
|
@@ -361,7 +361,6 @@ class DeploymentEditApp(App[DeploymentResponse | None]):
|
|
|
361
361
|
def on_validation_cancel_message(self, message: ValidationCancelMessage) -> None:
|
|
362
362
|
"""Handle validation cancellation from git validation widget"""
|
|
363
363
|
# Return to form, clearing any save error
|
|
364
|
-
print("DEBUG: on_validation_cancel_message")
|
|
365
364
|
self.save_error = ""
|
|
366
365
|
self.current_state = "form"
|
|
367
366
|
|
|
@@ -206,7 +206,6 @@ class GitValidationWidget(Widget):
|
|
|
206
206
|
yield Button(
|
|
207
207
|
"Continue", id="continue_success", variant="primary", compact=True
|
|
208
208
|
)
|
|
209
|
-
print("DEBUG: render cancel button")
|
|
210
209
|
# Always show cancel button
|
|
211
210
|
yield Button("Back to Edit", id="cancel", variant="default", compact=True)
|
|
212
211
|
|
|
@@ -238,7 +237,6 @@ class GitValidationWidget(Widget):
|
|
|
238
237
|
)
|
|
239
238
|
self.post_message(ValidationResultMessage(self.repo_url, pat_to_send))
|
|
240
239
|
elif event.button.id == "cancel":
|
|
241
|
-
print("DEBUG: cancel button pressed")
|
|
242
240
|
self.post_message(ValidationCancelMessage())
|
|
243
241
|
|
|
244
242
|
def _start_github_auth(self) -> None:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: llamactl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0a1
|
|
4
4
|
Summary: A command-line interface for managing LlamaDeploy projects and deployments
|
|
5
5
|
Author: Adrian Lyjak
|
|
6
6
|
Author-email: Adrian Lyjak <adrianlyjak@gmail.com>
|
|
7
7
|
License: MIT
|
|
8
|
-
Requires-Dist: llama-deploy-core>=0.
|
|
9
|
-
Requires-Dist: llama-deploy-appserver>=0.
|
|
8
|
+
Requires-Dist: llama-deploy-core>=0.3.0a1,<0.4.0
|
|
9
|
+
Requires-Dist: llama-deploy-appserver>=0.3.0a1,<0.4.0
|
|
10
10
|
Requires-Dist: httpx>=0.24.0
|
|
11
11
|
Requires-Dist: rich>=13.0.0
|
|
12
12
|
Requires-Dist: questionary>=2.0.0
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
llama_deploy/cli/__init__.py,sha256=d0cda44bc0c9b76a5bff53f216c558541485910be36e94bd306dd0eeee8048c5,740
|
|
2
2
|
llama_deploy/cli/client.py,sha256=1518e395291356538e2c7c63b1ad424c5484161b921fc0f54d7f6ad5cdcd0ccc,6385
|
|
3
|
-
llama_deploy/cli/commands.py,sha256=
|
|
3
|
+
llama_deploy/cli/commands.py,sha256=8c4a00343af301743922e1e7093b63e547a93804ed70457cb17e597bf12cd382,16981
|
|
4
4
|
llama_deploy/cli/config.py,sha256=b339d95fceb7a15a183663032396aaeb2afffe1ddf06494416a6a0183a6658ca,6275
|
|
5
5
|
llama_deploy/cli/debug.py,sha256=e85a72d473bbe1645eb31772f7349bde703d45704166f767385895c440afc762,496
|
|
6
6
|
llama_deploy/cli/env.py,sha256=bb1dcde428c779796ad2b39b58d84f08df75a15031afca577aca0db5ce9a9ea0,1015
|
|
7
7
|
llama_deploy/cli/interactive_prompts/utils.py,sha256=59bd7cab8fe359d5a52e1805e8c9555b5cdf16f3699d7fa3be4d189503c4617f,2482
|
|
8
8
|
llama_deploy/cli/options.py,sha256=78b6e36e39fa88f0587146995e2cb66418b67d16f945f0b7570dab37cf5fc673,576
|
|
9
|
-
llama_deploy/cli/textual/deployment_form.py,sha256=
|
|
10
|
-
llama_deploy/cli/textual/git_validation.py,sha256=
|
|
9
|
+
llama_deploy/cli/textual/deployment_form.py,sha256=0533bade514cef6451d149f03824408e55222b386448171d1ecdefc5e8d2710a,15054
|
|
10
|
+
llama_deploy/cli/textual/git_validation.py,sha256=6ca9472b255c65ce2d5d420967798b41a49fd2ad9c62b9f5de5eff09f41f74cb,13279
|
|
11
11
|
llama_deploy/cli/textual/github_callback_server.py,sha256=a74b1f5741bdaa682086771fd73a145e1e22359601f16f036f72a87e64b0a152,7444
|
|
12
12
|
llama_deploy/cli/textual/llama_loader.py,sha256=dfef7118eb42d0fec033731b3f3b16ed4dbf4c551f4059c36e290e73c9aa5d13,1244
|
|
13
13
|
llama_deploy/cli/textual/profile_form.py,sha256=2c6ca4690c22b499cc327b117c97e7914d4243b73faa92c0f5ac9cfdcf59b3d7,6015
|
|
14
14
|
llama_deploy/cli/textual/secrets_form.py,sha256=1fd47a5a5ee9dfa0fd2a86f5888894820897c55fbb0cd30e60d6bc08570288b5,6303
|
|
15
15
|
llama_deploy/cli/textual/styles.tcss,sha256=72338c5634bae0547384669382c4e06deec1380ef7bbc31099b1dca8ce49b2d0,2711
|
|
16
|
-
llamactl-0.
|
|
17
|
-
llamactl-0.
|
|
18
|
-
llamactl-0.
|
|
19
|
-
llamactl-0.
|
|
16
|
+
llamactl-0.3.0a1.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
|
17
|
+
llamactl-0.3.0a1.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
|
|
18
|
+
llamactl-0.3.0a1.dist-info/METADATA,sha256=1fe014585182ab79295211197456127e248e5a2449612ce4793ab8d7d4a93d46,3137
|
|
19
|
+
llamactl-0.3.0a1.dist-info/RECORD,,
|
|
File without changes
|