🧑‍💻 Dev: 迁移使用 uv 管理项目依赖 (#3607)

This commit is contained in:
Ju4tCode
2025-07-31 21:52:24 +08:00
committed by GitHub
parent c45f956c3d
commit d6bc43057e
28 changed files with 3433 additions and 9944 deletions

View File

@ -1,9 +1,11 @@
#! /usr/bin/env bash
#!/usr/bin/env bash
set -e
# cd to the root of the project
cd "$(dirname "$0")/.."
poetry run nb-autodoc nonebot \
nb-autodoc nonebot \
-s nonebot.plugins \
-u nonebot.internal \
-u nonebot.internal.*

View File

@ -1,4 +1,4 @@
#! /usr/bin/env bash
#!/usr/bin/env bash
# cd to the root of the tests
cd "$(dirname "$0")/../tests"

View File

@ -1,14 +1,4 @@
#! /usr/bin/env bash
#!/usr/bin/env bash
# config poetry to install env in project
poetry config virtualenvs.in-project true
# setup dev environment
echo "Setting up dev environment"
poetry install --all-extras && poetry run pre-commit install && yarn install
# setup pydantic v2 test environment
for env in $(find ./envs/ -maxdepth 1 -mindepth 1 -type d -not -name test); do
echo "Setting up $env environment"
(cd $env && poetry install --no-root)
done
uv sync --all-extras && uv run pre-commit install && yarn install

View File

@ -1,15 +0,0 @@
#! /usr/bin/env bash
# update test env
echo "Updating test env..."
(cd ./envs/test/ && poetry update --lock)
# update dev env
echo "Updating dev env..."
poetry update
# update other envs
for env in $(find ./envs/ -maxdepth 1 -mindepth 1 -type d -not -name test); do
echo "Updating $env env..."
(cd $env && poetry update)
done