truefoundry 0.1.2__py3-none-any.whl → 0.2.0rc2__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.

@@ -0,0 +1,19 @@
1
+ from typing import Any, Dict, Type
2
+
3
+ import pydantic
4
+
5
+ PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
6
+
7
+
8
+ def model_dump(
9
+ model: pydantic.BaseModel,
10
+ ) -> Dict[str, Any]:
11
+ if PYDANTIC_V2:
12
+ return model.model_dump()
13
+ return model.dict()
14
+
15
+
16
+ def model_json_schema(model: Type[pydantic.BaseModel]) -> Dict[str, Any]:
17
+ if PYDANTIC_V2:
18
+ return model.model_json_schema()
19
+ return model.schema()
@@ -2,19 +2,42 @@ import sys
2
2
 
3
3
  import click
4
4
  from servicefoundry.cli import create_servicefoundry_cli
5
+ from servicefoundry.cli.const import COMMAND_CLS
5
6
 
7
+ from truefoundry.autodeploy.exception import GitBinaryNotFoundException
8
+
9
+ AUTODEPLOY_INSTALLED = True
6
10
  MLFOUNDRY_INSTALLED = True
11
+ GIT_BINARY = True
12
+
7
13
  try:
8
14
  from mlfoundry.cli.commands import download
9
15
  except ImportError:
10
16
  MLFOUNDRY_INSTALLED = False
11
17
 
18
+ try:
19
+ from truefoundry.autodeploy.cli import autodeploy_cli
20
+ except ImportError:
21
+ AUTODEPLOY_INSTALLED = False
22
+ except GitBinaryNotFoundException:
23
+ GIT_BINARY = False
24
+
12
25
 
13
26
  @click.group()
14
27
  def ml():
15
28
  """MlFoundry CLI"""
16
29
 
17
30
 
31
+ @click.command(name="auto-deploy", cls=COMMAND_CLS)
32
+ def handle_git_error():
33
+ """
34
+ Build and deploy projects using Truefoundry
35
+ """
36
+ raise click.UsageError(
37
+ "The 'git' command could not be found. Please ensure Git is available in your system to run auto-deploy."
38
+ )
39
+
40
+
18
41
  def main():
19
42
  # Exit the interpreter by raising SystemExit(status).
20
43
  # If the status is omitted or None, it defaults to zero (i.e., success).
@@ -24,6 +47,12 @@ def main():
24
47
  if MLFOUNDRY_INSTALLED:
25
48
  ml.add_command(download)
26
49
  cli.add_command(ml)
50
+ if AUTODEPLOY_INSTALLED:
51
+ if GIT_BINARY:
52
+ cli.add_command(autodeploy_cli)
53
+ else:
54
+ cli.add_command(handle_git_error)
55
+
27
56
  sys.exit(cli())
28
57
 
29
58
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.1.2
3
+ Version: 0.2.0rc2
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhichoudhary06@gmail.com
@@ -12,7 +12,15 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Provides-Extra: ml
15
+ Requires-Dist: docker (>=7.0.0,<8.0.0)
16
+ Requires-Dist: gitignorefile (>=1.1.2,<2.0.0)
17
+ Requires-Dist: gitpython (>=3.1.43,<4.0.0)
15
18
  Requires-Dist: mlfoundry (==0.10.9) ; extra == "ml"
19
+ Requires-Dist: openai (>=1.16.2,<2.0.0)
20
+ Requires-Dist: pydantic (>=1.10.0,<3)
21
+ Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
22
+ Requires-Dist: requests (>=2.31.0,<3.0.0)
23
+ Requires-Dist: rich (>=13.7.1,<14.0.0)
16
24
  Requires-Dist: servicefoundry (==0.10.6)
17
25
  Description-Content-Type: text/markdown
18
26
 
