♻️ Change to git submodule

This commit is contained in:
xtaodada 2023-08-05 10:41:12 +08:00
parent 8138e68bca
commit b540527c68
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
68 changed files with 15 additions and 67 deletions

View File

@ -1,17 +1,22 @@
# GramCore # core 目录说明
## 1. Overview ## 关于 `Service`
telegram robot base core. 服务 `Service` 需定义在 `services` 文件夹下, 并继承 `core.service.Service`
## 2. Usage 每个 `Service` 都应包含 `start``stop` 方法, 且这两个方法都为异步方法
### 2.1 init project ```python
from core.service import Service
```bash
poetry install -v
```
### 2.2 usage class TestService(Service):
def __init__(self):
"""do something"""
TODO async def start(self, *args, **kwargs):
"""do something"""
async def stop(self, *args, **kwargs):
"""do something"""
```

View File

@ -1,22 +0,0 @@
# core 目录说明
## 关于 `Service`
服务 `Service` 需定义在 `services` 文件夹下, 并继承 `core.service.Service`
每个 `Service` 都应包含 `start``stop` 方法, 且这两个方法都为异步方法
```python
from core.service import Service
class TestService(Service):
def __init__(self):
"""do something"""
async def start(self, *args, **kwargs):
"""do something"""
async def stop(self, *args, **kwargs):
"""do something"""
```

View File

@ -1 +0,0 @@
__version__ = "0.1.0"

View File

@ -1,34 +0,0 @@
"""Run setuptools."""
from setuptools import find_packages, setup
from gram_core.version import __version__
def get_setup_kwargs():
"""Builds a dictionary of kwargs for the setup function"""
kwargs = dict(
script_name="setup.py",
name="gram_core",
version=__version__,
author="PaiGramTeam",
url="https://github.com/PaiGramTeam/GramCore",
keywords="telegram robot base core",
description="telegram robot base core.",
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tests*"]),
install_requires=[],
include_package_data=True,
python_requires=">=3.8",
)
return kwargs
def main(): # skipcq: PY-D0003
setup(**get_setup_kwargs())
if __name__ == "__main__":
main()