ErisPulse 1.2.8__tar.gz → 2.1.0__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.
- erispulse-2.1.0/.github/tools/merge_md.py +76 -0
- erispulse-2.1.0/.github/tools/update-api-docs.py +204 -0
- erispulse-2.1.0/.github/workflows/auto-tag-release.yml +99 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/.github/workflows/pypi-publish.yml +1 -24
- {erispulse-1.2.8 → erispulse-2.1.0}/.gitignore +5 -2
- erispulse-2.1.0/CODE_OF_CONDUCT.md +54 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/LICENSE +4 -3
- {erispulse-1.2.8 → erispulse-2.1.0}/PKG-INFO +16 -41
- {erispulse-1.2.8 → erispulse-2.1.0}/README.md +7 -38
- erispulse-2.1.0/devs/search_pypi.py +15 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/devs/test.py +13 -9
- erispulse-2.1.0/docs/ADAPTERS.md +434 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/docs/CHANGELOG.md +59 -7
- erispulse-2.1.0/docs/CLI.md +57 -0
- erispulse-2.1.0/docs/Conversion-Standard/342/200/213.md +194 -0
- erispulse-2.1.0/docs/DEVELOPMENT.md +298 -0
- erispulse-2.1.0/docs/ForAIDocs/ErisPulseDevelop.md +2398 -0
- erispulse-2.1.0/docs/UseCore.md +224 -0
- erispulse-2.1.0/docs/api/ErisPulse/Core/adapter.md +329 -0
- erispulse-2.1.0/docs/api/ErisPulse/Core/env.md +241 -0
- erispulse-2.1.0/docs/api/ErisPulse/Core/mods.md +154 -0
- erispulse-2.1.0/docs/api/ErisPulse/Core/raiserr.md +66 -0
- erispulse-2.1.0/docs/api/ErisPulse/Core/server.md +90 -0
- erispulse-2.1.0/docs/api/ErisPulse/Core/util.md +80 -0
- erispulse-2.1.0/docs/api/ErisPulse/__init__.md +192 -0
- erispulse-2.1.0/docs/api/ErisPulse/__main__.md +34 -0
- erispulse-2.1.0/docs/move2pypi.md +124 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/docs/quick-start.md +4 -4
- erispulse-2.1.0/examples/example-adapter/LICENSE +21 -0
- erispulse-2.1.0/examples/example-adapter/MyAdapter/Core.py +72 -0
- erispulse-2.1.0/examples/example-adapter/MyAdapter/__init__.py +1 -0
- erispulse-2.1.0/examples/example-adapter/README.md +0 -0
- erispulse-2.1.0/examples/example-adapter/pyproject.toml +24 -0
- erispulse-2.1.0/examples/example-module/LICENSE +21 -0
- erispulse-2.1.0/examples/example-module/MyModule/Core.py +32 -0
- erispulse-2.1.0/examples/example-module/MyModule/__init__.py +1 -0
- erispulse-2.1.0/examples/example-module/README.md +0 -0
- erispulse-2.1.0/examples/example-module/pyproject.toml +23 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/pyproject.toml +8 -2
- erispulse-2.1.0/scripts/install/install.ps1 +236 -0
- erispulse-2.1.0/scripts/install/install.sh +247 -0
- erispulse-2.1.0/src/ErisPulse/Core/__init__.py +19 -0
- erispulse-2.1.0/src/ErisPulse/Core/adapter.py +619 -0
- erispulse-2.1.0/src/ErisPulse/Core/env.py +614 -0
- {erispulse-1.2.8/src/ErisPulse → erispulse-2.1.0/src/ErisPulse/Core}/logger.py +1 -118
- erispulse-2.1.0/src/ErisPulse/Core/mods.py +226 -0
- erispulse-2.1.0/src/ErisPulse/Core/raiserr.py +152 -0
- erispulse-2.1.0/src/ErisPulse/Core/server.py +276 -0
- erispulse-2.1.0/src/ErisPulse/Core/shellprint.py +165 -0
- erispulse-2.1.0/src/ErisPulse/Core/util.py +126 -0
- erispulse-2.1.0/src/ErisPulse/__init__.py +729 -0
- erispulse-2.1.0/src/ErisPulse/__main__.py +452 -0
- erispulse-2.1.0/style_guide/DOCSTRING_SPEC.md +95 -0
- erispulse-2.1.0/style_guide/README.md +5 -0
- erispulse-1.2.8/.github/ISSUE_TEMPLATE/bug_report.md +0 -36
- erispulse-1.2.8/.github/ISSUE_TEMPLATE/feature_request.md +0 -42
- erispulse-1.2.8/.github/config/notify.json +0 -10
- erispulse-1.2.8/.github/tools/merge_md.py +0 -39
- erispulse-1.2.8/.github/tools/update-api-docs.py +0 -76
- erispulse-1.2.8/.github/workflows/notifications.yml +0 -80
- erispulse-1.2.8/.github/workflows/send-email/action.yml +0 -41
- erispulse-1.2.8/.github/workflows/send-email/send_mail.py +0 -64
- erispulse-1.2.8/.github/workflows/send-email/send_mail_old.py +0 -29
- erispulse-1.2.8/docs/ADAPTERS.md +0 -530
- erispulse-1.2.8/docs/CLI.md +0 -30
- erispulse-1.2.8/docs/DEVELOPMENT.md +0 -431
- erispulse-1.2.8/docs/ForAIDocs/ErisPulseDevelop.md +0 -2152
- erispulse-1.2.8/docs/ORIGIN.md +0 -82
- erispulse-1.2.8/docs/REFERENCE.md +0 -964
- erispulse-1.2.8/gitc/cd_branch.sh +0 -17
- erispulse-1.2.8/gitc/commit.sh +0 -28
- erispulse-1.2.8/gitc/create_branch.sh +0 -20
- erispulse-1.2.8/gitc/create_pr.sh +0 -28
- erispulse-1.2.8/gitc/merge_dev.sh +0 -55
- erispulse-1.2.8/gitc/usage.md +0 -29
- erispulse-1.2.8/src/ErisPulse/__init__.py +0 -318
- erispulse-1.2.8/src/ErisPulse/__main__.py +0 -1317
- erispulse-1.2.8/src/ErisPulse/adapter.py +0 -465
- erispulse-1.2.8/src/ErisPulse/db.py +0 -769
- erispulse-1.2.8/src/ErisPulse/mods.py +0 -345
- erispulse-1.2.8/src/ErisPulse/raiserr.py +0 -137
- erispulse-1.2.8/src/ErisPulse/util.py +0 -144
- {erispulse-1.2.8 → erispulse-2.1.0}/.github/assets/erispulse_logo.png +0 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/.python-version +0 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/devs/test_adapter.py +0 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/devs/test_files/test.docx +0 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/devs/test_files/test.jpg +0 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/devs/test_files/test.mp4 +0 -0
- {erispulse-1.2.8 → erispulse-2.1.0}/docs/AI-Module-Generation.md +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
def merge_markdown_files(api_dir, additional_files, output_file):
|
|
4
|
+
"""
|
|
5
|
+
合并API文档和其他指定文档
|
|
6
|
+
|
|
7
|
+
:param api_dir: API文档目录
|
|
8
|
+
:param additional_files: 需要合并的其他文档列表
|
|
9
|
+
:param output_file: 输出文件路径
|
|
10
|
+
"""
|
|
11
|
+
with open(output_file, 'w', encoding='utf-8') as outfile:
|
|
12
|
+
# 写入头部说明
|
|
13
|
+
outfile.write("# ErisPulse 开发文档合集\n\n")
|
|
14
|
+
outfile.write("本文件由多个开发文档合并而成,用于辅助 AI 理解 ErisPulse 的模块开发规范与 SDK 使用方式。\n\n")
|
|
15
|
+
|
|
16
|
+
outfile.write("## 各文件对应内容说明\n\n")
|
|
17
|
+
outfile.write("| 文件名 | 作用 |\n")
|
|
18
|
+
outfile.write("|--------|------|\n")
|
|
19
|
+
outfile.write("| ADAPTERS.md | 平台适配器说明,包括事件监听和消息发送方式 |\n")
|
|
20
|
+
outfile.write("| Conversion-Standard.md | 数据转换标准说明 |\n")
|
|
21
|
+
outfile.write("| DEVELOPMENT.md | 模块结构定义、入口文件格式、Main 类规范 |\n")
|
|
22
|
+
outfile.write("| UseCore.md | 核心功能使用说明 |\n")
|
|
23
|
+
outfile.write("| API文档 | 自动生成的API参考文档 |\n\n")
|
|
24
|
+
|
|
25
|
+
outfile.write("## 合并内容开始\n\n")
|
|
26
|
+
|
|
27
|
+
# 首先合并指定的其他文档
|
|
28
|
+
for file_path in additional_files:
|
|
29
|
+
if os.path.exists(file_path):
|
|
30
|
+
filename = os.path.basename(file_path)
|
|
31
|
+
with open(file_path, 'r', encoding='utf-8') as infile:
|
|
32
|
+
content = infile.read()
|
|
33
|
+
outfile.write(f"<!-- {filename} -->\n\n")
|
|
34
|
+
outfile.write(content)
|
|
35
|
+
outfile.write(f"\n\n<!--- End of {filename} -->\n\n")
|
|
36
|
+
else:
|
|
37
|
+
print(f"⚠️ 文件不存在,跳过: {file_path}")
|
|
38
|
+
|
|
39
|
+
# 然后合并API目录下的所有Markdown文件
|
|
40
|
+
outfile.write("<!-- API文档 -->\n\n")
|
|
41
|
+
outfile.write("# API参考\n\n")
|
|
42
|
+
|
|
43
|
+
# 递归遍历API目录
|
|
44
|
+
for root, _, files in os.walk(api_dir):
|
|
45
|
+
for file in files:
|
|
46
|
+
if file.endswith('.md'):
|
|
47
|
+
file_path = os.path.join(root, file)
|
|
48
|
+
rel_path = os.path.relpath(file_path, api_dir)
|
|
49
|
+
|
|
50
|
+
with open(file_path, 'r', encoding='utf-8') as infile:
|
|
51
|
+
content = infile.read()
|
|
52
|
+
outfile.write(f"## {rel_path}\n\n")
|
|
53
|
+
outfile.write(content)
|
|
54
|
+
outfile.write("\n\n")
|
|
55
|
+
|
|
56
|
+
outfile.write("<!--- End of API文档 -->\n")
|
|
57
|
+
|
|
58
|
+
if __name__ == "__main__":
|
|
59
|
+
api_directory = "docs/api"
|
|
60
|
+
|
|
61
|
+
additional_documents = [
|
|
62
|
+
"docs/UseCore.md",
|
|
63
|
+
"docs/DEVELOPMENT.md",
|
|
64
|
+
"docs/ADAPTERS.md",
|
|
65
|
+
"docs/Conversion-Standard.md"
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
# 输出文件路径
|
|
69
|
+
output_file_path = "docs/ForAIDocs/ErisPulseDevelop.md"
|
|
70
|
+
|
|
71
|
+
# 确保输出目录存在
|
|
72
|
+
os.makedirs(os.path.dirname(output_file_path), exist_ok=True)
|
|
73
|
+
|
|
74
|
+
print("⏳ 正在合并文档...")
|
|
75
|
+
merge_markdown_files(api_directory, additional_documents, output_file_path)
|
|
76
|
+
print(f"🎉 文档合并完成,已保存到: {output_file_path}")
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import ast
|
|
3
|
+
import re
|
|
4
|
+
import argparse
|
|
5
|
+
from typing import List, Dict, Tuple, Optional, Set
|
|
6
|
+
|
|
7
|
+
def process_docstring(docstring: str) -> Optional[str]:
|
|
8
|
+
"""
|
|
9
|
+
处理文档字符串中的特殊标签
|
|
10
|
+
|
|
11
|
+
:param docstring: 原始文档字符串
|
|
12
|
+
:return: 处理后的文档字符串或None(如果包含忽略标签)
|
|
13
|
+
"""
|
|
14
|
+
if not docstring:
|
|
15
|
+
return None
|
|
16
|
+
|
|
17
|
+
# 检查忽略标签
|
|
18
|
+
if "{!--< internal-use >!--}" in docstring or "{!--< ignore >!--}" in docstring:
|
|
19
|
+
return None
|
|
20
|
+
|
|
21
|
+
# 替换过时标签
|
|
22
|
+
docstring = docstring.replace("{!--< deprecated >!--}", "**过时**:")
|
|
23
|
+
|
|
24
|
+
# 替换实验性标签
|
|
25
|
+
docstring = docstring.replace("{!--< experimental >!--}", "**实验性**:")
|
|
26
|
+
|
|
27
|
+
# 处理提示标签(单行)
|
|
28
|
+
docstring = re.sub(
|
|
29
|
+
r"\{!--< tips >!--\}(.*?)\{!--< /tips >!--\}",
|
|
30
|
+
lambda m: f"> **提示**:{m.group(1)}\n\n",
|
|
31
|
+
docstring,
|
|
32
|
+
flags=re.DOTALL
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# 处理单行提示标签(没有结束标签)
|
|
36
|
+
docstring = re.sub(
|
|
37
|
+
r"\{!--< tips >!--\}([^\n]*)",
|
|
38
|
+
lambda m: f"> **提示**:{m.group(1)}\n\n",
|
|
39
|
+
docstring
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
return docstring.strip()
|
|
43
|
+
|
|
44
|
+
def parse_python_file(file_path: str) -> Tuple[Optional[str], List[Dict], List[Dict]]:
|
|
45
|
+
"""
|
|
46
|
+
解析Python文件,提取模块文档、类和函数信息
|
|
47
|
+
|
|
48
|
+
:param file_path: Python文件路径
|
|
49
|
+
:return: (模块文档, 类列表, 函数列表)
|
|
50
|
+
"""
|
|
51
|
+
with open(file_path, "r", encoding="utf-8") as f:
|
|
52
|
+
source = f.read()
|
|
53
|
+
|
|
54
|
+
try:
|
|
55
|
+
module = ast.parse(source)
|
|
56
|
+
except SyntaxError:
|
|
57
|
+
print(f"⚠️ 语法错误,跳过文件: {file_path}")
|
|
58
|
+
return None, [], []
|
|
59
|
+
|
|
60
|
+
# 提取模块文档
|
|
61
|
+
module_doc = ast.get_docstring(module)
|
|
62
|
+
processed_module_doc = process_docstring(module_doc) if module_doc else None
|
|
63
|
+
|
|
64
|
+
classes = []
|
|
65
|
+
functions = []
|
|
66
|
+
|
|
67
|
+
# 遍历AST节点
|
|
68
|
+
for node in module.body:
|
|
69
|
+
# 处理类定义
|
|
70
|
+
if isinstance(node, ast.ClassDef):
|
|
71
|
+
class_doc = ast.get_docstring(node)
|
|
72
|
+
processed_class_doc = process_docstring(class_doc) if class_doc else None
|
|
73
|
+
|
|
74
|
+
if processed_class_doc is None:
|
|
75
|
+
continue
|
|
76
|
+
|
|
77
|
+
methods = []
|
|
78
|
+
# 提取类方法
|
|
79
|
+
for item in node.body:
|
|
80
|
+
if isinstance(item, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
81
|
+
method_doc = ast.get_docstring(item)
|
|
82
|
+
processed_method_doc = process_docstring(method_doc) if method_doc else None
|
|
83
|
+
|
|
84
|
+
if processed_method_doc:
|
|
85
|
+
methods.append({
|
|
86
|
+
"name": item.name,
|
|
87
|
+
"doc": processed_method_doc
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
classes.append({
|
|
91
|
+
"name": node.name,
|
|
92
|
+
"doc": processed_class_doc,
|
|
93
|
+
"methods": methods
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
# 处理函数定义
|
|
97
|
+
elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
98
|
+
func_doc = ast.get_docstring(node)
|
|
99
|
+
processed_func_doc = process_docstring(func_doc) if func_doc else None
|
|
100
|
+
|
|
101
|
+
if processed_func_doc:
|
|
102
|
+
functions.append({
|
|
103
|
+
"name": node.name,
|
|
104
|
+
"doc": processed_func_doc
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
return processed_module_doc, classes, functions
|
|
108
|
+
|
|
109
|
+
def generate_markdown(module_path: str, module_doc: Optional[str],
|
|
110
|
+
classes: List[Dict], functions: List[Dict]) -> str:
|
|
111
|
+
"""
|
|
112
|
+
生成Markdown格式的API文档
|
|
113
|
+
|
|
114
|
+
:param module_path: 模块路径(点分隔)
|
|
115
|
+
:param module_doc: 模块文档
|
|
116
|
+
:param classes: 类信息列表
|
|
117
|
+
:param functions: 函数信息列表
|
|
118
|
+
:return: Markdown格式的文档字符串
|
|
119
|
+
"""
|
|
120
|
+
content = []
|
|
121
|
+
|
|
122
|
+
# 模块标题
|
|
123
|
+
content.append(f"# `{module_path}` 模块\n")
|
|
124
|
+
|
|
125
|
+
# 模块文档
|
|
126
|
+
if module_doc:
|
|
127
|
+
content.append(f"{module_doc}\n")
|
|
128
|
+
|
|
129
|
+
# 函数部分
|
|
130
|
+
if functions:
|
|
131
|
+
content.append("## 函数\n")
|
|
132
|
+
for func in functions:
|
|
133
|
+
content.append(f"### `{func['name']}`\n")
|
|
134
|
+
content.append(f"{func['doc']}\n\n")
|
|
135
|
+
|
|
136
|
+
# 类部分
|
|
137
|
+
if classes:
|
|
138
|
+
content.append("## 类\n")
|
|
139
|
+
for cls in classes:
|
|
140
|
+
content.append(f"### `{cls['name']}`\n")
|
|
141
|
+
content.append(f"{cls['doc']}\n\n")
|
|
142
|
+
|
|
143
|
+
# 类方法
|
|
144
|
+
if cls["methods"]:
|
|
145
|
+
content.append("#### 方法\n")
|
|
146
|
+
for method in cls["methods"]:
|
|
147
|
+
content.append(f"##### `{method['name']}`\n")
|
|
148
|
+
content.append(f"{method['doc']}\n\n")
|
|
149
|
+
|
|
150
|
+
return "\n".join(content)
|
|
151
|
+
|
|
152
|
+
def generate_api_docs(src_dir: str, output_dir: str):
|
|
153
|
+
"""
|
|
154
|
+
生成API文档
|
|
155
|
+
|
|
156
|
+
:param src_dir: 源代码目录
|
|
157
|
+
:param output_dir: 输出目录
|
|
158
|
+
"""
|
|
159
|
+
# 确保输出目录存在
|
|
160
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
161
|
+
|
|
162
|
+
# 遍历源代码目录
|
|
163
|
+
for root, _, files in os.walk(src_dir):
|
|
164
|
+
for file in files:
|
|
165
|
+
if file.endswith(".py"):
|
|
166
|
+
file_path = os.path.join(root, file)
|
|
167
|
+
|
|
168
|
+
# 计算模块路径
|
|
169
|
+
rel_path = os.path.relpath(file_path, src_dir)
|
|
170
|
+
module_path = rel_path.replace(".py", "").replace(os.sep, "/")
|
|
171
|
+
|
|
172
|
+
# 解析Python文件
|
|
173
|
+
module_doc, classes, functions = parse_python_file(file_path)
|
|
174
|
+
|
|
175
|
+
# 跳过没有文档的文件
|
|
176
|
+
if not module_doc and not classes and not functions:
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
# 生成Markdown内容
|
|
180
|
+
md_content = generate_markdown(module_path, module_doc, classes, functions)
|
|
181
|
+
|
|
182
|
+
# 写入文件
|
|
183
|
+
output_path = os.path.join(output_dir, f"{module_path}.md")
|
|
184
|
+
os.makedirs(os.path.dirname(output_path), exist_ok=True)
|
|
185
|
+
|
|
186
|
+
with open(output_path, "w", encoding="utf-8") as f:
|
|
187
|
+
f.write(md_content)
|
|
188
|
+
|
|
189
|
+
print(f"✅ 已生成: {output_path}")
|
|
190
|
+
|
|
191
|
+
if __name__ == "__main__":
|
|
192
|
+
parser = argparse.ArgumentParser(description="API文档生成器")
|
|
193
|
+
parser.add_argument("--src", default="src", help="源代码目录 (默认: src)")
|
|
194
|
+
parser.add_argument("--output", default="docs/api", help="输出目录 (默认: docs/api)")
|
|
195
|
+
|
|
196
|
+
args = parser.parse_args()
|
|
197
|
+
|
|
198
|
+
print(f"📁 源代码目录: {args.src}")
|
|
199
|
+
print(f"📂 输出目录: {args.output}")
|
|
200
|
+
print("⏳ 正在生成API文档...")
|
|
201
|
+
|
|
202
|
+
generate_api_docs(args.src, args.output)
|
|
203
|
+
|
|
204
|
+
print("🎉 API文档生成完成!")
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
name: 🎀 艾莉丝的版本标签魔法 ~
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
auto-tag-and-release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: 检出代码
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
|
|
20
|
+
- name: 读取版本卷轴
|
|
21
|
+
id: info
|
|
22
|
+
shell: bash
|
|
23
|
+
run: |
|
|
24
|
+
version=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "//;s/"//')
|
|
25
|
+
echo "version=$version" >> $GITHUB_OUTPUT
|
|
26
|
+
echo "发现新版本: $version"
|
|
27
|
+
|
|
28
|
+
if [[ $version =~ dev|alpha|beta|a|b ]]; then
|
|
29
|
+
echo "is_dev=true" >> $GITHUB_OUTPUT
|
|
30
|
+
else
|
|
31
|
+
echo "is_dev=false" >> $GITHUB_OUTPUT
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
commit_msg=$(git log -1 --pretty=%B)
|
|
35
|
+
commit_short=$(git rev-parse --short HEAD)
|
|
36
|
+
echo "commit_short=$commit_short" >> $GITHUB_OUTPUT
|
|
37
|
+
echo "commit_msg<<EOF" >> $GITHUB_OUTPUT
|
|
38
|
+
echo "$commit_msg" >> $GITHUB_OUTPUT
|
|
39
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
40
|
+
|
|
41
|
+
- name: 获取变更文件列表
|
|
42
|
+
id: changed_files
|
|
43
|
+
shell: bash
|
|
44
|
+
run: |
|
|
45
|
+
before="${{ github.event.before }}"
|
|
46
|
+
after="${{ github.sha }}"
|
|
47
|
+
|
|
48
|
+
if [[ "$before" == "0000000000000000000000000000000000000000" ]]; then
|
|
49
|
+
before="HEAD~1"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
echo "before=$before" >> $GITHUB_OUTPUT
|
|
53
|
+
echo "after=$after" >> $GITHUB_OUTPUT
|
|
54
|
+
|
|
55
|
+
files=$(git diff --name-only $before..$after | head -n 50 | xargs)
|
|
56
|
+
file_count=$(git diff --name-only $before..$after | wc -l)
|
|
57
|
+
|
|
58
|
+
if [ "$file_count" -gt 50 ]; then
|
|
59
|
+
files="$files ..."
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
echo "files=$files" >> $GITHUB_OUTPUT
|
|
63
|
+
|
|
64
|
+
- name: 施展版本魔法
|
|
65
|
+
env:
|
|
66
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
67
|
+
shell: bash
|
|
68
|
+
run: |
|
|
69
|
+
version="${{ steps.info.outputs.version }}"
|
|
70
|
+
commit_short="${{ steps.info.outputs.commit_short }}"
|
|
71
|
+
commit_msg="${{ steps.info.outputs.commit_msg }}"
|
|
72
|
+
is_dev="${{ steps.info.outputs.is_dev }}"
|
|
73
|
+
tag_name="v$version"
|
|
74
|
+
|
|
75
|
+
if [ -f "docs/CHANGELOG.md" ]; then
|
|
76
|
+
changelog=$(sed -n "/^## \[$version\]/,/^## /p" docs/CHANGELOG.md | sed '1d;$d')
|
|
77
|
+
fi
|
|
78
|
+
if [ -z "$changelog" ]; then
|
|
79
|
+
changelog="### ✨ 魔法更新\n\n- $commit_msg ($commit_short)"
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
if ! git rev-parse "$tag_name" >/dev/null 2>&1; then
|
|
83
|
+
echo "🎀 施加新的魔法印记..."
|
|
84
|
+
git tag "$tag_name"
|
|
85
|
+
git push origin "$tag_name"
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
if gh release view "$tag_name" &>/dev/null; then
|
|
89
|
+
gh release edit "$tag_name" \
|
|
90
|
+
--notes "$changelog" \
|
|
91
|
+
--prerelease=$is_dev
|
|
92
|
+
echo "🌟 已更新魔法版本 $tag_name"
|
|
93
|
+
else
|
|
94
|
+
gh release create "$tag_name" \
|
|
95
|
+
--notes "$changelog" \
|
|
96
|
+
--title "✨ 艾莉丝的魔法更新 $tag_name" \
|
|
97
|
+
--prerelease=$is_dev
|
|
98
|
+
echo "✨ 已发布新的魔法版本 $tag_name"
|
|
99
|
+
fi
|
|
@@ -2,7 +2,7 @@ name: 🎀 艾莉丝的PyPI包裹快递服务 ~
|
|
|
2
2
|
|
|
3
3
|
# 艾莉丝今天也要努力发包呢!
|
|
4
4
|
on:
|
|
5
|
-
workflow_dispatch: {}
|
|
5
|
+
workflow_dispatch: {}
|
|
6
6
|
|
|
7
7
|
permissions:
|
|
8
8
|
contents: read
|
|
@@ -89,26 +89,3 @@ jobs:
|
|
|
89
89
|
run: |
|
|
90
90
|
emails=$(cat .github/config/notify.json | jq -c '.emails')
|
|
91
91
|
echo "emails=$emails" >> $GITHUB_OUTPUT
|
|
92
|
-
|
|
93
|
-
- name: 发送邮件通知
|
|
94
|
-
uses: ./.github/workflows/send-email
|
|
95
|
-
with:
|
|
96
|
-
subject: "[艾莉丝快报] 新版本 ${{ steps.version.outputs.CURRENT_TAG }} 已发布至 PyPI!✨"
|
|
97
|
-
content: |
|
|
98
|
-
🎀 您好主人~
|
|
99
|
-
|
|
100
|
-
我是艾莉丝,负责为您播报最新消息!
|
|
101
|
-
今天我们的项目又更新啦~快去看看吧!
|
|
102
|
-
|
|
103
|
-
🔖 版本号:${{ steps.version.outputs.CURRENT_TAG }}
|
|
104
|
-
📦 包地址:
|
|
105
|
-
https://pypi.org/project/erispulse/${{ steps.version.outputs.CURRENT_TAG }}
|
|
106
|
-
|
|
107
|
-
📝 更新内容:
|
|
108
|
-
${{ steps.version.outputs.CURRENT_TAG }}
|
|
109
|
-
|
|
110
|
-
祝您每天都有好心情~ 💖
|
|
111
|
-
—— 艾莉丝
|
|
112
|
-
recipients: ${{ steps.get_emails.outputs.emails }}
|
|
113
|
-
resend_api_key: ${{ secrets.RESEND_API_KEY }}
|
|
114
|
-
feishu_smtp_password: ${{ secrets.FEISHU_SMTP_PASSWORD }}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# 贡献者公约行为准则
|
|
2
|
+
|
|
3
|
+
## 我们的承诺
|
|
4
|
+
|
|
5
|
+
为了促进一个开放和欢迎的环境,我们作为贡献者和维护者承诺,让每个人在我们的项目和社区中的参与都成为一个
|
|
6
|
+
无骚扰的体验,无论年龄、身体大小、残疾、种族、性别认同和表现、经验水平、国籍、个人外貌、种族、宗教
|
|
7
|
+
或性别认同和取向如何。
|
|
8
|
+
|
|
9
|
+
## 我们的标准
|
|
10
|
+
|
|
11
|
+
有助于创造积极环境的行为示例包括:
|
|
12
|
+
|
|
13
|
+
* 使用热情和包容的语言
|
|
14
|
+
* 尊重不同的观点和经验
|
|
15
|
+
* 优雅地接受建设性的批评
|
|
16
|
+
* 专注于社区的最佳利益
|
|
17
|
+
* 对其他社区成员表现出同情
|
|
18
|
+
|
|
19
|
+
参与者不可接受行为的示例包括:
|
|
20
|
+
|
|
21
|
+
* 使用性暗示的语言或图像,以及不受欢迎的性关注或挑逗
|
|
22
|
+
* 钓鱼、侮辱/贬损的评论和个人或政治攻击
|
|
23
|
+
* 公共或私人骚扰
|
|
24
|
+
* 在未获得明确许可的情况下发布他人的私人信息,如地址或电子邮件地址
|
|
25
|
+
* 其他在专业环境中被合理视为不当的行为
|
|
26
|
+
|
|
27
|
+
## 我们的责任
|
|
28
|
+
|
|
29
|
+
项目维护者负责澄清可接受行为的标准,并被期望对任何不可接受行为采取适当和公正的纠正措施。
|
|
30
|
+
|
|
31
|
+
项目维护者有权和责任删除、编辑或拒绝与本行为准则不符的评论、提交、代码、维基编辑、问题和其他贡献,
|
|
32
|
+
或因其他他们认为不当、威胁、冒犯或有害的行为而暂时或永久禁止任何贡献者。
|
|
33
|
+
|
|
34
|
+
## 适用范围
|
|
35
|
+
|
|
36
|
+
本行为准则适用于项目空间内和公共空间中,个人代表项目或其社区时的行为。代表项目或社区的示例包括使用
|
|
37
|
+
官方项目电子邮件地址、通过官方社交媒体账户发布信息,或在在线或离线活动中担任任命代表。项目的代表性
|
|
38
|
+
可能由项目维护者进一步定义和澄清。
|
|
39
|
+
|
|
40
|
+
## 执行
|
|
41
|
+
|
|
42
|
+
虐待、骚扰或其他不可接受行为的实例可以通过联系 erispulse@163.com 报告。
|
|
43
|
+
所有投诉将被审查和调查,并将根据情况作出必要和适当的回应。项目团队有责任对事件举报者保持保密。
|
|
44
|
+
具体的执行政策可能会单独发布。
|
|
45
|
+
|
|
46
|
+
不善意遵循或执行行为准则的项目维护者可能会面临其他项目领导成员决定的临时或永久后果。
|
|
47
|
+
|
|
48
|
+
## 归属
|
|
49
|
+
|
|
50
|
+
本行为准则改编自 [贡献者公约][homepage],版本 1.4, 可在
|
|
51
|
+
[https://contributor-covenant.org/version/1/4][version] 获取。
|
|
52
|
+
|
|
53
|
+
[homepage]: https://contributor-covenant.org
|
|
54
|
+
[version]: https://www.contributor-covenant.org/version/1/4
|
|
@@ -2,8 +2,7 @@ MIT License
|
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2025 ErisPulse
|
|
4
4
|
|
|
5
|
-
Portions of this software are based on https://github.com/
|
|
6
|
-
(Copyright (c) 2025 runoneall).
|
|
5
|
+
Portions of this software are based on https://github.com/runoneall/sdkFrame.
|
|
7
6
|
|
|
8
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
8
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -25,4 +24,6 @@ SOFTWARE.
|
|
|
25
24
|
|
|
26
25
|
The documentation portion of this project references content from https://codeberg.org/ybr/yhwiki,
|
|
27
26
|
licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
|
|
28
|
-
International License (CC BY-NC-ND 4.0).
|
|
27
|
+
International License (CC BY-NC-ND 4.0).
|
|
28
|
+
|
|
29
|
+
Note: This license file has been updated to correct the upstream project reference.
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ErisPulse
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
|
|
5
5
|
Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>, runoneall <runoobsteve@gmail.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
8
8
|
Copyright (c) 2025 ErisPulse
|
|
9
9
|
|
|
10
|
-
Portions of this software are based on https://github.com/
|
|
11
|
-
(Copyright (c) 2025 runoneall).
|
|
10
|
+
Portions of this software are based on https://github.com/runoneall/sdkFrame.
|
|
12
11
|
|
|
13
12
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
13
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -31,6 +30,8 @@ License: MIT License
|
|
|
31
30
|
The documentation portion of this project references content from https://codeberg.org/ybr/yhwiki,
|
|
32
31
|
licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
|
|
33
32
|
International License (CC BY-NC-ND 4.0).
|
|
33
|
+
|
|
34
|
+
Note: This license file has been updated to correct the upstream project reference.
|
|
34
35
|
License-File: LICENSE
|
|
35
36
|
Classifier: Development Status :: 5 - Production/Stable
|
|
36
37
|
Classifier: Intended Audience :: Developers
|
|
@@ -46,7 +47,12 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
46
47
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
47
48
|
Requires-Python: >=3.8
|
|
48
49
|
Requires-Dist: aiohttp
|
|
50
|
+
Requires-Dist: fastapi>=0.116.1
|
|
51
|
+
Requires-Dist: hypercorn>=0.14.0
|
|
49
52
|
Requires-Dist: pip
|
|
53
|
+
Requires-Dist: pydantic>=2.10.6
|
|
54
|
+
Requires-Dist: python-multipart>=0.0.20
|
|
55
|
+
Requires-Dist: toml
|
|
50
56
|
Requires-Dist: watchdog
|
|
51
57
|
Description-Content-Type: text/markdown
|
|
52
58
|
|
|
@@ -78,50 +84,19 @@ Description-Content-Type: text/markdown
|
|
|
78
84
|
|
|
79
85
|
## 快速开始
|
|
80
86
|
|
|
81
|
-
###
|
|
82
|
-
|
|
83
|
-
| 需求 | 推荐框架 | 理由 |
|
|
84
|
-
|------|---------|------|
|
|
85
|
-
| 轻量化/底层模块化 | [Framer](https://github.com/FramerOrg/Framer) | 高度解耦的模块化设计 |
|
|
86
|
-
| 全功能机器人开发 | ErisPulse | 开箱即用的完整解决方案 |
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## 安装指南
|
|
91
|
-
|
|
92
|
-
我们全面采用 [`uv`](https://github.com/astral-sh/uv) 作为 Python 工具链,提供更快速可靠的安装体验。
|
|
93
|
-
|
|
94
|
-
> ℹ️ **uv** 是由 Astral 开发的新一代 Python 包管理工具,比传统 pip 快 10-100 倍,并具有更好的依赖解析能力。
|
|
95
|
-
|
|
96
|
-
### 1. 安装 uv
|
|
97
|
-
|
|
98
|
-
#### 通用方法 (pip):
|
|
99
|
-
```bash
|
|
100
|
-
pip install uv
|
|
101
|
-
```
|
|
87
|
+
### 一键安装脚本
|
|
102
88
|
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
106
|
-
```
|
|
89
|
+
我们提供了一键安装脚本,支持所有主流平台:
|
|
107
90
|
|
|
108
91
|
#### Windows (PowerShell):
|
|
109
|
-
```powershell
|
|
110
|
-
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
111
|
-
```
|
|
112
92
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
uv --version
|
|
93
|
+
```powershell
|
|
94
|
+
irm https://get.erisdev.com/install.ps1 -OutFile install.ps1; powershell -ExecutionPolicy Bypass -File install.ps1
|
|
116
95
|
```
|
|
117
96
|
|
|
118
|
-
|
|
119
|
-
|
|
97
|
+
#### macOS/Linux:
|
|
120
98
|
```bash
|
|
121
|
-
|
|
122
|
-
uv venv # 创建虚拟环境
|
|
123
|
-
source .venv/bin/activate # 激活环境 (Windows: .venv\Scripts\activate)
|
|
124
|
-
uv pip install ErisPulse --upgrade # 安装框架
|
|
99
|
+
curl -sSL https://get.erisdev.com/install.sh | tee install.sh >/dev/null && chmod +x install.sh && ./install.sh
|
|
125
100
|
```
|
|
126
101
|
|
|
127
102
|
---
|
|
@@ -131,7 +106,7 @@ uv pip install ErisPulse --upgrade # 安装框架
|
|
|
131
106
|
### 克隆项目并进入目录
|
|
132
107
|
|
|
133
108
|
```bash
|
|
134
|
-
git clone https://github.com/ErisPulse/ErisPulse.git
|
|
109
|
+
git clone -b Develop/v2 https://github.com/ErisPulse/ErisPulse.git
|
|
135
110
|
cd ErisPulse
|
|
136
111
|
```
|
|
137
112
|
|
|
@@ -26,50 +26,19 @@
|
|
|
26
26
|
|
|
27
27
|
## 快速开始
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### 一键安装脚本
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|------|---------|------|
|
|
33
|
-
| 轻量化/底层模块化 | [Framer](https://github.com/FramerOrg/Framer) | 高度解耦的模块化设计 |
|
|
34
|
-
| 全功能机器人开发 | ErisPulse | 开箱即用的完整解决方案 |
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## 安装指南
|
|
39
|
-
|
|
40
|
-
我们全面采用 [`uv`](https://github.com/astral-sh/uv) 作为 Python 工具链,提供更快速可靠的安装体验。
|
|
41
|
-
|
|
42
|
-
> ℹ️ **uv** 是由 Astral 开发的新一代 Python 包管理工具,比传统 pip 快 10-100 倍,并具有更好的依赖解析能力。
|
|
43
|
-
|
|
44
|
-
### 1. 安装 uv
|
|
45
|
-
|
|
46
|
-
#### 通用方法 (pip):
|
|
47
|
-
```bash
|
|
48
|
-
pip install uv
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
#### macOS/Linux:
|
|
52
|
-
```bash
|
|
53
|
-
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
54
|
-
```
|
|
31
|
+
我们提供了一键安装脚本,支持所有主流平台:
|
|
55
32
|
|
|
56
33
|
#### Windows (PowerShell):
|
|
57
|
-
```powershell
|
|
58
|
-
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
59
|
-
```
|
|
60
34
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
uv --version
|
|
35
|
+
```powershell
|
|
36
|
+
irm https://get.erisdev.com/install.ps1 -OutFile install.ps1; powershell -ExecutionPolicy Bypass -File install.ps1
|
|
64
37
|
```
|
|
65
38
|
|
|
66
|
-
|
|
67
|
-
|
|
39
|
+
#### macOS/Linux:
|
|
68
40
|
```bash
|
|
69
|
-
|
|
70
|
-
uv venv # 创建虚拟环境
|
|
71
|
-
source .venv/bin/activate # 激活环境 (Windows: .venv\Scripts\activate)
|
|
72
|
-
uv pip install ErisPulse --upgrade # 安装框架
|
|
41
|
+
curl -sSL https://get.erisdev.com/install.sh | tee install.sh >/dev/null && chmod +x install.sh && ./install.sh
|
|
73
42
|
```
|
|
74
43
|
|
|
75
44
|
---
|
|
@@ -79,7 +48,7 @@ uv pip install ErisPulse --upgrade # 安装框架
|
|
|
79
48
|
### 克隆项目并进入目录
|
|
80
49
|
|
|
81
50
|
```bash
|
|
82
|
-
git clone https://github.com/ErisPulse/ErisPulse.git
|
|
51
|
+
git clone -b Develop/v2 https://github.com/ErisPulse/ErisPulse.git
|
|
83
52
|
cd ErisPulse
|
|
84
53
|
```
|
|
85
54
|
|