celestialflow 3.2.5__tar.gz → 3.2.7__tar.gz

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.
Files changed (108) hide show
  1. celestialflow-3.2.7/LICENSE +21 -0
  2. {celestialflow-3.2.5 → celestialflow-3.2.7}/PKG-INFO +135 -77
  3. {celestialflow-3.2.5 → celestialflow-3.2.7}/README.md +132 -71
  4. {celestialflow-3.2.5 → celestialflow-3.2.7}/pyproject.toml +3 -19
  5. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/__init__.py +2 -7
  6. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/funnel/__init__.py +5 -0
  7. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/funnel/core_inlet.py +1 -1
  8. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/graph/__init__.py +5 -0
  9. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/graph/core_graph.py +36 -9
  10. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/graph/core_structure.py +0 -88
  11. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/graph/util_graph.py +1 -0
  12. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/observability/__init__.py +0 -2
  13. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/observability/core_report.py +1 -1
  14. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/persistence/__init__.py +5 -0
  15. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/persistence/core_fallback.py +1 -1
  16. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/persistence/util_sqlite.py +110 -117
  17. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/__init__.py +6 -0
  18. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/core_dispatch.py +7 -2
  19. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/core_metrics.py +50 -1
  20. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/core_queue.py +10 -23
  21. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/util_constant.py +3 -6
  22. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/util_errors.py +6 -24
  23. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/util_estimators.py +8 -8
  24. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/stage/__init__.py +6 -0
  25. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/stage/core_executor.py +41 -49
  26. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/stage/core_stage.py +237 -236
  27. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow.egg-info/PKG-INFO +135 -77
  28. celestialflow-3.2.7/src/celestialflow.egg-info/SOURCES.txt +49 -0
  29. celestialflow-3.2.7/src/celestialflow.egg-info/requires.txt +1 -0
  30. celestialflow-3.2.5/src/celestialflow/observability/core_progress.py +0 -61
  31. celestialflow-3.2.5/src/celestialflow/web/__init__.py +0 -11
  32. celestialflow-3.2.5/src/celestialflow/web/config.json +0 -34
  33. celestialflow-3.2.5/src/celestialflow/web/core_server.py +0 -444
  34. celestialflow-3.2.5/src/celestialflow/web/routes/__init__.py +0 -33
  35. celestialflow-3.2.5/src/celestialflow/web/routes/pull_routes.py +0 -149
  36. celestialflow-3.2.5/src/celestialflow/web/routes/push_routes.py +0 -152
  37. celestialflow-3.2.5/src/celestialflow/web/static/css/_colors.css +0 -136
  38. celestialflow-3.2.5/src/celestialflow/web/static/css/base.css +0 -856
  39. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard.css +0 -175
  40. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard_analysis.css +0 -41
  41. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard_error_types.css +0 -100
  42. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard_history.css +0 -89
  43. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard_statuses.css +0 -225
  44. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard_structure.css +0 -27
  45. celestialflow-3.2.5/src/celestialflow/web/static/css/dashboard_summary.css +0 -136
  46. celestialflow-3.2.5/src/celestialflow/web/static/css/errors.css +0 -364
  47. celestialflow-3.2.5/src/celestialflow/web/static/css/injection_editor.css +0 -214
  48. celestialflow-3.2.5/src/celestialflow/web/static/css/injection_layout.css +0 -82
  49. celestialflow-3.2.5/src/celestialflow/web/static/css/injection_nodes.css +0 -92
  50. celestialflow-3.2.5/src/celestialflow/web/static/css/injection_preview.css +0 -140
  51. celestialflow-3.2.5/src/celestialflow/web/static/favicon.ico +0 -0
  52. celestialflow-3.2.5/src/celestialflow/web/static/js/dashboard_analysis.js +0 -84
  53. celestialflow-3.2.5/src/celestialflow/web/static/js/dashboard_error_types.js +0 -223
  54. celestialflow-3.2.5/src/celestialflow/web/static/js/dashboard_history.js +0 -393
  55. celestialflow-3.2.5/src/celestialflow/web/static/js/dashboard_statuses.js +0 -252
  56. celestialflow-3.2.5/src/celestialflow/web/static/js/dashboard_structure.js +0 -186
  57. celestialflow-3.2.5/src/celestialflow/web/static/js/dashboard_summary.js +0 -44
  58. celestialflow-3.2.5/src/celestialflow/web/static/js/errors.js +0 -250
  59. celestialflow-3.2.5/src/celestialflow/web/static/js/i18n.js +0 -477
  60. celestialflow-3.2.5/src/celestialflow/web/static/js/injection.js +0 -695
  61. celestialflow-3.2.5/src/celestialflow/web/static/js/layout_editor.js +0 -196
  62. celestialflow-3.2.5/src/celestialflow/web/static/js/main.js +0 -351
  63. celestialflow-3.2.5/src/celestialflow/web/static/js/utils.js +0 -177
  64. celestialflow-3.2.5/src/celestialflow/web/static/js/web_config.js +0 -483
  65. celestialflow-3.2.5/src/celestialflow/web/static/ts/dashboard_analysis.ts +0 -98
  66. celestialflow-3.2.5/src/celestialflow/web/static/ts/dashboard_error_types.ts +0 -247
  67. celestialflow-3.2.5/src/celestialflow/web/static/ts/dashboard_history.ts +0 -478
  68. celestialflow-3.2.5/src/celestialflow/web/static/ts/dashboard_statuses.ts +0 -360
  69. celestialflow-3.2.5/src/celestialflow/web/static/ts/dashboard_structure.ts +0 -221
  70. celestialflow-3.2.5/src/celestialflow/web/static/ts/dashboard_summary.ts +0 -49
  71. celestialflow-3.2.5/src/celestialflow/web/static/ts/errors.ts +0 -301
  72. celestialflow-3.2.5/src/celestialflow/web/static/ts/globals.d.ts +0 -166
  73. celestialflow-3.2.5/src/celestialflow/web/static/ts/i18n.ts +0 -524
  74. celestialflow-3.2.5/src/celestialflow/web/static/ts/injection.ts +0 -812
  75. celestialflow-3.2.5/src/celestialflow/web/static/ts/layout_editor.ts +0 -223
  76. celestialflow-3.2.5/src/celestialflow/web/static/ts/main.ts +0 -394
  77. celestialflow-3.2.5/src/celestialflow/web/static/ts/utils.ts +0 -205
  78. celestialflow-3.2.5/src/celestialflow/web/static/ts/web_config.ts +0 -584
  79. celestialflow-3.2.5/src/celestialflow/web/templates/index.html +0 -738
  80. celestialflow-3.2.5/src/celestialflow/web/util_cal.py +0 -9
  81. celestialflow-3.2.5/src/celestialflow/web/util_config.py +0 -38
  82. celestialflow-3.2.5/src/celestialflow/web/util_error.py +0 -30
  83. celestialflow-3.2.5/src/celestialflow/web/util_models.py +0 -95
  84. celestialflow-3.2.5/src/celestialflow.egg-info/SOURCES.txt +0 -103
  85. celestialflow-3.2.5/src/celestialflow.egg-info/entry_points.txt +0 -2
  86. celestialflow-3.2.5/src/celestialflow.egg-info/requires.txt +0 -5
  87. {celestialflow-3.2.5 → celestialflow-3.2.7}/setup.cfg +0 -0
  88. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/funnel/core_spout.py +0 -0
  89. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/funnel/util_count.py +0 -0
  90. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/graph/util_serialize.py +0 -0
  91. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/observability/core_observer.py +0 -0
  92. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/observability/util_types.py +0 -0
  93. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/persistence/core_log.py +0 -0
  94. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/persistence/util_payload.py +0 -0
  95. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/core_envelope.py +0 -0
  96. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/util_event.py +0 -0
  97. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/util_hash.py +0 -0
  98. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/runtime/util_types.py +0 -0
  99. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/stage/core_stages.py +0 -0
  100. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/stage/util_callable.py +0 -0
  101. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/stage/util_types.py +0 -0
  102. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/utils/__init__.py +0 -0
  103. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/utils/util_benchmark.py +0 -0
  104. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/utils/util_clone.py +0 -0
  105. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/utils/util_collections.py +0 -0
  106. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow/utils/util_format.py +0 -0
  107. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow.egg-info/dependency_links.txt +0 -0
  108. {celestialflow-3.2.5 → celestialflow-3.2.7}/src/celestialflow.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mr-xiaotian
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: celestialflow
3
- Version: 3.2.5
3
+ Version: 3.2.7
4
4
  Summary: A flexible GRAPH-based task orchestration framework.
