mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 02:50:48 +00:00
✨ Feature: 兼容 Pydantic v2 (#2544)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
11
scripts/build-api-docs.sh
Executable file
11
scripts/build-api-docs.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# cd to the root of the project
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
poetry run nb-autodoc nonebot \
|
||||
-s nonebot.plugins \
|
||||
-u nonebot.internal \
|
||||
-u nonebot.internal.*
|
||||
cp -r ./build/nonebot/* ./website/docs/api/
|
||||
yarn prettier
|
7
scripts/run-tests.sh
Executable file
7
scripts/run-tests.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# cd to the root of the tests
|
||||
cd "$(dirname "$0")/../tests"
|
||||
|
||||
# Run the tests
|
||||
pytest -n auto --cov-report xml $@
|
14
scripts/setup-envs.sh
Executable file
14
scripts/setup-envs.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#! /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
|
15
scripts/update-envs.sh
Executable file
15
scripts/update-envs.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#! /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
|
Reference in New Issue
Block a user