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
9 changes: 2 additions & 7 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ inputs:
runs:
using: "composite"
steps:
- name: Install poetry
run: pipx install poetry
shell: bash

- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ inputs.python-version }}
cache: "poetry"

- run: poetry install
- run: uv sync
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Run Pytest
run: |
poetry run pytest -n auto --cov-append --cov-report xml
uv run pytest -n auto --cov-append --cov-report xml

- name: Upload coverage report
uses: codecov/codecov-action@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- 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,7 +29,7 @@ jobs:
run: exit 1

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

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
1,376 changes: 0 additions & 1,376 deletions poetry.lock

This file was deleted.

58 changes: 33 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
[tool.poetry]
[project]
name = "nonebot-plugin-localstore"
version = "0.7.4"
description = "Local Storage Support for NoneBot2"
authors = ["yanyongyu <yyy@nonebot.dev>"]
license = "MIT"
authors = [{ name = "yanyongyu", email = "yyy@nonebot.dev" }]
requires-python = ">=3.9,<4"
readme = "README.md"
homepage = "https://github.com/nonebot/plugin-localstore"
repository = "https://github.com/nonebot/plugin-localstore"
documentation = "https://github.com/nonebot/plugin-localstore#readme"
license = "MIT"
keywords = ["nonebot2", "qq", "plugin"]
dependencies = [
"nonebot2>=2.3.0,<3",
"nonestorage>=0.1.0,<0.2",
"typing-extensions>=4.0.0,<5",
"pydantic>=1.10.0,<3.0.0,!=2.5.0,!=2.5.1",
]

[tool.poetry.dependencies]
python = "^3.9"
nonebot2 = "^2.3.0"
nonestorage = "^0.1.0"
typing-extensions = "^4.0.0"
pydantic = ">=1.10.0,<3.0.0,!=2.5.0,!=2.5.1"

[tool.poetry.group.dev.dependencies]
ruff = "^0.9.0"
nonebug = "^0.4.3"
nonemoji = "^0.1.2"
pre-commit = "^4.0.0"
pytest-cov = "^6.0.0"
pytest-xdist = "^3.6.1"
[project.urls]
Homepage = "https://github.com/nonebot/plugin-localstore"
Repository = "https://github.com/nonebot/plugin-localstore"
Documentation = "https://github.com/nonebot/plugin-localstore#readme"

[tool.poetry.plugins.nb_scripts]
[project.entry-points.nb_scripts]
localstore = "nonebot_plugin_localstore.script:main"

[dependency-groups]
dev = [
"ruff>=0.9.0,<0.10",
"nonebug>=0.4.3,<0.5",
"nonemoji>=0.1.2,<0.2",
"pre-commit>=4.0.0,<5",
"pytest-cov>=6.0.0,<7",
"pytest-xdist>=3.6.1,<4",
]

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

[tool.uv.build-backend]
module-name = "nonebot_plugin_localstore"
module-root = ""

[tool.pytest.ini_options]
addopts = "--cov=./nonebot_plugin_localstore --cov-report=term-missing"

Expand Down Expand Up @@ -78,7 +90,3 @@ pythonPlatform = "All"
typeCheckingMode = "standard"
reportShadowedImports = false
disableBytesTypePromotions = true

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Loading