Skip to content

Commit

Permalink
[All] Minor updates to improve proj public infos.
Browse files Browse the repository at this point in the history
  • Loading branch information
aicorein committed Apr 18, 2024
1 parent 632dd58 commit afcb1af
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 25 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/mkdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Build the doc
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: |

- name: Build the doc
run: |
cd docs/ && pip install -r requirements.txt
make html && cd ..
- name: Commit doc changes
- name: Refresh changes and commit
run: |
git clone https://github.com/Meloland/melobot.git --branch gh-pages --single-branch gh-pages
mkdir tmp-files && cd gh-pages
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ __pycache__
*.bak
tests/private
dev

*/build
dist
.venv
.vscode
.mypy_cache
*/build
dist

.pypirc
.pdm-python
.pdm-build
.pdm.toml
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ main 分支可接受**不与未来 v3 预期目标冲突**的 bug 修复与功

## ⚠️ 声明

1. melobot 是由热爱技术的开发者共同维护的开源项目。我们致力于提供一个可靠、高效的软件工具,以促进技术交流和创新。以下简称 melobot 项目为“本项目”。
2. 本项目提供的所有代码和文档均以“原样”提供,不提供任何形式的保证,包括但不限于适销性、特定用途的适用性或不侵权的保证。用户在使用本项目时,应自行承担所有风险。
3. 本项目严禁用于任何非法目的,包括但不限于侵犯版权、商标、商业机密或其他知识产权,以及违反任何适用的法律和法规。我们不对因非法使用本项目而产生的任何直接、间接、附带、特殊、惩罚性或后果性损害承担责任。
4. 在任何情况下,本项目的开发团队、维护者或贡献者均不对因使用或无法使用该项目而产生的任何损失或损害承担责任,包括但不限于数据丢失、业务中断、计算机故障或其他商业损害。
5. 所有向本项目贡献的代码、文档或其他资源,贡献者同意将其置于与项目相同的许可协议下。贡献者声明其贡献是原创的,或者他们有权使用和修改这些贡献,并且不会侵犯任何第三方的权益。
6. 本项目的开发团队保留随时修改本免责声明的权利,无需事先通知。用户应定期查看本免责声明,以了解任何更改。
melobot 是由热爱技术的开发者共同维护的开源项目。我们致力于提供一个可靠、高效的软件工具,以促进技术交流和创新。以下简称 melobot 项目为“本项目”。

本项目严禁用于任何非法目的,包括但不限于侵犯版权、商标、商业机密或其他知识产权,以及违反任何适用的法律和法规。我们不对因非法使用本项目而产生的任何直接、间接、附带、特殊、惩罚性或后果性损害承担责任。

<!-- start elevator-pitch -->

Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

sys.path.insert(0, os.path.abspath("../../src/"))
import melobot
import melobot.meta

_need_ret_fix_funcs = melobot.context.action.__all__

Expand All @@ -19,7 +20,7 @@
project = "MeloBot"
author = "contributors of this doc"
copyright = f"{datetime.date.today().year}, {author}"
release = "2.5.13"
release = melobot.meta.MetaInfo.VER

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
34 changes: 29 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[project]
name = "melobot"
version = "2.5.13"
description = "A qq bot development framework with friendly APIs, session control and plugin-supported."
dynamic = ["version"]
description = "A bot development framework with friendly APIs, session control and plugin-supported."
authors = [
{name = "aicorein", email = "[email protected]"},
]
maintainers = [
{name = "aicorein", email = "[email protected]"}
]
dependencies = [
"uvloop>=0.17.0; platform_system!=\"Windows\"",
"winloop>=0.1.2; platform_system==\"Windows\"",
"uvloop>=0.17.0; os_name != 'nt'",
"winloop>=0.1.2; os_name == 'nt'",
"websockets>=10.4",
"better-exceptions==0.3.3",
"rich>=13.7.1",
Expand All @@ -17,10 +20,29 @@ dependencies = [
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "AGPL3"}
license = { text = "BSD"}
keywords = ["qq", "qq bot", "onebot", "bot framework", "asyncio", "coroutine", "concurrency"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules"
]


[project.urls]
Homepage = "https://github.com/Meloland/melobot"
Documentation = "https://docs.melobot.org"
Repository = "https://github.com/Meloland/melobot.git"
Issues = "https://github.com/Meloland/melobot/issues"

[build-system]
requires = ["pdm-backend"]
Expand All @@ -41,6 +63,8 @@ line_length = 88

[tool.pdm]
distribution = true
version = { source = "file", path = "src/melobot/meta.py" }

[tool.pdm.scripts]
isort = {shell = "isort src/melobot"}
format = {shell = "black src/melobot"}
Expand Down
6 changes: 4 additions & 2 deletions src/melobot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""MeloBot 是插件化管理、基于异步会话机制的 qq 机器人开发框架
"""MeloBot 是插件化管理、基于异步会话机制的机器人开发框架
项目源码和文档,请参考:https://github.com/aicorein/melobot
v2 版本目前仅适用于构建与 OneBot 实现对接的机器人服务。
项目源码和文档,请参考:https://github.com/Meloland/melobot
"""

from .base import LogicMode, PriorLevel, SessionRule, User, lock, this_dir, timelimit
Expand Down
2 changes: 1 addition & 1 deletion src/melobot/bot/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
if TYPE_CHECKING:
from ..plugin.ipc import ShareObject

if MetaInfo.PLATFORM not in ("win32", "cygwin", "cli"):
if MetaInfo.OS_NAME != 'nt':
import uvloop

asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
Expand Down
15 changes: 12 additions & 3 deletions src/melobot/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def __call__(self, *args: Any, **kwargs: Any) -> Any:
return super().__call__(*args, **kwargs)


__version__ = "2.5.14"


class MetaInfo(metaclass=ReadOnly):
"""元信息类
Expand All @@ -41,7 +44,7 @@ class MetaInfo(metaclass=ReadOnly):
一般无需手动实例化该类,多数情况会直接使用本类的属性,或将本类用作类型注解。
"""

VER: str = "2.5.13"
VER: str = __version__
"""melobot 版本
:meta hide-value:
Expand All @@ -54,14 +57,14 @@ class MetaInfo(metaclass=ReadOnly):
"""

PROJ_DESC: str = (
"A qq bot development framework with friendly APIs, session control and plugin-supported."
"A bot development framework with friendly APIs, session control and plugin-supported."
)
"""melobot 项目描述
:meta hide-value:
"""

PROJ_SRC: str = "https://github.com/aicorein/melobot"
PROJ_SRC: str = "https://github.com/Meloland/melobot"
"""melobot 项目地址
:meta hide-value:
Expand All @@ -73,6 +76,12 @@ class MetaInfo(metaclass=ReadOnly):
:meta hide-value:
"""

OS_NAME: str = os.name
"""当前系统名称
:meta hide-value:
"""

PLATFORM: str = sys.platform
"""当前系统平台
Expand Down

0 comments on commit afcb1af

Please sign in to comment.