pallas-plugin-bot-status 4.0.1__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.
- pallas_plugin_bot_status-4.0.1/.github/workflows/ci.yml +17 -0
- pallas_plugin_bot_status-4.0.1/.github/workflows/publish-pypi.yml +52 -0
- pallas_plugin_bot_status-4.0.1/.gitignore +9 -0
- pallas_plugin_bot_status-4.0.1/AGENTS.md +23 -0
- pallas_plugin_bot_status-4.0.1/LICENSE +661 -0
- pallas_plugin_bot_status-4.0.1/PKG-INFO +726 -0
- pallas_plugin_bot_status-4.0.1/README.md +52 -0
- pallas_plugin_bot_status-4.0.1/pyproject.toml +38 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/__init__.py +309 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/bot_monitor.py +222 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/config.py +63 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/list_mode.py +71 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/mail_notifier.py +147 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/shard_count.py +80 -0
- pallas_plugin_bot_status-4.0.1/src/pallas_plugin_bot_status/utils.py +58 -0
- pallas_plugin_bot_status-4.0.1/uv.lock +737 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
ruff:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: astral-sh/setup-uv@v5
|
|
15
|
+
- run: uv sync --group dev
|
|
16
|
+
- run: uv run ruff check src/
|
|
17
|
+
- run: uv run ruff format --check src/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment: pypi
|
|
16
|
+
permissions:
|
|
17
|
+
id-token: write
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v5
|
|
26
|
+
|
|
27
|
+
- name: Verify tag matches pyproject version
|
|
28
|
+
if: github.event_name == 'push'
|
|
29
|
+
run: |
|
|
30
|
+
set -euo pipefail
|
|
31
|
+
TAG="${GITHUB_REF#refs/tags/v}"
|
|
32
|
+
VER="$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")"
|
|
33
|
+
if [ "${TAG}" != "${VER}" ]; then
|
|
34
|
+
echo "::error::tag v${TAG} 与 pyproject.toml version ${VER} 不一致"
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
- name: Build
|
|
39
|
+
run: uv build
|
|
40
|
+
|
|
41
|
+
- name: Verify wheel contains Python packages
|
|
42
|
+
run: |
|
|
43
|
+
set -euo pipefail
|
|
44
|
+
if ! unzip -l dist/*.whl | grep -q '__init__\.py'; then
|
|
45
|
+
echo "::error::wheel 无 Python 包(检查 hatch src layout)"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
- name: Publish to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
51
|
+
with:
|
|
52
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## 项目
|
|
4
|
+
|
|
5
|
+
- **名称**:pallas-plugin-bot-status
|
|
6
|
+
- **类型**:Pallas-Bot 4.0 官方扩展(NoneBot 插件包)
|
|
7
|
+
- **Python**:3.12+
|
|
8
|
+
- **依赖**:`uv` · 运行时依赖 [Pallas-Bot](https://github.com/PallasBot/Pallas-Bot) `>=4.0`
|
|
9
|
+
|
|
10
|
+
## 本地开发
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
uv sync --group dev
|
|
14
|
+
uv run ruff check src/
|
|
15
|
+
uv run ruff format --check src/
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
与本体联调:在本体仓库执行 `uv pip install -e ../pallas-plugin-bot-status`。
|
|
19
|
+
|
|
20
|
+
## 约定
|
|
21
|
+
|
|
22
|
+
- 仅改 `src/`;通过 `pallas-bot` 公开 API(`src.features` / `src.platform`)访问内核。
|
|
23
|
+
- 提交前 `ruff check` + `ruff format --check` 通过。
|