gibson-cli 0.5.4__py3-none-any.whl → 0.5.5__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.
gibson/api/BaseApi.py CHANGED
@@ -2,6 +2,7 @@ import os
2
2
 
3
3
  import requests
4
4
 
5
+ import gibson.core.Colors as Colors
5
6
  from gibson.core.Configuration import Configuration
6
7
 
7
8
 
@@ -83,9 +84,9 @@ class BaseApi:
83
84
 
84
85
  def __raise_for_status(self, r):
85
86
  if r.status_code == 401:
86
- print("\n\nYou need to log in to continue. Please run:\n")
87
- print(" gibson auth login\n\n")
88
- print("and then try again.\n")
87
+ self.configuration.conversation.type(
88
+ f"\nYou need to log in to continue. Please run {Colors.command('gibson')} {Colors.subcommand('auth')} {Colors.argument('login')} and then try again.\n"
89
+ )
89
90
  exit(1)
90
91
 
91
92
  try:
gibson/command/Show.py CHANGED
@@ -27,7 +27,7 @@ class Show(BaseCommand):
27
27
 
28
28
  for entity in sorted(entities, key=lambda x: x["name"]):
29
29
  statement = entity["definition"].replace(
30
- entity["name"], Colors.argument(entity["name"])
30
+ entity["name"], Colors.argument(entity["name"]), 1
31
31
  )
32
32
  print(f"\n{statement}")
33
33
 
@@ -86,8 +86,6 @@ class Entity(BaseCommand):
86
86
  self.configuration.display_project()
87
87
  definition = self.configure_definition()
88
88
 
89
- self.conversation.c64_boot_search()
90
-
91
89
  self.__context = CodeContextSchemaManager().from_code_writer_schema_context(
92
90
  cli.code_writer_schema_context()
93
91
  )
@@ -156,10 +154,10 @@ class Entity(BaseCommand):
156
154
  entity = Entity().import_from_struct(data)
157
155
 
158
156
  def get_default_ref_table_template_path(self):
159
- return os.path.dirname(__file__) + "/../data/default-ref-table.tmpl"
157
+ return os.path.dirname(__file__) + "/../../data/default-ref-table.tmpl"
160
158
 
161
159
  def get_default_table_template_path(self):
162
- return os.path.dirname(__file__) + "/../data/default-table.tmpl"
160
+ return os.path.dirname(__file__) + "/../../data/default-table.tmpl"
163
161
 
164
162
  def __render_workspace(self, entity: Entity, model):
165
163
  self.configuration.platform.cmd_clear()
@@ -10,6 +10,12 @@ class Projects(BaseCommand):
10
10
  self.configuration.require_login()
11
11
  projects = ProjectApi(self.configuration).all_projects()
12
12
 
13
+ if len(projects) == 0:
14
+ self.conversation.type(
15
+ f"No projects found. Create one with {Colors.command('gibson')} {Colors.subcommand('new')} {Colors.argument('project')}\n"
16
+ )
17
+ exit(1)
18
+
13
19
  self.conversation.type("Name".ljust(40))
14
20
  self.conversation.type("ID")
15
21
  self.conversation.newline()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.5.4
3
+ Version: 0.5.5
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -1,6 +1,6 @@
1
1
  bin/build.sh,sha256=H3TAd349BECbcK3_t_jW9VzoLInMNrXtaLnXMEVanew,49
2
2
  bin/release.sh,sha256=LxPqH5kxhLKvzHaPRLBlq_ApaK7FHEteH4SzeRenidk,49
3
- gibson/api/BaseApi.py,sha256=DYSo_AcJUwZ0NSsqeJbEorKa3LRQwU4EVqvoISRHvk8,2924
3
+ gibson/api/BaseApi.py,sha256=tLY4IahK9Ppy5gfYvlayRb46852UFq0mHKMmv8aF6xc,3033
4
4
  gibson/api/Cli.py,sha256=KvlMDvcMh7i6p3yGeikGmfi4HjUWb49RncJyF-J-9lM,7752
5
5
  gibson/api/ProjectApi.py,sha256=T7TqtywJjrzFIfARenQUsrH-80x9Oo1pABbFAdlQkI0,356
6
6
  gibson/bin/gibson.py,sha256=N1mAWaww9pw8s5u0et87FC5cFHVU6JzN4Kls3lDn-xw,354
@@ -19,7 +19,7 @@ gibson/command/OpenApi.py,sha256=G1LGfco0PgMIBw4C_ksja2_0nKKnZzUoiNl2iY64QKw,431
19
19
  gibson/command/Question.py,sha256=8mWumOFKBeS_Lw8_4vF6eDIEx3kdbIwz11mLtY6e9zo,3998
20
20
  gibson/command/Remove.py,sha256=mDDpfQV3ggppGSFf9v09exdr2ZG_Qat60CjSBwcvX4A,2436
21
21
  gibson/command/Schema.py,sha256=zg10N6uHL37CHQRx8fH00kKS6loSS9kpFe_yv1K6-j8,1289
