reasoning-deployment-service 0.3.1__py3-none-any.whl → 0.3.2__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 reasoning-deployment-service might be problematic. Click here for more details.

@@ -0,0 +1,122 @@
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from pathlib import Path
5
+ from dotenv import load_dotenv
6
+ import argparse
7
+
8
+ from reasoning_deployment_service import (
9
+ ReasoningEngineDeploymentService,
10
+ )
11
+ from reasoning_deployment_service.gui_editor import GUIEditor
12
+ from reasoning_deployment_service.cli_editor import CLIRunner
13
+
14
+
15
+ class Runner:
16
+ @staticmethod
17
+ def run():
18
+ parser = argparse.ArgumentParser(description="Reasoning Engine Deployment Runner")
19
+ parser.add_argument(
20
+ "--mode",
21
+ choices=["create", "auth", "cli", "gui", "populate_files"],
22
+ required=False,
23
+ help="Operation mode to run",
24
+ )
25
+ args = parser.parse_args()
26
+
27
+ # --- Ensure .gitignore covers junk ---
28
+ Runner._ensure_gitignore()
29
+
30
+ # --- Ensure your_agent_import.py exists ---
31
+ if not Path("your_agent_import.py").exists():
32
+ Runner._create_agent_import()
33
+
34
+ # --- Always ensure venv exists & is up to date ---
35
+ venv_python = Runner._ensure_venv()
36
+
37
+ # --- Install dependencies into venv ---
38
+ Runner._install_deps(venv_python)
39
+
40
+ # --- If no config files, restrict menu ---
41
+ if not Path(".env.agent").exists() or not Path("aix_agent.yaml").exists():
42
+ print("Missing .env.agent or aix_agent.yaml.")
43
+ print("Options:\n 5) Generate placeholder config\n q) Quit")
44
+ choice = input("Enter choice: ").strip()
45
+ if choice == "5":
46
+ subprocess.check_call([venv_python, "deploy.py", "--mode", "populate_files"])
47
+ else:
48
+ sys.exit(0)
49
+ return
50
+
51
+ # --- Dispatch based on mode or menu ---
52
+ if args.mode:
53
+ Runner._dispatch(args.mode, venv_python)
54
+ else:
55
+ Runner._menu(venv_python)
56
+
57
+ # ------------------ HELPERS ------------------
58
+
59
+ @staticmethod
60
+ def _ensure_gitignore():
61
+ gi = Path(".gitignore")
62
+ if not gi.exists():
63
+ gi.write_text("# Generated by Runner\n")
64
+ patterns = [".venv", ".venv_deploy", "venv", "__pycache__", "deploy_env", "your_agent_import.py"]
65
+ content = gi.read_text().splitlines()
66
+ for p in patterns:
67
+ if p not in content:
68
+ with gi.open("a") as f:
69
+ f.write(f"{p}\n")
70
+
71
+ @staticmethod
72
+ def _create_agent_import():
73
+ agent_dir = input("Enter the directory where your root_agent (agent.py) lives: ").strip()
74
+ if not Path(agent_dir, "agent.py").exists():
75
+ print(f"Error: {agent_dir}/agent.py not found")
76
+ sys.exit(1)
77
+ import_path = agent_dir.replace("/", ".") + ".agent"
78
+ Path("your_agent_import.py").write_text(f"from {import_path} import root_agent\n")
79
+ print(f"Created your_agent_import.py pointing to {agent_dir}/agent.py")
80
+
81
+ @staticmethod
82
+ def _ensure_venv():
83
+ venv_dir = Path("deploy_env")
84
+ if not venv_dir.exists():
85
+ subprocess.check_call([sys.executable, "-m", "venv", str(venv_dir)])
86
+ print("Created venv at ./deploy_env")
87
+ return str(venv_dir / "bin" / "python")
88
+
89
+ @staticmethod
90
+ def _install_deps(venv_python):
91
+ subprocess.check_call([venv_python, "-m", "pip", "install", "--upgrade", "pip"])
92
+ subprocess.check_call([venv_python, "-m", "pip", "install", "keyring", "keyrings.google-artifactregistry-auth"])
93
+ # Install reasoning-deployment-service itself (current package)
94
+ subprocess.check_call([venv_python, "-m", "pip", "install", "reasoning-deployment-service"])
95
+
96
+ if Path("requirements.txt").exists():
97
+ subprocess.check_call([venv_python, "-m", "pip", "install", "-r", "requirements.txt"])
98
+
99
+ @staticmethod
100
+ def _dispatch(mode, venv_python):
101
+ from your_agent_import import root_agent
102
+ svc = ReasoningEngineDeploymentService(root_agent, deployment_environment="DEV")
103
+
104
+ if mode == "create":
105
+ svc.one_deployment_with_everything_on_it()
106
+ elif mode == "auth":
107
+ svc.one_deployment_with_everything_on_it(skip_engine_step=True)
108
+ elif mode == "cli":
109
+ CLIRunner().run()
110
+ elif mode == "gui":
111
+ GUIEditor().run()
112
+ elif mode == "populate_files":
113
+ svc._check_required_files_exist()
114
+
115
+ @staticmethod
116
+ def _menu(venv_python):
117
+ print("Choose an operation:\n1) Create/Update\n2) Auth only\n3) CLI\n4) GUI\nq) Quit")
118
+ choice = input("Enter choice: ").strip()
119
+ mapping = {"1": "create", "2": "auth", "3": "cli", "4": "gui"}
120
+ if choice.lower() == "q":
121
+ sys.exit(0)
122
+ Runner._dispatch(mapping.get(choice, ""), venv_python)
@@ -1,10 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reasoning-deployment-service
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Deployment helper for Vertex AI Reasoning Engines & Agent Spaces
5
5
  Author: AxG-AI-Exchange-GenAI-Initiative
