fabricatio 0.5.0.dev1__cp313-cp313-manylinux_2_34_x86_64.whl → 0.5.1.dev0__cp313-cp313-manylinux_2_34_x86_64.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.
@@ -67,3 +67,8 @@ if find_spec("fabricatio_actions"):
67
67
  "RetrieveFromLatest",
68
68
  "RetrieveFromPersistent",
69
69
  ]
70
+
71
+ if find_spec("fabricatio_yue"):
72
+ from fabricatio_yue.actions.compose import Compose
73
+
74
+ __all__ += ["Compose"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fabricatio
3
- Version: 0.5.0.dev1
3
+ Version: 0.5.1.dev0
4
4
  Classifier: License :: OSI Approved :: MIT License
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -119,35 +119,32 @@ make bdist
119
119
  ### Basic Example
120
120
 
121
121
  ```python
122
- import asyncio
123
- from fabricatio import Action, Role, Task, logger, WorkFlow, Event
122
+ """Example of a simple hello world program using fabricatio."""
123
+
124
124
  from typing import Any
125
125
 
126
+ from fabricatio import Action, Event, Role, Task, WorkFlow, logger
127
+
126
128
 
127
129
  class Hello(Action):
128
- name: str = "hello"
130
+ """Action that says hello."""
131
+
129
132
  output_key: str = "task_output"
130
133
 
131
- async def _execute(self, task_input: Task[str], **_) -> Any:
134
+ async def _execute(self, **_) -> Any:
132
135
  ret = "Hello fabricatio!"
133
136
  logger.info("executing talk action")
134
137
  return ret
135
138
 
139
+ """Main function."""
136
140
 
137
- async def main() -> None:
138
- Role(
139
- name="talker",
140
- description="talker role",
141
- registry={Event.quick_instantiate("talk"): WorkFlow(name="talk", steps=(Hello,))}
142
- )
143
141
 
144
- task = Task(name="say hello", goals=["say hello"], description="say hello to the world")
145
- result = await task.delegate("talk")
146
- logger.success(f"Result: {result}")
142
+ (Role()
143
+ .register_workflow(Event.quick_instantiate("talk"), WorkFlow(name="talk", steps=(Hello,)))
144
+ .dispatch())
147
145
 
146
+ assert Task(name="say hello").delegate_blocking("talk") == "Hello fabricatio!"
148
147
 
149
- if __name__ == "__main__":
150
- asyncio.run(main())
151
148
  ```
152
149
 
153
150
  ### Examples
@@ -1,9 +1,9 @@
1
- fabricatio-0.5.0.dev1.data/scripts/tdown,sha256=aQF9qrdNEftHmIId3K0WUxdAx-THEoUsq36qe0q29JE,5130216
2
- fabricatio-0.5.0.dev1.dist-info/METADATA,sha256=cv5v-gTA1r5U_VrkyL6ZlaWptj_uayRDrxcWaGRQHfw,7445
3
- fabricatio-0.5.0.dev1.dist-info/WHEEL,sha256=jLp2duqf8HdGR38ANSTZasShrLQst0e8KGzZrz_xSn8,108
4
- fabricatio-0.5.0.dev1.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
1
+ fabricatio-0.5.1.dev0.data/scripts/tdown,sha256=aQF9qrdNEftHmIId3K0WUxdAx-THEoUsq36qe0q29JE,5130216
2
+ fabricatio-0.5.1.dev0.dist-info/METADATA,sha256=h6yAqsSjJFGPqbX3MLNhnv6P9Tp4ouDU1wM0UepaK3E,7287
3
+ fabricatio-0.5.1.dev0.dist-info/WHEEL,sha256=jLp2duqf8HdGR38ANSTZasShrLQst0e8KGzZrz_xSn8,108
4
+ fabricatio-0.5.1.dev0.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
5
5
  fabricatio/__init__.py,sha256=RuDz5JHlGrYWvMm9H08prJxhwVQFr6-SpKWA3FB9JWg,694
6
- fabricatio/actions/__init__.py,sha256=i-LBb4pF29XVnaKfdMJwcF914WPu2B_DdZVfba_T4kg,1990
6
+ fabricatio/actions/__init__.py,sha256=4xR1wiPq2HPnVABXy6R3wOxcg9LZKD7g-h9IdTcNKvY,2106
7
7
  fabricatio/capabilities/__init__.py,sha256=jFjEAlWYJcl60_hGogmT8s9RClil5xK-YiGgnk9xeh4,2090
8
8
  fabricatio/models/__init__.py,sha256=bbfRfQhqXcgDXtGQOW2hGgVViOC_wOWylhy9kTQ4OwA,1551
9
9
  fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -12,4 +12,4 @@ fabricatio/toolboxes/__init__.py,sha256=_Snn7bB7pBsRYNgqzBzVL8jgka0FdgK6Lme8UnDs
12
12
  fabricatio/toolboxes/arithmetic.py,sha256=kiX83WRfFyqNavpz9Wd0fPxa2HQbi_VTMRNp4B8ErNQ,1312
13
13
  fabricatio/toolboxes/fs.py,sha256=lipQP6I8HR08ujucsbMR_qBHxlLzMu4O38qPFitZtHc,715
14
14
  fabricatio/workflows/__init__.py,sha256=sr-0tgpNPdN5t2pDQa-gp-KUE7K0QDtjP9QGvWYLZ9A,305
15
- fabricatio-0.5.0.dev1.dist-info/RECORD,,
15
+ fabricatio-0.5.1.dev0.dist-info/RECORD,,