Skip to content

Commit 3c5cecd

Browse files
committed
🎉 Initialization project
0 parents  commit 3c5cecd

80 files changed

Lines changed: 7563 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[{*.py,*.pyi}]
15+
indent_size = 4

.env

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ENVIRONMENT=prod
2+
# DRIVER=~fastapi+~httpx+~websockets
3+
#
4+
# 是否为沙盒模式
5+
# QQGUILD_IS_SANDBOX=false
6+
#
7+
# QQ频道机器人帐号
8+
# QQGUILD_BOTS='
9+
# [
10+
# {
11+
# "id": "xxx",
12+
# "token": "xxx",
13+
# "secret": "xxx",
14+
# "intent": {
15+
# "guild_messages": false,
16+
# "at_messages": true
17+
# }
18+
# }
19+
# ]'
20+
#
21+
# Telegram 机器人账号
22+
# telegram_bots = [{"token": "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI"}]

.env.prod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# HOST=127.0.0.1
2+
# PORT=8080
3+
COMMAND_START=["/"]
4+
COMMAND_SEP=[" "]
5+
LOG_LEVEL=INFO
6+
7+
PROXY=""
8+
9+
ALCONNA_AUTO_SEND_OUTPUT=true
10+
ALCONNA_USE_COMMAND_START=true
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: 🐛 错误报告
2+
title: "Bug: "
3+
description: 创建一个错误报告来帮助我们改进
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## 注意事项
10+
[GitHub Issues](../issues) 专门用于错误报告和功能需求,这意味着我们不接受使用问题。如果您打开的问题不符合要求,它将会被无条件关闭。
11+
12+
有关使用问题,请通过以下途径:
13+
- 阅读文档以解决
14+
- 在社区内寻求他人解答
15+
- 在 [GitHub Discussions](../discussions) 上提问
16+
- 在网络中搜索是否有人遇到过类似的问题
17+
18+
如果您不知道如何有效、精准地提出一个问题,我们建议您先阅读[《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md)。
19+
20+
最后,请记得遵守我们的社区准则,友好交流。
21+
22+
- type: checkboxes
23+
id: terms
24+
attributes:
25+
label: 报告清单
26+
description: 请确认您已遵守所有必选项。
27+
options:
28+
- label: 我已仔细阅读并了解上述注意事项。
29+
required: true
30+
- label: 我已使用最新版本测试过,确认问题依旧存在。
31+
required: true
32+
- label: 我确定在 [GitHub Issues](../issues) 中没有相同或相似的问题。
33+
required: true
34+
- label: 我有足够的时间和能力,愿意为此提交 PR 来修复问题。
35+
36+
- type: input
37+
id: version
38+
attributes:
39+
label: 影响版本
40+
description: 这个问题出现在哪个版本上?
41+
placeholder: 发布版本号或 Commit ID
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
id: describe
47+
attributes:
48+
label: 问题描述
49+
description: 请清晰简洁地说明问题是什么,并解释您是如何遇到此问题的,以及您为此做出的尝试。
50+
placeholder: 我遇到的问题是……
51+
validations:
52+
required: true
53+
54+
- type: textarea
55+
id: reproduction
56+
attributes:
57+
label: 复现步骤
58+
description: |
59+
提供能复现此问题的详细操作步骤。如果可能,请尝试提供一个可复现的测试用例,该测试用例是发生问题所需的最低限度。
60+
推荐阅读:[《如何创建一个最小的、可复现的示例》](https://stackoverflow.com/help/minimal-reproducible-example)
61+
placeholder: |
62+
1. 首先……
63+
2. 然后……
64+
3. 发生……
65+
validations:
66+
required: true
67+
68+
- type: textarea
69+
id: expected
70+
attributes:
71+
label: 预期行为
72+
description: 您的预期中会发生什么?
73+
placeholder: 正常情况下它应该……
74+
75+
- type: textarea
76+
id: logs
77+
attributes:
78+
label: 日志信息
79+
description: 提供有助于诊断问题的任何日志和完整的错误信息。
80+
placeholder: 请注意将您的敏感信息从日志中过滤或替换。
81+
82+
- type: textarea
83+
id: context
84+
attributes:
85+
label: 额外补充
86+
description: 在此处添加相关的任何其他上下文或截图,或者您觉得有帮助的信息。
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: ✨ 功能需求
2+
title: "Feature: "
3+
description: 为项目提出一个新的想法或建议
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## 注意事项
10+
[GitHub Issues](../issues) 专门用于错误报告和功能需求,这意味着我们不接受使用问题。如果您打开的问题不符合要求,它将会被无条件关闭。
11+
12+
有关使用问题,请通过以下途径:
13+
- 阅读文档以解决
14+
- 在社区内寻求他人解答
15+
- 在 [GitHub Discussions](../discussions) 上提问
16+
- 在网络中搜索是否有人遇到过类似的问题
17+
18+
最后,请记得遵守我们的社区准则,友好交流。
19+
20+
- type: checkboxes
21+
id: terms
22+
attributes:
23+
label: 报告清单
24+
description: 请确认您已遵守所有必选项。
25+
options:
26+
- label: 我已仔细阅读并了解上述注意事项。
27+
required: true
28+
- label: 我已使用最新版本测试过,确认功能并未实现。
29+
required: true
30+
- label: 我确定在 [GitHub Issues](../issues) 中没有相同或相似的需求。
31+
required: true
32+
- label: 我有足够的时间和能力,愿意为此提交 PR 来实现功能。
33+
34+
- type: textarea
35+
id: problem
36+
attributes:
37+
label: 您希望能解决什么样的问题?
38+
description: 请简要地说明是什么问题导致您想要一个新功能。也许我们可以提出一种现有的解决办法。
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: solution
44+
attributes:
45+
label: 您想要的解决方案
46+
description: 请说明您希望使用什么样的方法解决上述问题。
47+
validations:
48+
required: true
49+
50+
- type: textarea
51+
id: alternatives
52+
attributes:
53+
label: 您考虑过的替代方案
54+
description: 除了上述方法以外,您还考虑过哪些其他的实现方式?
55+
56+
- type: textarea
57+
id: usecase
58+
attributes:
59+
label: 实现的功能是什么样的?
60+
description: |
61+
提供功能在实现后如何使用的代码示例。请注意,您可以使用 Markdown 来设置代码块的格式。
62+
尽可能多地提供细节。您希望它如何使用的示例代码会有所帮助。
63+
64+
- type: textarea
65+
id: context
66+
attributes:
67+
label: 还有什么要补充的吗?
68+
description: 在此处添加相关的任何其他上下文或截图,或者您觉得有帮助的信息。
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Setup Python
2+
description: Setup Python
3+
4+
inputs:
5+
python-version:
6+
description: Python version
7+
required: false
8+
default: "3.10"
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Install Pdm
14+
run: pipx install pdm
15+
shell: bash
16+
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v3
19+
with:
20+
python-version: ${{ inputs.python-version }}
21+
architecture: "x64"
22+
cache: true
23+
24+
- name: Install dependencies
25+
run: pdm install
26+
shell: bash

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily

.github/workflows/codecov.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Code Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- "magic/**"
10+
11+
jobs:
12+
test:
13+
name: Test Coverage
14+
runs-on: ${{ matrix.os }}
15+
concurrency:
16+
group: test-coverage-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python-version }}
17+
cancel-in-progress: true
18+
strategy:
19+
matrix:
20+
python-version: ["3.10", "3.11"]
21+
os: [ubuntu-latest, windows-latest, macos-latest]
22+
fail-fast: false
23+
env:
24+
OS: ${{ matrix.os }}
25+
PYTHON_VERSION: ${{ matrix.python-version }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Setup Python environment
31+
uses: ./.github/actions/setup-python
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Upload coverage reports to Codecov
36+
uses: codecov/codecov-action@v3
37+
env:
38+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39+
40+

.github/workflows/pyright.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pyright Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- "magic/**"
10+
- "tests/**"
11+
12+
jobs:
13+
pyright:
14+
name: Pyright Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Python environment
20+
uses: ./.github/actions/setup-python
21+
22+
- run: echo "$(pdm venv --path in-project)/bin" >> $GITHUB_PATH
23+
24+
- name: Run Pyright
25+
uses: jakebailey/pyright-action@v1

.github/workflows/ruff.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Ruff Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- "magic/**"
10+
- "tests/**"
11+
12+
jobs:
13+
ruff:
14+
name: Ruff Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Run Ruff Lint
20+
uses: chartboost/ruff-action@v1

0 commit comments

Comments
 (0)