truefoundry 0.2.0rc3__py3-none-any.whl → 0.2.0rc4__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 truefoundry might be problematic. Click here for more details.

@@ -41,7 +41,7 @@ from truefoundry.autodeploy.tools.commit import CommitConfirmation
41
41
  from truefoundry.autodeploy.tools.docker_run import DockerRun, DockerRunLog
42
42
 
43
43
 
44
- def get_openai_client() -> OpenAI:
44
+ def _get_openai_client() -> OpenAI:
45
45
  session = ServiceFoundrySession()
46
46
  if AUTODEPLOY_OPENAI_BASE_URL is not None and AUTODEPLOY_OPENAI_API_KEY is not None:
47
47
  return OpenAI(
@@ -190,11 +190,22 @@ def _get_default_project_name(project_root_path: str):
190
190
  return name
191
191
 
192
192
 
193
+ def _get_docker(console: Console) -> docker.DockerClient:
194
+ try:
195
+ return docker.from_env()
196
+ except Exception:
197
+ console.print_exception(extra_lines=0, max_frames=1)
198
+ console.print(
199
+ "[bold red]Error:[/] Could not connect to Docker, please check whether the Docker daemon is running."
200
+ )
201
+ sys.exit(1)
202
+
203
+
193
204
  def cli(project_root_path: str, deploy: bool):
194
- openai_client = get_openai_client()
195
- docker_client = docker.from_env()
196
- project_root_path = os.path.abspath(project_root_path)
197
205
  console = Console()
206
+ openai_client = _get_openai_client()
207
+ docker_client = _get_docker(console)
208
+ project_root_path = os.path.abspath(project_root_path)
198
209
  console.print(
199
210
  "[bold magenta]TFY-Agent[/]: A tool for building and deploying [magenta]Jobs/Services[/] to the Truefoundry platform."
200
211
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.2.0rc3
3
+ Version: 0.2.0rc4
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhichoudhary06@gmail.com
@@ -5,7 +5,7 @@ truefoundry/autodeploy/agents/base.py,sha256=woCry229x7WX0IZmBopW_e_NB76aCLQRLXZ
5
5
  truefoundry/autodeploy/agents/developer.py,sha256=u1BfjaMDX6Ad32vWYOEFZPWFK33ux0Ro8JztrRAFviY,4126
6
6
  truefoundry/autodeploy/agents/project_identifier.py,sha256=m8xg7U5D2zSLEKp5QyPZRldw4VPuTFM8omPCRC0Ri-w,4428
7
7
  truefoundry/autodeploy/agents/tester.py,sha256=iSnWHubzHPO36Je2nYQYsdxL64xVQ3DxvEnakEJAW1Q,2348
8
- truefoundry/autodeploy/cli.py,sha256=QWOf3YrUzgfvglaS43MYyi3LnmWLBbZF8ntZsvVKTN0,10572
8
+ truefoundry/autodeploy/cli.py,sha256=nTMnmnFhKYOqGM6qSB2Rds_skfn68ZTKyz1LG2Sm5xI,10929
9
9
  truefoundry/autodeploy/constants.py,sha256=4ZHn08CCs_6ti-8Y6zaM_5IhI9mrB-1eDALhbn36oIw,435
10
10
  truefoundry/autodeploy/exception.py,sha256=BHqbkN-RdEsrfqPHQhWwSHiWnwQ6eaBc7PGGEXjJ3RY,54
11
11
  truefoundry/autodeploy/logger.py,sha256=tkV2UKcOTFl5nz0cn4eRbzxF-2CZd8b7MK9vnhaflYw,325
@@ -27,7 +27,7 @@ truefoundry/cli/__main__.py,sha256=gSKVAG41klzNpe0IrURtRlR7zDo430tX0nEqR02L2SU,1
27
27
  truefoundry/deploy/__init__.py,sha256=rY-AcjgSmu0r072rdUNpRkMmDFC7hH9drF5_pIN5jnw,29
28
28
  truefoundry/langchain/__init__.py,sha256=R1h2DkLLsVLPh3xVVzU2H_kpN4LNgzx3mPCcGVr2u5g,39
29
29
  truefoundry/ml/__init__.py,sha256=SJiI5QimXJETfME2x0iXz8gPn6C22YNiLiEdHIV1g7c,151
30
- truefoundry-0.2.0rc3.dist-info/METADATA,sha256=CuNSdxJPNngMDunPDi-FFb4hULsoPeqZ9_a85jgwbp0,1838
31
- truefoundry-0.2.0rc3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
- truefoundry-0.2.0rc3.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
33
- truefoundry-0.2.0rc3.dist-info/RECORD,,
30
+ truefoundry-0.2.0rc4.dist-info/METADATA,sha256=yBcQM45dYziSC46pHzgC7zsFTYIsaC8iO1qCqBu3AGo,1838
31
+ truefoundry-0.2.0rc4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ truefoundry-0.2.0rc4.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
33
+ truefoundry-0.2.0rc4.dist-info/RECORD,,