5
5
  Author-email: Mr-xiaotian <mingxiaomingtian@gmail.com>
6
6
  License: MIT
@@ -10,15 +10,12 @@ Keywords: workflow,task,graph,async,CelestialFlow
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: License :: OSI Approved :: MIT License
12
12
  Classifier: Operating System :: OS Independent
13
- Classifier: Framework :: FastAPI
14
13
  Classifier: Topic :: Software Development :: Libraries
15
14
  Requires-Python: >=3.12
16
15
  Description-Content-Type: text/markdown
17
- Requires-Dist: tqdm
18
- Requires-Dist: fastapi
19
- Requires-Dist: uvicorn
16
+ License-File: LICENSE
20
17
  Requires-Dist: requests
21
- Requires-Dist: jinja2
18
+ Dynamic: license-file
22
19
 
23
20
  # CelestialFlow ——一个轻量级、可并行、基于图结构的 Python 任务调度框架
24
21
 
@@ -37,14 +34,13 @@ Requires-Dist: jinja2
37
34
  <img src="https://img.shields.io/badge/Task%20Graph-DAG-blueviolet">
38
35
  <img src="https://img.shields.io/badge/Workflow-Orchestrator-7c3aed">
39
36
  <img src="https://img.shields.io/badge/Event%20Tracing-CelestialTree-0ea5e9">
