Skip to content

Commit 6ccbc8a

Browse files
authored
feat(dependencies): update greenlet to version 3.3.0 and adjust Python version compatibility (#145)
1 parent d9ce140 commit 6ccbc8a

File tree

3 files changed

+88
-78
lines changed

3 files changed

+88
-78
lines changed

runtime/datamate-python/README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Label Studio Adapter (DataMate)
1+
# DataMate Python Service (DataMate)
22

3-
这是 DataMate 的 Label Studio Adapter 服务,负责将 DataMate 的项目与 Label Studio 同步并提供对外的 HTTP API(基于 FastAPI)
3+
这是 DataMate 的 Python 服务,负责DataMate的数据合成、数据标注、数据评估等功能
44

55
## 简要说明
66

@@ -11,19 +11,30 @@
1111

1212
## 快速开始(开发)
1313

14-
1. 克隆仓库并进入项目目录
15-
2. 创建并激活虚拟环境:
14+
### 前置条件
1615

16+
- Python 3.11+
17+
- poetry 包管理器
18+
19+
1. 克隆仓库
20+
```bash
21+
git clone [email protected]:ModelEngine-Group/DataMate.git
22+
```
23+
2. 进入项目目录
24+
```bash
25+
cd runtime/datamate-python
26+
```
27+
28+
3. 安装依赖
29+
由于项目使用poetry管理依赖,你可以使用以下命令安装::
1730
```bash
18-
python -m venv .venv
19-
source .venv/bin/activate
31+
poetry install
2032
```
2133

2234
3. 安装依赖
2335
由于项目使用poetry管理依赖,你可以使用以下命令安装:
2436

2537
```bash
26-
pip install poetry
2738
poetry install
2839
```
2940
或者直接使用pip安装(如果poetry不可用):
@@ -51,7 +62,11 @@ alembic upgrade head
5162
- 本地开发(默认 host/port,自动重载):
5263

5364
```bash
54-
uvicorn app.main:app --reload
65+
set -a && source .env && set +a && poetry run uvicorn app.main:app --port 18000 --reload
66+
```
67+
或者
68+
```bash
69+
poetry run python -m app.main
5570
```
5671

5772
- 指定主机与端口并打开调试日志:
@@ -83,6 +98,14 @@ HOST=0.0.0.0 PORT=8000 uvicorn app.main:app --reload
8398
- Swagger UI: http://127.0.0.1:8000/docs
8499
- ReDoc: http://127.0.0.1:8000/redoc (推荐使用)
85100

101+
## 开发新功能
102+
- 安装开发依赖:
103+
104+
```bash
105+
poetry add xxx
106+
```
107+
108+
86109
## 使用(简要)
87110

88111
- 所有 API 路径以 `/api` 前缀注册(见 `app/main.py``app.include_router(api_router, prefix="/api")`)。

0 commit comments

Comments
 (0)