🔧 Change dependency tool to pdm

This commit is contained in:
omg-xtao 2024-06-04 11:51:33 +00:00 committed by GitHub
parent 3c1943c9ae
commit 62d74872a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 2602 additions and 2729 deletions

View File

@ -5,8 +5,7 @@
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm", "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"features": { "features": {
"ghcr.io/devcontainers-contrib/features/pdm:2": {}, "ghcr.io/devcontainers-contrib/features/pdm:2": {}
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
}, },
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
@ -16,7 +15,7 @@
// "forwardPorts": [], // "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "poetry install --extras all" "postCreateCommand": "pdm install"
// Configure tool-specific properties. // Configure tool-specific properties.
// "customizations": {}, // "customizations": {},

1
.gitignore vendored
View File

@ -26,6 +26,7 @@ share/python-wheels/
.installed.cfg .installed.cfg
*.egg *.egg
MANIFEST MANIFEST
.pdm-python
# PyInstaller # PyInstaller
# Usually these files are written by a python script from a template # Usually these files are written by a python script from a template

2435
pdm.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@ class UpdatePlugin(Plugin):
await execute("git pull --all") await execute("git pull --all")
await execute("git submodule update") await execute("git submodule update")
if len(args) > 1: if len(args) > 1:
await execute(f"{executable} -m poetry install --extras all") await execute(f"{executable} -m pdm install")
logger.info("更新成功 正在重启") logger.info("更新成功 正在重启")
await reply_text.edit_text("更新成功 正在重启") await reply_text.edit_text("更新成功 正在重启")
async with async_open(UPDATE_DATA, mode="w", encoding="utf-8") as file: async with async_open(UPDATE_DATA, mode="w", encoding="utf-8") as file:

2581
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,62 +1,70 @@
[tool.poetry]
[project]
name = "PamGram" name = "PamGram"
version = "0.4.0" version = "0.4.0"
description = "Telegarm robot, query the official starrail information." description = "Telegarm robot, query the official starrail information."
authors = ["洛水居室", "zhxy-CN", "Chuangbo Li", "kotoriのねこ", "omg-xtao", "艾迪", "Karako", "SiHuaN", "Nahida Buer"] authors = [
license = "AGPL-3.0" {name = "洛水居室"},
{name = "zhxy-CN"},
{name = "Chuangbo Li"},
{name = "kotoriのねこ"},
{name = "omg-xtao"},
{name = "艾迪"},
{name = "Karako"},
{name = "SiHuaN"},
{name = "Nahida Buer"},
]
dependencies = [
"httpx<1.0.0,>=0.25.0",
"ujson<6.0.0,>=5.9.0",
"Jinja2<4.0.0,>=3.1.2",
"python-telegram-bot[ext,rate-limiter]<21.0,>=20.7",
"sqlmodel<1.0.0,>=0.0.16",
"colorlog<7.0.0,>=6.8.0",
"fakeredis<3.0.0,>=2.19.0",
"redis<6.0.0,>=5.0.1",
"beautifulsoup4<5.0.0,>=4.12.1",
"asyncmy<1.0.0,>=0.2.9",
"aiofiles<24.0.0,>=23.2.1",
"python-dotenv<2.0.0,>=1.0.0",
"alembic<2.0.0,>=1.13.0",
"black<25.0.0,>=24.1.1",
"rich<14.0.0,>=13.6.0",
"lxml<6.0.0,>=5.0.0",
"arko-wrapper<1.0.0,>=0.2.8",
"fastapi<1.0.0,>=0.110.0",
"uvicorn[standard]<1.0.0,>=0.28.0",
"sentry-sdk<2.0.0,>=1.31.0",
"GitPython<4.0.0,>=3.1.30",
"openpyxl<4.0.0,>=3.1.1",
"async-lru<3.0.0,>=2.0.4",
"thefuzz<1.0.0,>=0.22.1",
"cryptography<43.0.0,>=42.0.2",
"pillow<11.0.0,>=10.0.1",
"playwright==1.39.0",
"aiosqlite[sqlite]<1.0.0,>=0.20.0",
"simnet @ git+https://github.com/PaiGramTeam/SIMNet",
"psutil<6.0.0,>=5.9.6",
"starrail-damage-cal<2.0.0,>=1.6.1",
"starrailrelicscore @ git+https://github.com/PaiGramTeam/StarRailRelicScore",
]
requires-python = "<4.0,>=3.8"
readme = "README.md" readme = "README.md"
license = {text = "AGPL-3.0"}
[tool.poetry.dependencies] [project.optional-dependencies]
python = "^3.8" pyro = ["TgCrypto<2.0.0,>=1.2.5", "Pyrogram<3.0.0,>=2.0.102"]
httpx = "^0.25.0" test = ["pytest<8.0.0,>=7.3.0", "pytest-asyncio<1.0.0,>=0.23.2", "flaky<4.0.0,>=3.7.0"]
ujson = "^5.9.0"
Jinja2 = "^3.1.2"
python-telegram-bot = { version = "^20.7", extras = ["ext", "rate-limiter"] }
sqlmodel = "^0.0.16"
colorlog = "^6.8.0"
fakeredis = "^2.19.0"
redis = "^5.0.1"
beautifulsoup4 = "^4.12.1"
asyncmy = "^0.2.9"
aiofiles = "^23.2.1"
python-dotenv = "^1.0.0"
alembic = "^1.13.0"
black = "^24.1.1"
rich = "^13.6.0"
TgCrypto = { version = "^1.2.5", optional = true }
Pyrogram = { version = "^2.0.102", optional = true }
pytest = { version = "^7.3.0", optional = true }
pytest-asyncio = { version = "^0.23.2", optional = true }
flaky = { version = "^3.7.0", optional = true }
lxml = "^5.0.0"
arko-wrapper = "^0.2.8"
fastapi = "^0.110.0"
uvicorn = { extras = ["standard"], version = "^0.28.0" }
sentry-sdk = "^1.31.0"
GitPython = "^3.1.30"
openpyxl = "^3.1.1"
async-lru = "^2.0.4"
thefuzz = "^0.22.1"
cryptography = "^42.0.2"
pillow = "^10.0.1"
playwright = "1.39.0"
aiosqlite = { extras = ["sqlite"], version = "^0.20.0" }
simnet = { git = "https://github.com/PaiGramTeam/SIMNet" }
psutil = "^5.9.6"
starrail-damage-cal = "^1.4.2"
starrailrelicscore = {git = "https://github.com/PaiGramTeam/StarRailRelicScore"}
[tool.poetry.extras] [tool.pdm]
pyro = ["Pyrogram", "TgCrypto"] distribution = false
test = ["pytest", "pytest-asyncio", "flaky"]
sqlite = ["aiosqlite"]
all = ["pytest", "pytest-asyncio", "flaky", "Pyrogram", "TgCrypto", "aiosqlite"]
[build-system] [tool.pdm.build]
requires = ["poetry-core"] includes = []
build-backend = "poetry.core.masonry.api"
[tool.pdm.resolution.overrides]
httpx = "<1.0.0,>=0.25.0"
# pytest配置
[tool.pytest.ini_options] [tool.pytest.ini_options]
asyncio_mode = "auto" asyncio_mode = "auto"
log_cli = true log_cli = true