6
6
  Author-email: Sergio Estrada <sergio.estrada@accenture.com>
7
7
  License: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/AxG-AI-Exchange-GenAI-Initiative/AIXAgentDeploymentService
9
+ Project-URL: Repository, https://github.com/AxG-AI-Exchange-GenAI-Initiative/AIXAgentDeploymentService
10
+ Project-URL: Issues, https://github.com/AxG-AI-Exchange-GenAI-Initiative/AIXAgentDeploymentService/issues
8
11
  Requires-Python: >=3.7
9
12
  Description-Content-Type: text/markdown
10
13
  Requires-Dist: requests>=2.28
@@ -13,10 +16,15 @@ Requires-Dist: google-auth>=2.20
13
16
  Requires-Dist: google-cloud-storage>=2.16
14
17
  Requires-Dist: keyring>=24.0
15
18
  Requires-Dist: keyrings.google-artifactregistry-auth>=1.1
19
+ Requires-Dist: google-cloud-aiplatform>=1.50.0
20
+ Requires-Dist: protobuf<7.0.0,>=4.21
21
+ Requires-Dist: click>=8.0
16
22
  Provides-Extra: dev
17
23
  Requires-Dist: pytest; extra == "dev"
18
24
  Requires-Dist: build; extra == "dev"
19
25
  Requires-Dist: twine; extra == "dev"
26
+ Requires-Dist: black; extra == "dev"
27
+ Requires-Dist: ruff; extra == "dev"
20
28
  Dynamic: author
21
29
  Dynamic: requires-python
22
30
 
@@ -1,5 +1,6 @@
1
1
  reasoning_deployment_service/__init__.py,sha256=xDuKt9gGviQiTV6vXBdkBvygnlAOIrwnUjVaMGZy0L4,670
2
2
  reasoning_deployment_service/reasoning_deployment_service.py,sha256=0QHU2IqqojwFI2wPJ0izrskiHiwBfxdBEB9I_YxYbSA,29133
3
+ reasoning_deployment_service/runner.py,sha256=V3JDWeVaP0q6Xd2iwk8co0Nio8lzQQU2tHbX9VlsrCc,4684
3
4
  reasoning_deployment_service/cli_editor/__init__.py,sha256=bN8NPkw8riB92pj2lAwJZuEMOQIO_RRuge0ehnJTW1I,118
4
5
  reasoning_deployment_service/cli_editor/api_client.py,sha256=PUXPWUslFOksKMrcKjJSK_gVJkTI0bO_bqtCEYeM85g,27897
5
6
  reasoning_deployment_service/cli_editor/cli_runner.py,sha256=w8jv2ep6TiYfpc_KnlvDOJ9hsCSuZcix4Rv4GQcZO4g,15729
@@ -22,7 +23,8 @@ reasoning_deployment_service/gui_editor/src/ui/authorization_view.py,sha256=uiyN
22
23
  reasoning_deployment_service/gui_editor/src/ui/reasoning_engine_view.py,sha256=tCvSPEf4dW0NRdAqfs3yT5Pa873gYeLzCMMIt2r2T4o,14644
23
24
  reasoning_deployment_service/gui_editor/src/ui/reasoning_engines_view.py,sha256=IRjFlBbY98usAZa0roOonjvWQOsF6NBW4bBg_k8KnKI,7860
24
25
  reasoning_deployment_service/gui_editor/src/ui/ui_components.py,sha256=HdQHy-oSZ3GobQ3FNdH7y_w3ANbFiuf2rMoflAmff0A,55366
25
- reasoning_deployment_service-0.3.1.dist-info/METADATA,sha256=VgkjFxLaR6Bn3Sn86i3oTX7Yo2zbl1pKZXmarSNC6qA,4534
26
- reasoning_deployment_service-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- reasoning_deployment_service-0.3.1.dist-info/top_level.txt,sha256=GKuQS1xHUYLZbatw9DmcYdBxxLhWhhGkV4FmFxgKdp0,29
28
- reasoning_deployment_service-0.3.1.dist-info/RECORD,,
26
+ reasoning_deployment_service-0.3.2.dist-info/METADATA,sha256=cp5JoJ-6QATBqi_AxMZ6mo6imJmUITCL26LqA_FDQDs,5027
27
+ reasoning_deployment_service-0.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ reasoning_deployment_service-0.3.2.dist-info/entry_points.txt,sha256=onGKjR5ONTtRv3aqEtK863iw9Ty1kLcjfZlsplkRZrA,84
29
+ reasoning_deployment_service-0.3.2.dist-info/top_level.txt,sha256=GKuQS1xHUYLZbatw9DmcYdBxxLhWhhGkV4FmFxgKdp0,29
30
+ reasoning_deployment_service-0.3.2.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ reasoning-deploy = reasoning_deployment_service.runner:Runner.run