naas-abi-cli 1.8.1__py3-none-any.whl → 1.9.1__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.
@@ -27,5 +27,15 @@ class ABIModule(BaseModule):
27
27
  pass
28
28
  # example: str
29
29
 
30
+ # on_initialized is called by the engine after all modules and services have been fully loaded.
31
+ # At this point, you can safely access other modules and services through the engine's interfaces.
32
+ # Override this method to implement any post-initialization logic your module requires.
30
33
  def on_initialized(self):
31
34
  super().on_initialized()
35
+
36
+ # The on_load method is invoked during initial module loading by the engine.
37
+ # At this point, avoid accessing services or other modules, as they have not been loaded yet.
38
+ # Place any logic here that must occur right as the module is loaded, before initialization.
39
+ # You can see it as the constructor of the module.
40
+ def on_load(self):
41
+ super().on_load()
@@ -2,12 +2,12 @@ import os
2
2
  import shutil
3
3
 
4
4
  import jinja2
5
- import rich
6
5
  from jinja2 import Environment, meta
6
+ from rich.prompt import Prompt
7
7
 
8
8
 
9
9
  class ValueProvider(dict):
10
- def collect_values(self, template_string: str) -> dict:
10
+ def collect_values(self, template_string: str) -> None:
11
11
  env = Environment() # add your filters/tests if you use them
12
12
  ast = env.parse(template_string)
13
13
  needed = meta.find_undeclared_variables(ast)
@@ -15,7 +15,7 @@ class ValueProvider(dict):
15
15
  for name in sorted(needed):
16
16
  if name in self:
17
17
  continue
18
- self[name] = rich.prompt.Prompt.ask(f"Enter value for '{name}'")
18
+ self[name] = Prompt.ask(f"Enter value for '{name}'")
19
19
 
20
20
 
21
21
  class Copier:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naas-abi-cli
3
- Version: 1.8.1
3
+ Version: 1.9.1
4
4
  Summary: Abi cli allowing you to build your AI system.
5
5
  Project-URL: Homepage, https://github.com/jupyter-naas/abi
6
6
  Project-URL: Repository, https://github.com/jupyter-naas/abi/tree/main/libs/naas-abi-cli
@@ -13,7 +13,7 @@ naas_abi_cli/cli/new/module.py,sha256=X4n9VId4wm5HcMNb5iO9dOuXxFYxlIqSEh2tYlCefb
13
13
  naas_abi_cli/cli/new/new.py,sha256=sfNmeoNZLGhjKRKSHuwEl1vtuxWR_SII0qOo9BVoEwY,55
14
14
  naas_abi_cli/cli/new/project.py,sha256=YSxBgJdMVYqWHGwXs9gxRMKA5Q6uRPPaJ_G5UJ4q5_4,2232
15
15
  naas_abi_cli/cli/new/utils.py,sha256=E8ICN4Z8gYYS-Z4nOLld8sY8lHWs6yXFm5lePq9ICFs,336
16
- naas_abi_cli/cli/new/templates/module/__init__.py,sha256=RrPtAs9r4Kf6ZUNkrA2P9BAmQftVZYnid5hZrT7A6wE,912
16
+ naas_abi_cli/cli/new/templates/module/__init__.py,sha256=OzGgLvjdv0eF_l34j55VBAUYHPUz3jk-TBVP0wKrpY0,1588
17
17
  naas_abi_cli/cli/new/templates/module/agents/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  naas_abi_cli/cli/new/templates/module/agents/{{module_name_pascal}}Agent.py,sha256=Swgms8NI2DFAelf484mu0vNqfmT5NB9DKBtq6Ny-D1s,1323
19
19
  naas_abi_cli/cli/new/templates/module/orchestrations/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -24,10 +24,10 @@ naas_abi_cli/cli/new/templates/project/Dockerfile,sha256=1qKIDdqwc_JYJE9ROHFqsq3
24
24
  naas_abi_cli/cli/new/templates/project/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  naas_abi_cli/cli/new/templates/project/pyproject.toml,sha256=9MHoNOtG2DkS4LE1GZwBFF6Frw4gsl-hb5Mojba0AUM,540
26
26
  naas_abi_cli/cli/new/templates/project/.github/workflows/release.yaml,sha256=7uV4SE20zvAfJKr1caKLbHIC3eyBmS-LOwjkKe6plhI,596
27
- naas_abi_cli/cli/utils/Copier.py,sha256=cYo-5INC0jSrxcBgf2tvhahMr-92j2-BLpSmb6nQ1pc,3269
27
+ naas_abi_cli/cli/utils/Copier.py,sha256=NAKnMOqOTtnw_o5fYII8R1QHXZ7oGay362Nd762HGrI,3276
28
28
  naas_abi_cli/cli/new/templates/project/config.prod.yaml,sha256=Y57Qzz_yt8tfHbtDqGCSQxOkwnLgF4eoGOWOq66xSA8,1877
29
29
  naas_abi_cli/cli/new/templates/project/config.yaml,sha256=iQAAO6N3xO7iszG33vbSAljO11Pcf4KOvW3N-avJrsQ,1610
30
- naas_abi_cli-1.8.1.dist-info/METADATA,sha256=joklmI_ft2VCn5EWg7cyoYno7luOKWYi3YXf-L9LvGM,7371
31
- naas_abi_cli-1.8.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
32
- naas_abi_cli-1.8.1.dist-info/entry_points.txt,sha256=ufNXhYVU3uo5dcZ8e1kdEJv1oh2Vons7LHJPg35cP4w,46
33
- naas_abi_cli-1.8.1.dist-info/RECORD,,
30
+ naas_abi_cli-1.9.1.dist-info/METADATA,sha256=KV0WfQ3rwwt1qXKLsLuZSM9awk9G2LgzL5Hw7PignrU,7371
31
+ naas_abi_cli-1.9.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
32
+ naas_abi_cli-1.9.1.dist-info/entry_points.txt,sha256=ufNXhYVU3uo5dcZ8e1kdEJv1oh2Vons7LHJPg35cP4w,46
33
+ naas_abi_cli-1.9.1.dist-info/RECORD,,