22
- gibson/command/Show.py,sha256=5fzNtDJvnQm7-w8fbF8vu6pmH31vugVDEVi_VgRXRQ0,1586
22
+ gibson/command/Show.py,sha256=odBwJ-VXIjTnopnys586LSWm5HunfLgeNLxt-aFAPng,1589
23
23
  gibson/command/Test.py,sha256=HBwroaudQ1BSEsRDbv8MOOUiwXFjJgCUNnSFUi6uX3s,1283
24
24
  gibson/command/Tree.py,sha256=BeJ_13xrrRCK5FP2rQHWpDKrshVzte-_D1pNG1GXPIw,3056
25
25
  gibson/command/Version.py,sha256=YLd2c9eiVT6Xzj-ulRuL9QSiu21Fid2Jp_B7nD6k86o,1267
@@ -28,10 +28,10 @@ gibson/command/auth/Auth.py,sha256=rkWhAast68jL-_XVRU-3mIx2_ntlgmAJuwYx37gNVEI,1
28
28
  gibson/command/auth/Login.py,sha256=b43OfV76i6aGdOwj1NK64ZOdYlNyc08g3lZGQ_37KDw,437
29
29
  gibson/command/auth/Logout.py,sha256=V01q4TdbiBqCnIrM6IA4T25fO6ws0UpXp42I3pwHZVM,248
30
30
  gibson/command/code/Code.py,sha256=9LUrenkSr51WjVaP11ebvKvgjs9fOl8ase-A6OS2aPE,977
31
- gibson/command/code/Entity.py,sha256=R-R4URE5XKkLN2oxsBSrkAmx3edO9FryYzTMxkDC6WQ,6170
31
+ gibson/command/code/Entity.py,sha256=b6BqDUNcBS_yny_v0BahxLhr7dap5-_YOi5asqer6KA,6131
32
32
  gibson/command/list/Entities.py,sha256=4qUxR5pBsUwnaW3SZQzCVbwyl_sCfM9lD9TWwipSyWw,1869
33
33
  gibson/command/list/List.py,sha256=r6YQdaeMRgFKcz-VyEQTE_I2lRaaJ4kew3E_RKKaaTU,1047
34
- gibson/command/list/Projects.py,sha256=FAPahdzMs-zkr43ULtrPmo_3OOxtoCnaASyJ9h5iJlU,899
34
+ gibson/command/list/Projects.py,sha256=yR4o0eZFYxORLiEe0Z5Vs9T-hKb1NxrGVUOCrYx9qDM,1140
35
35
  gibson/command/new/Module.py,sha256=MFbE4XY7YZz0I-SfxHxWe4FYiJHBssI2knATy1yuqs0,1599
36
36
  gibson/command/new/New.py,sha256=yAES_nhiZcv3Jo9kb2E_YfAiVAcnRoeE6Ftd1PqQbQ8,1256
37
37
  gibson/command/new/Project.py,sha256=sExmNYDKWMIohAoBiF73nkVubgy6iMleaknXW8fWZJA,657
@@ -113,8 +113,8 @@ gibson/structure/tests/test_Entity.py,sha256=Gl9f1NcEKdpWCx4W3takFFzp18mLhCYWKrd
113
113
  gibson/tests/test_Env.py,sha256=DPWmP0-aEelducq9bAwv7rKoY2NjWXUeCrzfJDQkn2M,369
114
114
  gibson/tests/test_Memory.py,sha256=YP7owToABAk_-s7fD5UG0HTc4lamDjdA39JUlLnk3Fg,2574
115
115
  gibson/tests/test_utils.py,sha256=r_y-EG05YTCNtL8MWiAK1KmPsmeoMgypKsQC_lVgOtM,559
116
- gibson_cli-0.5.4.dist-info/METADATA,sha256=_4GEBjQAXRdXxote3GwcNk7JCyDGCfxLo_dPuJY3Vck,11605
117
- gibson_cli-0.5.4.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
118
- gibson_cli-0.5.4.dist-info/entry_points.txt,sha256=j5VUvq3AzL21xPvVC24zMoXFt-I5lUWulr66nL3OAPM,50
119
- gibson_cli-0.5.4.dist-info/top_level.txt,sha256=RFaUY7VXGiqkMwo1Rj7pM4kGvxkhhnfo-2LmPpuL_fs,11
120
- gibson_cli-0.5.4.dist-info/RECORD,,
116
+ gibson_cli-0.5.5.dist-info/METADATA,sha256=D0UtPeqkOnZXtaPm_gaV37dnbHi55CDr0FlLQhpccLI,11605
117
+ gibson_cli-0.5.5.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
118
+ gibson_cli-0.5.5.dist-info/entry_points.txt,sha256=j5VUvq3AzL21xPvVC24zMoXFt-I5lUWulr66nL3OAPM,50
119
+ gibson_cli-0.5.5.dist-info/top_level.txt,sha256=RFaUY7VXGiqkMwo1Rj7pM4kGvxkhhnfo-2LmPpuL_fs,11
120
+ gibson_cli-0.5.5.dist-info/RECORD,,