-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
116 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
import toml | ||
|
||
os.chdir(str(Path(__file__).parent.parent.absolute().resolve(strict=True))) | ||
with open(r"pyproject.toml", "r", encoding="utf-8") as fp: | ||
pyproj_toml = toml.load(fp) | ||
|
||
except_groups = ( | ||
pyproj_toml["tool"]["pdm"]["dev-dependencies"] | ||
| pyproj_toml["project"]["optional-dependencies"] | ||
) | ||
|
||
|
||
def get_nega_groups(group: str | None = None) -> str: | ||
groups = except_groups.copy() | ||
if group is not None: | ||
groups.pop(group) | ||
return ",".join(groups) | ||
|
||
|
||
def main() -> None: | ||
ret = os.system(f"pdm export -o requirements.txt --without {get_nega_groups()}") | ||
if ret == 0: | ||
print("已刷新项目的 requirements.txt") | ||
else: | ||
print("未能完成刷新项目的 requirements.txt 的任务") | ||
|
||
ret = os.system( | ||
f"pdm export -o tests/requirements.txt --without {get_nega_groups('test')}" | ||
) | ||
if ret == 0: | ||
print("已刷新项目测试的 requirements.txt") | ||
else: | ||
print("未能完成刷新项目测试的 requirements.txt 的任务") | ||
|
||
ret = os.system( | ||
f"pdm export -o docs/requirements.txt --without {get_nega_groups('docs')}" | ||
) | ||
if ret == 0: | ||
print("已刷新文档构建的 requirements.txt") | ||
else: | ||
print("未能完成刷新文档构建的 requirements.txt 的任务") | ||
|
||
ret = os.system( | ||
f"pdm export -o onebot_requirements.txt --without {get_nega_groups('onebot')}" | ||
) | ||
if ret == 0: | ||
print("已刷新 protocols.onebot 的 requirements.txt") | ||
else: | ||
print("未能完成刷新 protocols.onebot 的 requirements.txt 的任务") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This file is @generated by PDM. | ||
# Please do not edit it manually. | ||
|
||
beartype==0.19.0 \ | ||
--hash=sha256:33b2694eda0daf052eb2aff623ed9a8a586703bbf0a90bbc475a83bbf427f699 \ | ||
--hash=sha256:de42dfc1ba5c3710fde6c3002e3bd2cad236ed4d2aabe876345ab0b4234a6573 | ||
better-exceptions==0.3.3 \ | ||
--hash=sha256:9c70b1c61d5a179b84cd2c9d62c3324b667d74286207343645ed4306fdaad976 \ | ||
--hash=sha256:e4e6bc18444d5f04e6e894b10381e5e921d3d544240418162c7db57e9eb3453b | ||
colorama==0.4.6; sys_platform == "win32" or platform_system == "Windows" \ | ||
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ | ||
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 | ||
colorlog==6.8.2 \ | ||
--hash=sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44 \ | ||
--hash=sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33 | ||
exceptiongroup==1.2.2; python_version < "3.11" \ | ||
--hash=sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b \ | ||
--hash=sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc | ||
iniconfig==2.0.0 \ | ||
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \ | ||
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 | ||
markdown-it-py==3.0.0 \ | ||
--hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ | ||
--hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb | ||
mdurl==0.1.2 \ | ||
--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ | ||
--hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba | ||
packaging==24.1 \ | ||
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \ | ||
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124 | ||
pluggy==1.5.0 \ | ||
--hash=sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1 \ | ||
--hash=sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669 | ||
pygments==2.18.0 \ | ||
--hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \ | ||
--hash=sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a | ||
pytest==8.3.3 \ | ||
--hash=sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181 \ | ||
--hash=sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2 | ||
pytest-asyncio==0.24.0 \ | ||
--hash=sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b \ | ||
--hash=sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276 | ||
rich==13.9.2 \ | ||
--hash=sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c \ | ||
--hash=sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1 | ||
tomli==2.0.1; python_version < "3.11" \ | ||
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ | ||
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f | ||
typing-extensions==4.12.2 \ | ||
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ | ||
--hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 |