40
- <img src="https://img.shields.io/badge/Web-Dashboard-FastAPI-ec4899">
41
37
  </p>
42
38
 
43
39
  <p align="center">
44
- <a href="https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/README.md">中文</a> | <a href="https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/en/README.md">English</a> | <a href="https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/ja/README.md">日本語</a>
40
+ <a href="https://github.com/Mr-xiaotian/CelestialFlow/blob/main/README.md">中文</a> | <a href="https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/en/README.md">English</a> | <a href="https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/ja/README.md">日本語</a>
45
41
  </p>
46
42
 
47
- **CelestialFlow** 是一个轻量级但功能完全的任务流框架,适合需要 **复杂依赖关系**、**灵活执行模型**、**跨设备运行**与**实时可视化监控** 的中/大型 Python 任务系统。
43
+ **CelestialFlow** 是一个轻量级但功能完全的任务流框架,适合需要 **复杂依赖关系**、**灵活执行模型**、**跨设备运行** 与 **可观测执行链路** 的中/大型 Python 任务系统。
48
44
 
49
45
  - 相比 Airflow/Dagster 更轻、更快开始
50
46
  - 相比 multiprocessing/threading 更结构化,可直接表达 loop / complete graph 等复杂依赖模式
@@ -70,7 +66,7 @@ TaskGraph 能构建完整的 **有向图结构(Directed Graph)**,不仅支
70
66
 
71
67
  在执行与调度之外,CelestialFlow 进一步引入 **CelestialTree(简称: ctree) 事件追踪系统**,为每一个任务及其衍生行为(成功、失败、重试、拆分、路由等)记录明确的因果关系。借助 ctree,可以从任意一个初始任务出发,完整还原其在 TaskGraph 中的传播路径与执行轨迹,使任务系统可以进行完整的**追溯、分析、解释**。
72
68
 
73
- 在此基础上,CelestialFlow 支持 Web 可视化监控,并提供基于 Redis 的 demo 与 Go Worker 外部协作示例,用于展示按需构建跨进程、跨设备任务协作的方式。
69
+ 在此基础上,CelestialFlow 提供事件追踪、状态上报、持久化回放,并提供基于 Redis 的 demo 与 Go Worker 外部协作示例,用于展示按需构建跨进程、跨设备任务协作的方式。
74
70
 
