-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from wangxinbiao/main
retrieve files from Minio for data processing
- Loading branch information
Showing
24 changed files
with
1,710 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<mxfile host="Electron" modified="2023-11-02T10:49:05.695Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="MtKcBN_l9eNnbYWFwm7D" version="21.2.8" type="device"> | ||
<diagram name="第 1 页" id="loeKpyqY9KO9q6GEpTu8"> | ||
<mxGraphModel dx="1026" dy="1843" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0" /> | ||
<mxCell id="1" parent="0" /> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-1" value="<font style="font-size: 18px;">数据处理HTTP服务</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;strokeColor=none;fontColor=#ffffff;" parent="1" vertex="1"> | ||
<mxGeometry x="9" y="-170" width="810" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-23" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dce6f2;strokeColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="120" y="-120" width="700" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-24" value="<font color="#ffffff" style="font-size: 18px;">Controller</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;strokeColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="9" y="-120" width="100" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-25" value="<font style="font-size: 18px;">Service</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;fontColor=#FFFFFF;strokeColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="9" y="-55" width="100" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-26" value="<font style="font-size: 18px;">Handle</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;fontColor=#FFFFFF;strokeColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="9" y="10" width="100" height="115" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-27" value="<font style="font-size: 18px;">Transform</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;fontColor=#FFFFFF;strokeColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="9" y="130" width="100" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="iNnB15NnGvmIqP9MPX9o-29" value="<font style="font-size: 18px;">基础类</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;fontColor=#ffffff;strokeColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="9" y="197" width="100" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dce6f2;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="120" y="-55" width="700" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-5" value="<font style="font-size: 18px;">minio_process</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a20025;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="126" y="-50" width="208" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-6" value="<font color="#ffffff" style="font-size: 18px;">text_clean_for_minio</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#5b9bd5;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="127" y="-116" width="689" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-7" value="<font style="font-size: 18px;">database_process</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a20025;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="339.5" y="-50" width="239" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-8" value="<span style="font-size: 18px;">web_api_process</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a20025;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="584" y="-50" width="229" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-9" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dce6f2;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="120" y="10" width="700" height="115" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-10" value="<span style="font-size: 18px;">json</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="126" y="16" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-11" value="<span style="font-size: 18px;">csv</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="126" y="70" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-12" value="<span style="font-size: 18px;">txt</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="265" y="16" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-13" value="<span style="font-size: 18px;">pdf</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="265" y="70" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-14" value="<span style="font-size: 18px;">doc</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="403" y="16" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-15" value="<span style="font-size: 18px;">markdown</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="403" y="70" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-16" value="<span style="font-size: 18px;">html</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="541" y="16" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-17" value="<span style="font-size: 18px;">ppt</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="541" y="70" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-18" value="<span style="font-size: 18px;">excel</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="679" y="16" width="135" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-19" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dce6f2;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="120" y="130" width="700" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-20" value="<font style="font-size: 18px;">text</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#008a00;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="126" y="135" width="225" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-21" value="<span style="font-size: 18px;">image</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#008a00;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="357.5" y="135" width="225" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-22" value="<span style="font-size: 18px;">table</span>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#008a00;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="589" y="135" width="225" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-23" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dce6f2;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="120" y="197" width="700" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-24" value="<font style="font-size: 18px;">utils</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1ba1e2;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="126" y="202" width="225" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-25" value="<font style="font-size: 18px;">common</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1ba1e2;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="358" y="202" width="225" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-26" value="<font style="font-size: 18px;">OCR</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1ba1e2;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="588" y="202" width="225" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-27" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dce6f2;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="119.5" y="262" width="700" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-28" value="<font style="font-size: 18px;">Sanic</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6a00ff;fontColor=#ffffff;strokeColor=#3700CC;" vertex="1" parent="1"> | ||
<mxGeometry x="126" y="267" width="684" height="50" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6DU0XRBK3AAMFuq2KatI-29" value="<font style="font-size: 18px;">Web框架</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#4472c4;fontColor=#ffffff;strokeColor=none;" vertex="1" parent="1"> | ||
<mxGeometry x="9" y="262" width="100" height="60" as="geometry" /> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
# python | ||
__pycache__ | ||
.ipynb_checkpoints | ||
|
||
mock_data | ||
|
||
log |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
# Data Process | ||
The current documentation is only available in Chinese. Please refer to the content in .zh.md for specific details. |
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,30 @@ | ||
# Data Process | ||
|
||
## 当前版本主要功能 | ||
Data Process用于做数据处理,通MinIO、数据库、Web API等方式获取数据,数据类型包括一下几种: | ||
- txt | ||
- json | ||
- doc | ||
- html | ||
- excel | ||
- csv | ||
- markdown | ||
- ppt | ||
|
||
### 当前文本类型处理 | ||
数据处理的过程包括:异常数据清洗、过滤、去重、去隐私。 | ||
|
||
## 设计 | ||
![设计](../assets/data_process.drawio.png) | ||
|
||
## 本地开发 | ||
### 软件要求 | ||
本地搭建 data-process 环境之前请确保已经安装一下软件: | ||
- Python 3.10.x | ||
|
||
### 环境搭建 | ||
安装 requirements.txt 中的python依赖包 | ||
|
||
### 运行 | ||
python data_manipulation/server.py文件 |
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,21 @@ | ||
# Copyright 2023 KubeAGI. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import os | ||
|
||
minio_access_key = os.getenv('MINIO_ACCESSKEY', 'minioadmin') | ||
minio_secret_key = os.getenv('MINIO_SECRETKEY', 'minioadmin') | ||
minio_api_url = os.getenv('MINIO_API_URL', '192.168.90.31:9000') | ||
# 如果使用HTTP,将secure设置为False;如果使用HTTPS,将其设置为True | ||
minio_secure = os.getenv('MINIO_SECURE', False) |
Oops, something went wrong.