Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "Default Linux Universal",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {}
},
"postCreateCommand": "poetry config virtualenvs.in-project true && poetry install && poetry run pre-commit install",
"postCreateCommand": "uv sync && uv run pre-commit install",
"customizations": {
"vscode": {
"settings": {
Expand Down
24 changes: 0 additions & 24 deletions .github/actions/setup-python/action.yml

This file was deleted.

11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
steps:
- uses: actions/checkout@v5

- name: Setup Python environment
uses: ./.github/actions/setup-python
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7

- name: Get Version
id: version
run: |
echo "VERSION=$(poetry version -s)" >> $GITHUB_OUTPUT
echo "VERSION=$(uv version --short)" >> $GITHUB_OUTPUT
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

Expand All @@ -29,11 +29,10 @@ jobs:
run: exit 1

- name: Build Package
run: |
poetry build
run: uv build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
run: uv publish

- name: Publish package to GitHub
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
paths:
- "nonebot/**"
- "codegen/**"
- "poetry.lock"
- "uv.lock"
- "pyproject.toml"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ _✨ GitHub 协议适配 ✨_
## 安装

```bash
poetry add nonebot-adapter-github
uv add nonebot-adapter-github
# 或者
pip install nonebot-adapter-github
```
Expand Down
1,268 changes: 0 additions & 1,268 deletions poetry.lock

This file was deleted.

49 changes: 28 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[tool.poetry]
[project]
name = "nonebot-adapter-github"
version = "0.5.0"
description = "GitHub adapter for nonebot2"
authors = ["yanyongyu <yyy@nonebot.dev>"]
license = "MIT"
authors = [{ name = "yanyongyu", email = "yyy@nonebot.dev" }]
requires-python = ">=3.9, <4.0"
readme = "README.md"
homepage = "https://github.com/nonebot/adapter-github"
repository = "https://github.com/nonebot/adapter-github"
documentation = "https://github.com/nonebot/adapter-github"
license = "MIT"
keywords = ["bot", "github", "webhook"]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -16,19 +14,32 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
packages = [{ include = "nonebot" }]
dependencies = [
"nonebot2>=2.2.0,<3",
"pydantic>=1.10.0,<3.0.0,!=2.5.0,!=2.5.1",
"githubkit[auth-app]>=0.12.2,<0.13.0",
]

[tool.poetry.dependencies]
python = "^3.9"
nonebot2 = "^2.2.0"
pydantic = ">=1.10.0,<3.0.0,!=2.5.0,!=2.5.1"
githubkit = { version = ">=0.12.2,<0.13.0", extras = ["auth-app"] }
[project.urls]
Homepage = "https://github.com/nonebot/adapter-github"
Repository = "https://github.com/nonebot/adapter-github"
Documentation = "https://github.com/nonebot/adapter-github"

[tool.poetry.group.dev.dependencies]
ruff = "^0.8.2"
Jinja2 = "^3.1.2"
nonemoji = "^0.1.2"
pre-commit = "^3.1.0"
[dependency-groups]
dev = [
"ruff>=0.8.2,<0.9",
"Jinja2>=3.1.2,<4",
"nonemoji>=0.1.2,<0.2",
"pre-commit>=3.1.0,<4",
]

[build-system]
requires = ["uv_build>=0.9.1,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "nonebot.adapters.github"
module-root = ""

[tool.ruff]
line-length = 88
Expand Down Expand Up @@ -92,7 +103,3 @@ typeCheckingMode = "standard"
reportShadowedImports = false
reportIncompatibleVariableOverride = false
disableBytesTypePromotions = true

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
1,080 changes: 1,080 additions & 0 deletions uv.lock

Large diffs are not rendered by default.