75
71
  ## 项目结构(Project Structure)
76
72
 
@@ -100,24 +96,11 @@ flowchart LR
100
96
  %% 美化 TaskStages
101
97
  class S1,S2,S3,S4 blueNode;
102
98
 
103
- %% ===== WebUI =====
104
- subgraph W[WebUI]
105
- JS
106
- HTML
107
- end
108
-
109
- style W fill:#ffeaf0,stroke:#d66b8c,stroke-width:2px,rx:10px,ry:10px
110
- style JS fill:#ffffff,stroke:#d66b8c,rx:5px,ry:5px
111
- style HTML fill:#ffffff,stroke:#d66b8c,rx:5px,ry:5px
112
-
113
- R[TaskWeb]
114
- style R fill:#f0e9ff,stroke:#8a6bc9,stroke-width:2px,rx:8px,ry:8px
115
-
116
99
  %% ===== Links =====
117
- TG --> R
118
- R --> TG
119
- R --> W
120
- W --> R
100
+ TG --> CFB[CelestialFlow Web]
101
+ CFB --> TG
102
+
103
+ style CFB fill:#ffeaf0,stroke:#d66b8c,stroke-width:2px,rx:10px,ry:10px
121
104
 
122
105
  ```
123
106
 
@@ -133,7 +116,7 @@ uv pip install celestialflow
133
116
  pip install celestialflow
134
117
  ```
135
118
 
136
- 如果你只使用 CelestialFlow 的核心调度、Web、持久化与 demo/test 之外的常规功能,上面的安装已经足够。
119
+ 如果你只使用 CelestialFlow 的核心调度、可观测性与持久化能力,上面的安装已经足够。
137
120
 
138
121
  如果你还需要启用 CelestialTree 事件追踪能力,则需要**额外安装** `celestialtree`:
139
122
 
