Skip to content

Commit

Permalink
opt
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT committed Sep 5, 2024
1 parent c9c7f72 commit 14698a2
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 58 deletions.
19 changes: 5 additions & 14 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
{
"recommendations": [
/**
* python插件
*/
"ms-python.black-formatter",
"donjayamanne.python-extension-pack",
"njpwerner.autodocstring",
// 数据库
"qwtel.sqlite-viewer",
/**
* 代码协作、标记
*/
// 代码风格统一

"editorconfig.editorconfig",
// 代码标记,比如TODO FIXME等

"gruntfuggly.todo-tree",
// 代码协作,git协作

"eamodio.gitlens",
// 其他

"PKief.material-icon-theme",
"davidanson.vscode-markdownlint",
"usernamehw.errorlens",
"tamasfe.even-better-toml",
// 单元测试
"vitest.explorer",

"littlefoxteam.vscode-python-test-adapter"
]
}
37 changes: 0 additions & 37 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
{
/** 文件夹材质 */
"workbench.iconTheme": "material-icon-theme",
/* 自定义图标关联 */
"material-icon-theme.folders.associations": {
"swanlab": "api",
"swanlog": "log",
"readme_files": "custom",
"run": "core",
"system": "core",
"data": "guard",
"unit": "test",
"converter": "log",
"tutils": "utils"
},
"material-icon-theme.files.associations": {
".env.mock": "Tune",
"requirements-dev.txt": "python-misc",
"requirements-media.txt": "python-misc"
},
/** 前端代码格式化部分,eslint和prettier */
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
// 每次保存的时候自动格式化
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.format.enable": true,
/** 后端代码格式化部分,python格式化 */
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
Expand Down Expand Up @@ -64,23 +43,7 @@
"iconColour": "#ffff"
}
},
/** i18n */
"i18n-ally.sortKeys": true,
"i18n-ally.keepFulfilled": true,
"i18n-ally.localeCountryMap": {
"en": "br", // show UK's flag instead of US's
"zh": "cn", // show Chinese flag for 'zh'
"ko": "ko" // show Korean flag for 'ko'
},
"i18n-ally.localesPaths": ["vue/src/i18n"],
"i18n-ally.keystyle": "nested", // 翻译路径格式,
"i18n-ally.namespace": true,
"i18n-ally.enabledParsers": ["json", "json5"],
"i18n-ally.sourceLanguage": "zh-CN", // 翻译源语言 是你翻译文件的名字
"i18n-ally.displayLanguage": "zh-CN", //显示语言

/** tailwind */
"css.customData": [".vscode/tailwind.json"],
/** python代码注释 */
"autoDocstring.docstringFormat": "numpy",

Expand Down
9 changes: 9 additions & 0 deletions docs/develop/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 代码整体介绍

HivisionIDPhoto将输出以下几个模块,方便使用者自行选择使用:

1. hivision python包,HivisionIDPhoto的核心且最小输出,提供一系列sdk接口
2. gradio web服务,提供一个简单的web服务demo,方便用户体验
3. hivision docker镜像,提供一个docker镜像,方便用户部署
4. hivision.exe,提供一个windows可执行文件,方便用户使用

1 change: 1 addition & 0 deletions hivision/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions hivision/creater/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
@DATE: 2024/9/5 16:45
@File: __init__.py
@IDE: pycharm
@Description:
创建证件照
"""

2 changes: 2 additions & 0 deletions requirements-app.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gradio>=4.37.1
fastapi
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
black
6 changes: 1 addition & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
opencv-python==4.7.0.72
onnx==1.14.0
opencv-python>=4.8.1.78
onnxruntime==1.15.0
numpy==1.24.3
gradio==3.38.0
fastapi
loguru
File renamed without changes.
4 changes: 2 additions & 2 deletions requests_api.py → script/api/requests_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import os


def base64_save(base64_image_data, save_path):
def base64_save(_base64_image_data, save_path):
# 解码 Base64 数据并保存为 PNG 文件
img_data = base64.b64decode(base64_image_data)
img_data = base64.b64decode(_base64_image_data)
with open(save_path, "wb") as file:
file.write(img_data)

Expand Down
9 changes: 9 additions & 0 deletions script/build_pypi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
@DATE: 2024/9/5 16:56
@File: build_pypi.py
@IDE: pycharm
@Description:
构建pypi包
"""

0 comments on commit 14698a2

Please sign in to comment.