truefoundry 0.2.2rc3__py3-none-any.whl → 0.2.2rc4__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.

@@ -28,7 +28,6 @@ from truefoundry.autodeploy.agents.project_identifier import (
28
28
  from truefoundry.autodeploy.agents.tester import Tester
29
29
  from truefoundry.autodeploy.constants import (
30
30
  ABOUT_AUTODEPLOY,
31
- AUTODEPLOY_INTRO_MESSAGE,
32
31
  AUTODEPLOY_OPENAI_API_KEY,
33
32
  AUTODEPLOY_OPENAI_BASE_URL,
34
33
  AUTODEPLOY_TFY_BASE_URL,
@@ -188,7 +187,7 @@ def _check_repo(project_root_path: str, console: Console):
188
187
  sys.exit(1)
189
188
 
190
189
 
191
- def _update_status(event, status: Status):
190
+ def _update_status(event, status: Status, component_type: ComponentType):
192
191
  if isinstance(event, (AskQuestion, CommitConfirmation)):
193
192
  status.stop()
194
193
 
@@ -210,9 +209,14 @@ def _update_status(event, status: Status):
210
209
  )
211
210
 
212
211
  if isinstance(event, DockerRunLog):
213
- status.update(
214
- "[bold cyan]Running:[/] [bold magenta]TrueFoundry[/] is running your app in a Docker container. You can view logs here for potential warnings/errors. If you do not see any issues then you can press [yellow]control + c[/] to move to the next step."
215
- )
212
+ if component_type == ComponentType.SERVICE:
213
+ status.update(
214
+ "[bold cyan]Running:[/] [bold magenta]TrueFoundry[/] is running your app in a Docker container. Press ctrl+c once your app is ready for testing."
215
+ )
216
+ else:
217
+ status.update(
218
+ "[bold cyan]Running:[/] [bold magenta]TrueFoundry[/] is running your app in a Docker container and waiting for completion."
219
+ )
216
220
 
217
221
 
218
222
  def _get_default_project_name(project_root_path: str):
@@ -238,7 +242,6 @@ def cli(project_root_path: str, deploy: bool, workspace_fqn: str = None):
238
242
  docker_client = _get_docker(console)
239
243
  project_root_path = os.path.abspath(project_root_path)
240
244
  console.print(ABOUT_AUTODEPLOY)
241
- console.print(AUTODEPLOY_INTRO_MESSAGE)
242
245
  console.print(
243
246
  "[bold reverse]You will need to have Docker and Git installed on your machine for this to work[/]"
244
247
  )
@@ -328,7 +331,9 @@ def cli(project_root_path: str, deploy: bool, workspace_fqn: str = None):
328
331
  try:
329
332
  status.start()
330
333
  event = developer_run.send(inp)
331
- _update_status(event=event, status=status)
334
+ _update_status(
335
+ event=event, status=status, component_type=component_type
336
+ )
332
337
  inp = event.render(console)
333
338
  except StopIteration as ex:
334
339
  response = ex.value
@@ -10,15 +10,9 @@ AUTODEPLOY_OPENAI_API_KEY = os.environ.get("AUTODEPLOY_OPENAI_API_KEY")
10
10
  AUTODEPLOY_MODEL_NAME = os.environ.get(
11
11
  "AUTODEPLOY_MODEL_NAME", "auto-deploy-openai/gpt-4-turbo-2024-04-09"
12
12
  )
13
- AUTODEPLOY_INTRO_MESSAGE = """Truefoundry will first check for a [blue]Dockerfile[/] in your project.
14
- If it's not present, Truefoundry will generate one for you.
15
- Then, it will attempt to build a Docker image on your machine.
16
- If any issues are encountered during this process, Truefoundry will attempt to automatically fix them.
17
- Finally, it will run the application to verify that everything is set up correctly.
18
- """
19
- ABOUT_AUTODEPLOY = """To deploy your project, we will generate the deployment configuration using AI.
20
- We will analyze your codebase using our AI agent and make the required changes so that we can build and deploy the code.
21
- We will confirm all the changes with you.
13
+ ABOUT_AUTODEPLOY = """We'll use AI to build and deploy your project automatically.
14
+ Our AI Agent analyzes your codebase, checks for a Dockerfile, creates one if missing, builds a Docker image, fixes any issues, and runs the application to ensure we have built it correctly.
15
+ If you don't want to use our AI Agent to deploy automatically, create a [green]truefoundry.yaml[/] file in your project's root.
22
16
  """
23
17
  # The maximum file size to read is set to 10KB.
24
18
  # This limit is determined by the token limit of the LLM used, which is 128,000 tokens.
@@ -54,7 +54,7 @@ Get counts of different types of file present.
54
54
  self, request: FileTypeCounts.Request
55
55
  ) -> Generator[Event, Any, ResponseEvent]:
56
56
  counter = Counter()
57
- yield Rule(message="List Files")
57
+ yield Rule(message="[bold green]File Counts[/]")
58
58
  yield Message(
59
59
  message="[bold cyan]Processing:[/] Scanning for various file types..."
60
60
  )
@@ -42,7 +42,7 @@ the subdir should be . and pattern will be *.json
42
42
  self.project_root_path = project_root_path
43
43
 
44
44
  def run(self, request: ListFiles.Request) -> Generator[Event, Any, ResponseEvent]:
45
- yield Rule(message="[bold green] List Files[/]")
45
+ yield Rule(message="[bold green]List Files[/]")
46
46
  yield Message(
47
47
  message=f"[bold cyan]Searching:[/] 🔍 Looking for files matching the pattern [magenta]{request.pattern}[/]"
48
48
  )
@@ -34,7 +34,7 @@ Send an HTTP request.
34
34
 
35
35
  def run(self, request: SendRequest.Request) -> Generator[Event, Any, ResponseEvent]:
36
36
  self.call_count += 1
37
- yield Rule(message="[bold green] Request send[/]")
37
+ yield Rule(message="[bold green]Endpoint Verification[/]")
38
38
  yield Message(
39
39
  message=f"[bold cyan]Testing:[/] Sending a [magenta]{request.method.upper()}[/] request to [magenta]{request.url}[/]"
40
40
  )
@@ -89,13 +89,6 @@ def deploy_v2_command(file: str, workspace_fqn: str, wait: bool):
89
89
  )
90
90
  sys.exit(1)
91
91
 
92
- click.echo(
93
- click.style(
94
- 'We will be using TrueFoundry AI to build your project.\nIf you wish to proceed without TrueFoundry AI,\nyou need to either have a truefoundry.yaml file in your project root or\npass the path to a yaml file using the "--file file_name" option.',
95
- fg="yellow",
96
- ),
97
- )
98
-
99
92
  try:
100
93
  autodeploy_cli(project_root_path=".", deploy=True, workspace_fqn=workspace_fqn)
101
94
  except InvalidRequirementsException as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.2.2rc3
3
+ Version: 0.2.2rc4
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhichoudhary06@gmail.com
@@ -5,8 +5,8 @@ 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=JVaBUI_u4IVuohzYyEqojYUzKBxKkSXyqPnzzh-prJA,4504
7
7
  truefoundry/autodeploy/agents/tester.py,sha256=9WSVU2MNiamdUNJYrHXDcEq_Q544LSElJ6Nt3XkJ8TU,2402
8
- truefoundry/autodeploy/cli.py,sha256=icBmyD3Xhg0wSyFN6eLDSIaS2xxHaHZRYMssEdRvCFY,13806
9
- truefoundry/autodeploy/constants.py,sha256=m3qQh2gsrqRLqiTbxmddS8CwWX9v7s7oEBHOEvHbFec,1553
8
+ truefoundry/autodeploy/cli.py,sha256=LdiHhxe6MBv_6Gyz5vsXESgJf1RwtdLWQ9ekiX0y-pA,13989
9
+ truefoundry/autodeploy/constants.py,sha256=vTh2nA7cjqghqbW2rNh3FbtcIk2scdAWZuuQCmVBO80,1273
10
10
  truefoundry/autodeploy/exception.py,sha256=fa_ZyTDUKiMKG2Uayynk1yWcEMsuVluqk2GtV4tfTPU,158
11
11
  truefoundry/autodeploy/logger.py,sha256=tkV2UKcOTFl5nz0cn4eRbzxF-2CZd8b7MK9vnhaflYw,325
12
12
  truefoundry/autodeploy/tools/__init__.py,sha256=9zJiC1d4bv9EL-p5XTCa9fAQ6ZKV--AbgeLz9bBBkyQ,875
@@ -15,10 +15,10 @@ truefoundry/autodeploy/tools/base.py,sha256=eS30LQhUjQkRhFqHmdor7HgWA9kcwFVCfAWE
15
15
  truefoundry/autodeploy/tools/commit.py,sha256=bB5kqAY5rEvfc7ZHtdueXusGznAbk58xqvzSKAXzbSE,6036
16
16
  truefoundry/autodeploy/tools/docker_build.py,sha256=TwSvmxrjBkI7PcPhjIzsc8oTA6fWzPIIpkMv2zMpb-E,4000
17
17
  truefoundry/autodeploy/tools/docker_run.py,sha256=8skvqF9zmZSIBbWkmJsmOyQRVz8ttw1SVjPhjGwDq24,5061
18
- truefoundry/autodeploy/tools/file_type_counts.py,sha256=9RuSyIKNKydSdMxIw1cCiljpbVFVEOu9kOfomRr4ufU,2338
19
- truefoundry/autodeploy/tools/list_files.py,sha256=KgFk50lOjrIsjwmf4A_2recKivLUEcdc1Q57SaYA1v4,2644
18
+ truefoundry/autodeploy/tools/file_type_counts.py,sha256=RAiArWx2q1WBALJq6LKN8XMrtwecZiQrD6VtAdmTuvE,2354
19
+ truefoundry/autodeploy/tools/list_files.py,sha256=p7vvLMWtNu9X1K29Hy4i3i_UzW4cOlu7OkQeY67QLSw,2643
20
20
  truefoundry/autodeploy/tools/read_file.py,sha256=uejLuCB9Tjki0-Ud_mk5fuo9nmKRHYHYqqzCTE1nuyo,2254
21
- truefoundry/autodeploy/tools/send_request.py,sha256=E8eSV3jqY-M2_56ZQ9C38pzmWeP6drgJjNQMrUdrrpc,1680
21
+ truefoundry/autodeploy/tools/send_request.py,sha256=0Si6tdNEK152GUUkLPKKfV6K5vaS8kPw2FKIstRJKAA,1688
22
22
  truefoundry/autodeploy/tools/write_file.py,sha256=EcYetnJ4X-NWsd_CdYUKfOnAdz2XXiRukTzJfb_GzFs,3130
23
23
  truefoundry/autodeploy/utils/client.py,sha256=PvbSkfgAjAogGjisinqmh4mP4svowxAC0IwzEQz3Ai0,453
24
24
  truefoundry/autodeploy/utils/diff.py,sha256=Ef8Y-VffDKel_-q-GxRam6gqiv8qTLMcqVg6iifXfcA,5358
@@ -28,11 +28,11 @@ truefoundry/cli/__main__.py,sha256=Jap_IddZ9zNyMIyIkCw75xHQCN0WtV2dPZJ_pzdLsVc,9
28
28
  truefoundry/deploy/__init__.py,sha256=wDQq3y-t9zOEOVA61t15fRpAVQSpBtiWTyW5hVn1iz4,43
29
29
  truefoundry/deploy/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  truefoundry/deploy/cli/cli.py,sha256=tch2v6-GDt_OeEHu_9kcScQFHe0XBlagnz_GWHwOJwc,3143
31
- truefoundry/deploy/cli/deploy.py,sha256=hOb0GY1tiPzKy5P85iYAML0WyGSmKBXJgwxD5k5VoME,5105
31
+ truefoundry/deploy/cli/deploy.py,sha256=PRIHiFWDArbjwzKNlWJNvwrlq66appuMnJiatZNWQ9s,4767
32
32
  truefoundry/deploy/cli/version.py,sha256=-wbVGV2uJ2DVdmoji4rGfVIROKTXG5_7G6DRXjGj_fE,127
33
33
  truefoundry/langchain/__init__.py,sha256=kQrM0qr2EoB-EFaPkVVVcmSBSJ8KsQzv0nx-LGzmCRo,53
34
34
  truefoundry/ml/__init__.py,sha256=yFjvF-e1RW488vLHgn5M7TXoajqww6grkKHb3mhqDEw,179
35
- truefoundry-0.2.2rc3.dist-info/METADATA,sha256=rPU8wZAN66l2L9iOgfsB_16XXYzhp_GscWcfjQ6CY5c,1839
36
- truefoundry-0.2.2rc3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
37
- truefoundry-0.2.2rc3.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
38
- truefoundry-0.2.2rc3.dist-info/RECORD,,
35
+ truefoundry-0.2.2rc4.dist-info/METADATA,sha256=exg7YKlzd6RmvrMtCsOGb1Y5IpljfdBM4Gt6uCOXrWQ,1839
36
+ truefoundry-0.2.2rc4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
37
+ truefoundry-0.2.2rc4.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
38
+ truefoundry-0.2.2rc4.dist-info/RECORD,,