@@ -150,19 +133,30 @@ uv sync --group dev
150
133
  ```python
151
134
  from celestialflow import TaskStage, TaskGraph
152
135
 
153
- def add(x, y):
136
+
137
+ def add(x, y):
154
138
  return x + y
155
139
 
156
- def square(x):
157
- return x ** 2
140
+
141
+ def square(x):
142
+ return x**2
143
+
158
144
 
159
145
  if __name__ == "__main__":
160
146
  # 定义两个任务节点
161
- stage1 = TaskStage(name="Adder", func=add, stage_mode="thread", execution_mode="thread", unpack_task_args=True)
162
- stage2 = TaskStage(name="Squarer", func=square, stage_mode="thread", execution_mode="thread")
147
+ stage1 = TaskStage(
148
+ name="Adder",
149
+ func=add,
150
+ stage_mode="thread",
151
+ execution_mode="thread",
152
+ unpack_task_args=True,
153
+ )
154
+ stage2 = TaskStage(
155
+ name="Squarer", func=square, stage_mode="thread", execution_mode="thread"
156
+ )
163
157
 
164
158
  # 构建任务图结构
165
- graph = TaskGraph()
159
+ graph = TaskGraph(name="DemoGraph")
166
160
  graph.set_stages(stages=[stage1, stage2])
167
161
  graph.connect([stage1], [stage2])
168
162
 
@@ -178,17 +172,16 @@ if __name__ == "__main__":
178
172
 
179
173
  若你想了解框架的整体结构与核心组件,下面的参考文档会对你有帮助:
180
174
 
181
- - [stage/core_executor.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_executor.md)
182
- - [stage/core_stage.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_stage.md)
183
- - [graph/core_graph.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/graph/core_graph.md)
184
- - [observability/core_progress.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/observability/core_progress.md)
185
- - [runtime/core_metrics.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/core_metrics.md)
186
- - [runtime/core_queue.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/core_queue.md)
187
- - [stage/core_stages.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_stages.md)
188
- - [observability/core_report.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/observability/core_report.md)
189
- - [graph/core_structure.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/graph/core_structure.md)
190
- - [web/core_server.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/web/core_server.md)
191
- - [other/go_worker.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/other/go_worker.md)
175
+ - [TaskExecutor.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_executor.md)
176
+ - [TaskStage.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_stage.md)
177
+ - [TaskGraph.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/graph/core_graph.md)
178
+ - [TaskMetrics.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/core_metrics.md)
179
+ - [TaskQueue.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/core_queue.md)
180
+ - [TaskStages.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/stage/core_stages.md)
181
+ - [TaskReport.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/observability/core_report.md)
182
+ - [TaskStructure.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/graph/core_structure.md)
183
+ - [BaseObserver.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/observability/core_observer.md)
184
+ - [Go Worker.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/other/go_worker.md)
192
185
 
193
186
  推荐阅读顺序:
194
187
 
@@ -198,10 +191,9 @@ flowchart TD
198
191
  classDef runtime fill:#e9f8ef,stroke:#22c55e,color:#14532d;
199
192
  classDef structure fill:#fff6e6,stroke:#f59e0b,color:#78350f;
200
193
  classDef execution fill:#f3e8ff,stroke:#a855f7,color:#581c87;
201
- classDef web fill:#ffeaea,stroke:#ef4444,color:#7f1d1d;
202
194
 
203
195
  TM[TaskExecutor.md] --> TS[TaskStage.md] --> TG[TaskGraph.md]
204
- TM --> TP[TaskProgress.md]
196
+ TM --> OB[BaseObserver.md]
205
197
  TM --> TME[TaskMetrics.md]
206
198
 
207
199
  TG --> TQ[TaskQueue.md]
@@ -209,23 +201,22 @@ flowchart TD
209
201
  TG --> TR[TaskReport.md]
210
202
  TG --> TSR[TaskStructure.md]
211
203
 
212
- TR --> TW[TaskWeb.md]
213
204
  TN --> GW[Go Worker.md]
214
205
 
215
206
  class TM,TS,TG core;
216
207
  class TP,TME runtime;
217
208
  class TSR structure;
218
209
  class TQ,TN,GW execution;
219
- class TR,TW web;
210
+ class TR execution;
220
211
  ```
221
212
 
222
- 以下三篇可以作为补充阅读:
213
+ 以下五篇可以作为补充阅读:
223
214
 