View File

@ -1,93 +1,104 @@
aiofiles==23.2.1 ; python_version >= "3.8" and python_version < "4.0" # This file is @generated by PDM.
aiolimiter==1.1.0 ; python_version >= "3.8" and python_version < "4.0" # Please do not edit it manually.
aiosqlite[sqlite]==0.20.0 ; python_version >= "3.8" and python_version < "4.0"
alembic==1.13.1 ; python_version >= "3.8" and python_version < "4.0" aiofiles==23.2.1
anyio==4.3.0 ; python_version >= "3.8" and python_version < "4.0" aiolimiter==1.1.0
apscheduler==3.10.4 ; python_version >= "3.8" and python_version < "4.0" aiosqlite==0.20.0
arko-wrapper==0.2.8 ; python_version >= "3.8" and python_version < "4.0" alembic==1.13.1
async-lru==2.0.4 ; python_version >= "3.8" and python_version < "4.0" anyio==4.4.0
async-timeout==4.0.3 ; python_version >= "3.8" and python_full_version < "3.11.3" apscheduler==3.10.4
asyncmy==0.2.9 ; python_version >= "3.8" and python_version < "4.0" arko-wrapper==0.2.8
backports-zoneinfo==0.2.1 ; python_version >= "3.8" and python_version < "3.9" async-lru==2.0.4
beautifulsoup4==4.12.3 ; python_version >= "3.8" and python_version < "4.0" async-timeout==4.0.3; python_full_version < "3.11.3"
black==24.3.0 ; python_version >= "3.8" and python_version < "4.0" asyncmy==0.2.9
cachetools==5.3.3 ; python_version >= "3.8" and python_version < "4.0" backports-zoneinfo==0.2.1; python_version < "3.9"
certifi==2024.2.2 ; python_version >= "3.8" and python_version < "4.0" beautifulsoup4==4.12.3
cffi==1.16.0 ; python_version >= "3.8" and python_version < "4.0" and platform_python_implementation != "PyPy" black==24.4.2
click==8.1.7 ; python_version >= "3.8" and python_version < "4.0" cachetools==5.3.3
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows") certifi==2024.6.2
colorlog==6.8.2 ; python_version >= "3.8" and python_version < "4.0" cffi==1.16.0; platform_python_implementation != "PyPy"
cryptography==42.0.5 ; python_version >= "3.8" and python_version < "4.0" click==8.1.7
et-xmlfile==1.1.0 ; python_version >= "3.8" and python_version < "4.0" colorama==0.4.6; sys_platform == "win32" or platform_system == "Windows"
exceptiongroup==1.2.0 ; python_version >= "3.8" and python_version < "3.11" colorlog==6.8.2
fakeredis==2.21.3 ; python_version >= "3.8" and python_version < "4.0" cryptography==42.0.7
fastapi==0.110.0 ; python_version >= "3.8" and python_version < "4.0" dnspython==2.6.1
flaky==3.8.1 ; python_version >= "3.8" and python_version < "4.0" email-validator==2.1.1
gitdb==4.0.11 ; python_version >= "3.8" and python_version < "4.0" et-xmlfile==1.1.0
gitpython==3.1.43 ; python_version >= "3.8" and python_version < "4.0" exceptiongroup==1.2.1; python_version < "3.11"
greenlet==3.0.0 ; python_version >= "3.8" and python_version < "4.0" fakeredis==2.23.2
h11==0.14.0 ; python_version >= "3.8" and python_version < "4.0" fastapi==0.111.0
httpcore==1.0.5 ; python_version >= "3.8" and python_version < "4.0" fastapi-cli==0.0.4
httptools==0.6.1 ; python_version >= "3.8" and python_version < "4.0" flaky==3.8.1
httpx==0.25.2 ; python_version >= "3.8" and python_version < "4.0" gitdb==4.0.11
idna==3.6 ; python_version >= "3.8" and python_version < "4.0" gitpython==3.1.43
importlib-metadata==7.1.0 ; python_version >= "3.8" and python_version < "3.9" greenlet==3.0.0
importlib-resources==6.4.0 ; python_version >= "3.8" and python_version < "3.9" h11==0.14.0
iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0" httpcore==1.0.5
jinja2==3.1.3 ; python_version >= "3.8" and python_version < "4.0" httptools==0.6.1
lxml==5.2.0 ; python_version >= "3.8" and python_version < "4.0" httpx==0.27.0
mako==1.3.2 ; python_version >= "3.8" and python_version < "4.0" idna==3.7
markdown-it-py==3.0.0 ; python_version >= "3.8" and python_version < "4.0" importlib-metadata==7.1.0; python_version < "3.9"
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0" importlib-resources==6.4.0; python_version < "3.9"
mdurl==0.1.2 ; python_version >= "3.8" and python_version < "4.0" iniconfig==2.0.0
msgspec==0.18.6 ; python_version >= "3.8" and python_version < "4.0" jinja2==3.1.4
mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "4.0" lxml==5.2.2
openpyxl==3.1.2 ; python_version >= "3.8" and python_version < "4.0" mako==1.3.5
packaging==24.0 ; python_version >= "3.8" and python_version < "4.0" markdown-it-py==3.0.0
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "4.0" markupsafe==2.1.5
pillow==10.2.0 ; python_version >= "3.8" and python_version < "4.0" mdurl==0.1.2
platformdirs==4.2.0 ; python_version >= "3.8" and python_version < "4.0" msgspec==0.18.6
playwright==1.39.0 ; python_version >= "3.8" and python_version < "4.0" mypy-extensions==1.0.0
pluggy==1.4.0 ; python_version >= "3.8" and python_version < "4.0" openpyxl==3.1.3
psutil==5.9.8 ; python_version >= "3.8" and python_version < "4.0" orjson==3.10.3
pyaes==1.6.1 ; python_version >= "3.8" and python_version < "4.0" packaging==24.0
pycparser==2.22 ; python_version >= "3.8" and python_version < "4.0" and platform_python_implementation != "PyPy" pathspec==0.12.1
pydantic==1.10.14 ; python_version >= "3.8" and python_version < "4.0" pillow==10.3.0
pyee==11.0.1 ; python_version >= "3.8" and python_version < "4.0" platformdirs==4.2.2
pygments==2.17.2 ; python_version >= "3.8" and python_version < "4.0" playwright==1.39.0
pyrogram==2.0.106 ; python_version >= "3.8" and python_version < "4.0" pluggy==1.5.0
pysocks==1.7.1 ; python_version >= "3.8" and python_version < "4.0" psutil==5.9.8
pytest-asyncio==0.23.6 ; python_version >= "3.8" and python_version < "4.0" pyaes==1.6.1
pytest==7.4.4 ; python_version >= "3.8" and python_version < "4.0" pycparser==2.22; platform_python_implementation != "PyPy"
python-dotenv==1.0.1 ; python_version >= "3.8" and python_version < "4.0" pydantic==1.10.15
python-telegram-bot[ext,rate-limiter]==20.7 ; python_version >= "3.8" and python_version < "4.0" pyee==11.0.1
pytz==2024.1 ; python_version >= "3.8" and python_version < "4.0" pygments==2.18.0
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "4.0" pyrogram==2.0.106
rapidfuzz==3.7.0 ; python_version >= "3.8" and python_version < "4.0" pysocks==1.7.1
redis==5.0.3 ; python_version >= "3.8" and python_version < "4.0" pytest==7.4.4
rich==13.7.1 ; python_version >= "3.8" and python_version < "4.0" pytest-asyncio==0.23.7
sentry-sdk==1.44.0 ; python_version >= "3.8" and python_version < "4.0" python-dotenv==1.0.1
simnet @ git+https://github.com/PaiGramTeam/SIMNet@main ; python_version >= "3.8" and python_version < "4.0" python-multipart==0.0.9
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0" python-telegram-bot==20.8
smmap==5.0.1 ; python_version >= "3.8" and python_version < "4.0" pytz==2024.1
sniffio==1.3.1 ; python_version >= "3.8" and python_version < "4.0" pyyaml==6.0.1
sortedcontainers==2.4.0 ; python_version >= "3.8" and python_version < "4.0" rapidfuzz==3.9.3
soupsieve==2.5 ; python_version >= "3.8" and python_version < "4.0" redis==5.0.4
sqlalchemy==2.0.29 ; python_version >= "3.8" and python_version < "4.0" rich==13.7.1
sqlmodel==0.0.16 ; python_version >= "3.8" and python_version < "4.0" sentry-sdk==1.45.0
starlette==0.36.3 ; python_version >= "3.8" and python_version < "4.0" shellingham==1.5.4
starrail-damage-cal==1.5.3 ; python_version >= "3.8" and python_version < "4.0" simnet @ git+https://github.com/PaiGramTeam/SIMNet@5c02e769820f005a9b81ca954bd454b521acca4b
tgcrypto==1.2.5 ; python_version >= "3.8" and python_version < "4.0" six==1.16.0
thefuzz==0.22.1 ; python_version >= "3.8" and python_version < "4.0" smmap==5.0.1
tomli==2.0.1 ; python_version >= "3.8" and python_version < "3.11" sniffio==1.3.1
tornado==6.3.3 ; python_version >= "3.8" and python_version < "4.0" sortedcontainers==2.4.0
typing-extensions==4.10.0 ; python_version >= "3.8" and python_version < "4.0" soupsieve==2.5
tzdata==2024.1 ; python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows" sqlalchemy==2.0.30
tzlocal==5.2 ; python_version >= "3.8" and python_version < "4.0" sqlmodel==0.0.19
ujson==5.9.0 ; python_version >= "3.8" and python_version < "4.0" starlette==0.37.2
urllib3==2.2.1 ; python_version >= "3.8" and python_version < "4.0" starrail-damage-cal==1.6.1
uvicorn[standard]==0.28.1 ; python_version >= "3.8" and python_version < "4.0" starrailrelicscore @ git+https://github.com/PaiGramTeam/StarRailRelicScore@5a3d6403041f626174d2bc607672ae502c944607
uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.8" and python_version < "4.0" tgcrypto==1.2.5
watchfiles==0.21.0 ; python_version >= "3.8" and python_version < "4.0" thefuzz==0.22.1
websockets==12.0 ; python_version >= "3.8" and python_version < "4.0" tomli==2.0.1; python_version < "3.11"
zipp==3.18.1 ; python_version >= "3.8" and python_version < "3.9" tornado==6.4
typer==0.12.3
typing-extensions==4.12.1
tzdata==2024.1; platform_system == "Windows"
tzlocal==5.2
ujson==5.10.0
urllib3==2.2.1; python_version >= "3.6"
uvicorn==0.30.1
uvloop==0.19.0; (sys_platform != "cygwin" and sys_platform != "win32") and platform_python_implementation != "PyPy"
watchfiles==0.22.0
websockets==12.0
zipp==3.19.1; python_version < "3.9"