@@ -0,0 +1,33 @@
1
+ truefoundry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ truefoundry/autodeploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ truefoundry/autodeploy/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ truefoundry/autodeploy/agents/base.py,sha256=woCry229x7WX0IZmBopW_e_NB76aCLQRLXZBs2QBklk,6405
5
+ truefoundry/autodeploy/agents/developer.py,sha256=u1BfjaMDX6Ad32vWYOEFZPWFK33ux0Ro8JztrRAFviY,4126
6
+ truefoundry/autodeploy/agents/project_identifier.py,sha256=m8xg7U5D2zSLEKp5QyPZRldw4VPuTFM8omPCRC0Ri-w,4428
7
+ truefoundry/autodeploy/agents/tester.py,sha256=iSnWHubzHPO36Je2nYQYsdxL64xVQ3DxvEnakEJAW1Q,2348
8
+ truefoundry/autodeploy/cli.py,sha256=sF9eIM8y3z26v50BtnLBsWJdcreBIznxp002990BJ4g,10660
9
+ truefoundry/autodeploy/constants.py,sha256=4ZHn08CCs_6ti-8Y6zaM_5IhI9mrB-1eDALhbn36oIw,435
10
+ truefoundry/autodeploy/exception.py,sha256=BHqbkN-RdEsrfqPHQhWwSHiWnwQ6eaBc7PGGEXjJ3RY,54
11
+ truefoundry/autodeploy/logger.py,sha256=tkV2UKcOTFl5nz0cn4eRbzxF-2CZd8b7MK9vnhaflYw,325
12
+ truefoundry/autodeploy/tools/__init__.py,sha256=9zJiC1d4bv9EL-p5XTCa9fAQ6ZKV--AbgeLz9bBBkyQ,875
13
+ truefoundry/autodeploy/tools/ask.py,sha256=fOKZiN7xI11OyGXG7RABwy6OPf_KGx48NhY8vggB-g4,854
14
+ truefoundry/autodeploy/tools/base.py,sha256=X7bBhJ2-mkc1_uo9dLtIoZOgKsvoCsmvCzdh_j0rdys,665
15
+ truefoundry/autodeploy/tools/commit.py,sha256=gmA_TFPGVtXHYTHeeca8OXI9c11BSCTSywQjkiAeqDQ,5890
16
+ truefoundry/autodeploy/tools/docker_build.py,sha256=6LfWLJYh3Y3kCIVOC8lFcZjWHIk3iWEuw_qoAxx642k,3931
17
+ truefoundry/autodeploy/tools/docker_run.py,sha256=9TpT4rcpeJTpsSg0YwQpqF-mYPyxnUUCKcHkD-VoO_M,5076
18
+ truefoundry/autodeploy/tools/file_type_counts.py,sha256=4p6IHp-j1vBzELpepFhNwfmB88cUUAFdVDQdzv4lGtM,2288
19
+ truefoundry/autodeploy/tools/list_files.py,sha256=9z_Nih_N8v7qe14znl7_-3MKZjw5RylVyy7L8qvU1es,2577
20
+ truefoundry/autodeploy/tools/read_file.py,sha256=h1xdwRMxuRTLX4ZprzSgfkpuu52FbYNrQUJDBW3Ck4A,1751
21
+ truefoundry/autodeploy/tools/send_request.py,sha256=5q_fAo0tXRiHg9M3XpdwhCzUtDUWVh17239oU4LkZfI,1614
22
+ truefoundry/autodeploy/tools/write_file.py,sha256=EcYetnJ4X-NWsd_CdYUKfOnAdz2XXiRukTzJfb_GzFs,3130
23
+ truefoundry/autodeploy/utils/diff.py,sha256=Ef8Y-VffDKel_-q-GxRam6gqiv8qTLMcqVg6iifXfcA,5358
24
+ truefoundry/autodeploy/utils/pydantic_compat.py,sha256=hEAUy5kLjhPdzw7yGZ2iXGMXbbMVXVlGzIofmyHafXQ,412
25
+ truefoundry/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ truefoundry/cli/__main__.py,sha256=gSKVAG41klzNpe0IrURtRlR7zDo430tX0nEqR02L2SU,1585
27
+ truefoundry/deploy/__init__.py,sha256=rY-AcjgSmu0r072rdUNpRkMmDFC7hH9drF5_pIN5jnw,29
28
+ truefoundry/langchain/__init__.py,sha256=R1h2DkLLsVLPh3xVVzU2H_kpN4LNgzx3mPCcGVr2u5g,39
29
+ truefoundry/ml/__init__.py,sha256=SJiI5QimXJETfME2x0iXz8gPn6C22YNiLiEdHIV1g7c,151
30
+ truefoundry-0.2.0rc2.dist-info/METADATA,sha256=b-0TtOzIbfzItgURpuk2-gWoEGuf_kbChHWirKzIyaM,1838
31
+ truefoundry-0.2.0rc2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
32
+ truefoundry-0.2.0rc2.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
33
+ truefoundry-0.2.0rc2.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- truefoundry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- truefoundry/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- truefoundry/cli/__main__.py,sha256=AOayL_PxcWZ8Qn2fGX_JMvlyd2bhKImFYolxJZh2WI4,794
4
- truefoundry/deploy/__init__.py,sha256=rY-AcjgSmu0r072rdUNpRkMmDFC7hH9drF5_pIN5jnw,29
5
- truefoundry/langchain/__init__.py,sha256=R1h2DkLLsVLPh3xVVzU2H_kpN4LNgzx3mPCcGVr2u5g,39
6
- truefoundry/ml/__init__.py,sha256=SJiI5QimXJETfME2x0iXz8gPn6C22YNiLiEdHIV1g7c,151
7
- truefoundry-0.1.2.dist-info/METADATA,sha256=UjIwn98qoC0Jwd1wVbKiREJKF4RkLbjFACMe-N5Gy2c,1502
8
- truefoundry-0.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
9
- truefoundry-0.1.2.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
10
- truefoundry-0.1.2.dist-info/RECORD,,