224
- - [runtime/util_hash.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_hash.md)
225
- - [runtime/util_types.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_types.md)
226
- - [runtime/util_errors.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_errors.md)
227
- - [persistence/core_fallback.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_fallback.md)
228
- - [persistence/core_log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_log.md)
215
+ - [UtilHash.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_hash.md)
216
+ - [UtilTypes.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_types.md)
217
+ - [UtilErrors.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/runtime/util_errors.md)
218
+ - [Fallback.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_fallback.md)
219
+ - [Log.md](https://github.com/Mr-xiaotian/CelestialFlow/blob/main/docs/zh-CN/src/persistence/core_log.md)
229
220
 
230
221
  如果你更喜欢通过完整案例理解框架的运行方式,可以参考这篇利用 TaskGraph 从零开始构建项目的教程:
231
222
 
@@ -255,43 +246,110 @@ flowchart TD
255
246
  | 依赖包 | 说明 |
256
247
  | ----------------- | ---- |
257
248
  | **Python ≥ 3.12** | 运行环境,建议使用 3.12 及以上版本 |
258
- | **fastapi** | Web 服务接口框架(用于任务可视化与远程控制) |
259
- | **uvicorn** | FastAPI 的高性能 ASGI 服务器 |
260
249
  | **requests** | HTTP 客户端库,用于任务状态上报与远程调用 |
261
- | **jinja2** | FastAPI 模板引擎,用于 Web 可视化界面渲染 |
262
250
  | **tqdm** | 可选组件,进度条显示,用于任务执行可视化 |
263
251
 
264
- 如需运行 `demo/demo_redis.py` 或 Go Worker 示例,请额外安装 `redis` 并准备 Redis 服务;这部分不属于默认运行时依赖。
252
+ - 如需运行 `demo/demo_redis.py` 或 Go Worker 示例,请额外安装 `redis` 并准备 Redis 服务;这部分不属于默认运行时依赖。
253
+
254
+ - 如需运行依赖 CelestialTree 的 demo / bench / 追踪查询,请额外安装 `celestialtree`,或直接在源码仓库中执行 `uv sync --group dev`。
265
255
 
266
- 如需运行依赖 CelestialTree demo / bench / 追踪查询,请额外安装 `celestialtree`,或直接在源码仓库中执行 `uv sync --group dev`。
256
+ - 如需使用可视化的Web服务, 请额外安装 `celestialflow-web` 并运行 `celestialflow-web --host 0.0.0.0 --port 5000`。
267
257
 
268
258
  ## 文件结构(File Structure)
269
259
 
260
+ ```
261
+ 📁 CelestialFlow (471MB 982KB 22B)
262
+ 📁 .agents (55KB 152B)
263
+ 📁 skills[已折叠] (55KB 152B)
264
+ 📁 .claude (99B)
265
+ 🗄️ settings.local.json (99B)
266
+ 📁 .github (601B)
267
+ 📁 workflows[已折叠] (601B)
268
+ 📁 bench (150KB 552B)
269
+ 📁 [1项排除的目录] (47KB 905B)
270
+ 🐍 bench_datastructures.py (6KB 690B)
271
+ 🐍 bench_execution_mode.py (2KB 889B)
272
+ 🐍 bench_futures_memory.py (2KB 267B)
273
+ 🐍 bench_gil_vs_nogil.py (10KB 159B)
274
+ 🐍 bench_graph_mode.py (7KB 173B)
275
+ 🐍 bench_hash.py (7KB 39B)
276
+ 🐍 bench_hash_container.py (3KB 1009B)
277
+ 🐍 bench_hash_memory.py (3KB 613B)
278
+ 🐍 bench_http_grpc.py (2KB 883B)
279
+ 🐍 bench_ipc_queue.py (7KB 74B)
280
+ 🐍 bench_lock_overhead.py (9KB 421B)
281
+ 🐍 bench_mpqueue_vs_shared_memory.py (13KB 106B)
282
+ 🐍 bench_observer.py (7KB 899B)
283
+ 🐍 bench_persistence_spout.py (4KB 193B)
284
+ 🐍 bench_queue.py (5KB 857B)
285
+ 🐍 bench_requests.py (6KB 813B)
286
+ 🐍 bench_tqdm.py (1KB 235B)
287
+ 🐍 bench_utils.py (543B)
288
+ 📁 demo (105KB 440B)
289
+ 📁 [1项排除的目录] (61KB 883B)
290
+ 🐍 demo_executor.py (1KB 504B)
291
+ 🐍 demo_funnel.py (2KB 289B)
292
+ 🐍 demo_graph.py (3KB 615B)
293
+ 🐍 demo_observer.py (4KB 293B)
294
+ 🐍 demo_redis.py (9KB 201B)
295
+ 🐍 demo_stages.py (4KB 519B)
296
+ 🐍 demo_structure.py (12KB 8B)
297
+ 🐍 demo_utils.py (6KB 200B)
298
+ 📁 dist (145KB 290B)
299
+ ❓ .gitignore (1B)
300
+ ❓ celestialflow-3.2.6-py3-none-any.whl (78KB 975B)
301
+ 📦 celestialflow-3.2.6.tar.gz (66KB 338B)
302
+ 📁 docs (1MB 712KB 884B)
303
+ 📁 en[已折叠] (569KB 485B)
304
+ 📁 ja[已折叠] (642KB 959B)
305
+ 📁 zh-CN[已折叠] (524KB 464B)
306
+ 📁 experiments (2KB 1015B)
307
+ 🐍 experiment_networkx.py (1KB 878B)
308
+ 🐍 experiment_tqdm.py (1KB 137B)
309
+ 📁 img (5MB 871KB 242B)
310
+ 📷 file_structure.svg (4MB 918KB 1000B)
311
+ 📷 logo(old).png (836KB 542B)
312
+ 📷 logo.png (122KB 747B)
313
+ 📷 scc_condensation.svg (17KB 1B)
314
+ 📁 src (1MB 767KB 296B)
315
+ 📁 celestialflow[已折叠] (1MB 752KB 195B)
316
+ 📁 celestialflow.egg-info[已折叠] (15KB 101B)
317
+ 📁 tests (3MB 902KB 217B)
318
+ 📁 funnel[已折叠] (96KB 481B)
319
+ 📁 graph[已折叠] (631KB 532B)
320
+ 📁 observability[已折叠] (157KB 435B)
321
+ 📁 persistence[已折叠] (359KB 68B)
322
+ 📁 runtime[已折叠] (1MB 286KB 487B)
323
+ 📁 stage[已折叠] (281KB 752B)
324
+ 📁 utils[已折叠] (648KB 931B)
325
+ 📁 [1项排除的目录] (487KB 589B)
326
+ 🐍 conftest.py (1KB 38B)
327
+ 🐍 __init__.py (0B)
328
+ 📁 [9项排除的目录] (458MB 223KB 525B)
329
+ ❓ .env (468B)
330
+ ❓ .gitignore (1KB 313B)
331
+ 📝 AGENTS.md (971B)
332
+ ❓ LICENSE (1KB 65B)
333
+ ⚙️ pyproject.toml (2KB 555B)
334
+ 📝 README.md (12KB 272B)
335
+ 🔒 uv.lock (98KB 257B)
336
+ ```
270
337
  <p align="center">
271
- <img src="https://raw.githubusercontent.com/Mr-xiaotian/CelestialFlow/main/img/file_structure.svg" alt="FileStructure" />
272
- <br/>
273
- <em>celestial-flow 3.2.5</em>
338
+ <em>celestial-flow 3.2.7</em>
274
339
  </p>
275
340
 
276
341
  (该视图由我的另一个项目[CelestialVault](https://github.com/Mr-xiaotian/CelestialVault)中inst_file.FileTree.print_tree()生成。转换为图片则借助[Carbon](https://carbon.now.sh)。)
277
342
 
278
343
  ## 版本日志(Version Log)
279
- - 3.2.5
344
+ - 3.2.7
280
345
  - feat:
281
- - `Spout` `Inlet` 添加 `counter`, 对 `queue` 中未消费任务的数量进行记录
282
- - 在上版本大幅修改 `fallback` 机制后, `FallbackSpout` 中很有可能出现任务堆积, 进而导致误判
283
- - 在web端错误日志页面对当前显示的错误数量可能与node_status中的error数量不一致的情况进行说明
284
- - 在web端仪表盘页面添加错误分类的饼图
346
+ - `TaskInQueue` 中添加 `maxsize` 参数, 用于限制队列最大长度
347
+ - `graph.connect` 中添加对两个stage输入输出参数类型的检验, 如果不通过, 会有pyright报错
285
348
  - refactor:
286
- - 移除对 `networkx` 的依赖, 添加 `util_graph`, 实现所有图论分析
287
- - `TaskExecutor` 中将 `enable_duplicate_check` 默认改为 `False`
288
- - 在duplicate机制中一直有一个内存持续增长点: `processed_set`, 这导致 `enable_duplicate_check` 在大规模的任务下会导致很大的内存压力
289
- - 分离server端的 `push_task` `push_termination`
290
- - fix:
291
- - 修复 `UnconsumedError` 在 `drain_task_queue` 中被计算两次的问题
292
- - chore:
293
- - `img/` 中添加全新的 `web_display.png` 图片
294
- - 完善几个skill, 现在对主agent与子agent的prompt进行分离
349
+ - 移除对 `tqdm` 的依赖
350
+ - 根据 `bench\bench_observer.py`, tqdm对轻量级任务影响有限
351
+ - 这次移除主要是为了完成尽量零第三方库依赖的目标
352
+ - `observer` 的管理从 `executor` 转到 `metric`
295
353
 
296
354
  更多过往日志可看:
297
355