pro-craft 0.1.30__tar.gz → 0.1.36__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pro-craft might be problematic. Click here for more details.
- {pro_craft-0.1.30 → pro_craft-0.1.36}/PKG-INFO +2 -1
- {pro_craft-0.1.30 → pro_craft-0.1.36}/pyproject.toml +2 -2
- pro_craft-0.1.36/src/pro_craft/__init__.py +18 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/log.py +14 -14
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/prompt_craft/async_.py +304 -369
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/prompt_craft/sync.py +2 -3
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft.egg-info/PKG-INFO +2 -1
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft.egg-info/SOURCES.txt +1 -1
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft.egg-info/requires.txt +1 -0
- pro_craft-0.1.36/tests/test_11.py +42 -0
- pro_craft-0.1.30/src/pro_craft/__init__.py +0 -23
- pro_craft-0.1.30/src/pro_craft/prompt_craft/async_ copy.py +0 -985
- {pro_craft-0.1.30 → pro_craft-0.1.36}/README.md +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/setup.cfg +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/code_helper/coder.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/code_helper/designer.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/database.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/file_manager.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/prompt_craft/__init__.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/prompt_craft/new.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/server/mcp/__init__.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/server/mcp/prompt.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/server/router/__init__.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/server/router/prompt.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft/utils.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft.egg-info/dependency_links.txt +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/src/pro_craft.egg-info/top_level.txt +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/tests/test22.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/tests/test_coder.py +0 -0
- {pro_craft-0.1.30 → pro_craft-0.1.36}/tests/test_designer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pro-craft
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.36
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,6 +9,7 @@ Requires-Dist: anyio>=4.11.0
|
|
|
9
9
|
Requires-Dist: db-help>=0.2.2
|
|
10
10
|
Requires-Dist: fastapi>=0.119.0
|
|
11
11
|
Requires-Dist: llmada>=1.1.11
|
|
12
|
+
Requires-Dist: plotly>=6.3.1
|
|
12
13
|
Requires-Dist: pyyaml>=6.0.3
|
|
13
14
|
Requires-Dist: toml>=0.10.2
|
|
14
15
|
Requires-Dist: utils-tool==0.1.3
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pro-craft"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.36"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
|
-
dependencies = [ "aiomysql>=0.2.0", "anyio>=4.11.0", "db-help>=0.2.2", "fastapi>=0.119.0", "llmada>=1.1.11", "pyyaml>=6.0.3", "toml>=0.10.2", "utils-tool==0.1.3", "uvicorn>=0.38.0",]
|
|
7
|
+
dependencies = [ "aiomysql>=0.2.0", "anyio>=4.11.0", "db-help>=0.2.2", "fastapi>=0.119.0", "llmada>=1.1.11", "plotly>=6.3.1", "pyyaml>=6.0.3", "toml>=0.10.2", "utils-tool==0.1.3", "uvicorn>=0.38.0",]
|
|
8
8
|
|
|
9
9
|
[tool.setuptools.package-data]
|
|
10
10
|
pro_craft = [ "config.yaml",]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dotenv import load_dotenv, find_dotenv
|
|
5
|
+
|
|
6
|
+
dotenv_path = find_dotenv()
|
|
7
|
+
load_dotenv(".env", override=True)
|
|
8
|
+
|
|
9
|
+
from .log import Log
|
|
10
|
+
import logging
|
|
11
|
+
Log_ = Log(console_level = logging.WARNING, # 显示控制台的等级
|
|
12
|
+
log_file_name="app.log")
|
|
13
|
+
logger = Log_.logger
|
|
14
|
+
Log_.set_super_log(logger.critical) # 控制superlog 打印的等级 默认是最高级单独存储一个文件
|
|
15
|
+
super_log = Log_.super_log # 调试工具
|
|
16
|
+
inference_save_case = False
|
|
17
|
+
|
|
18
|
+
from .prompt_craft import AsyncIntel, Intel, IntelNew
|
|
@@ -12,6 +12,7 @@ class Log:
|
|
|
12
12
|
def __init__(self, console_level = logging.INFO, log_file_name="app.log"):
|
|
13
13
|
self.Console_LOG_LEVEL = console_level
|
|
14
14
|
self.log_file_name = log_file_name
|
|
15
|
+
os.makedirs("logs", exist_ok=False)
|
|
15
16
|
self.LOG_FILE_PATH = os.path.join("logs", log_file_name)
|
|
16
17
|
self.logger = self.get_logger()
|
|
17
18
|
self.super_log_level = self.logger.critical
|
|
@@ -60,23 +61,22 @@ class Log:
|
|
|
60
61
|
)
|
|
61
62
|
file_handler_debug.setLevel(logging.WARNING) # 文件中显示所有指定级别的日志
|
|
62
63
|
file_handler_debug.setFormatter(formatter)
|
|
63
|
-
|
|
64
|
+
|
|
65
|
+
file_handler_cri = RotatingFileHandler(
|
|
66
|
+
self.LOG_FILE_PATH.replace('.log','_slog.log'),
|
|
67
|
+
maxBytes=5 * 1024 * 1024, # 10 MB
|
|
68
|
+
backupCount=5,
|
|
69
|
+
encoding="utf-8",
|
|
70
|
+
)
|
|
71
|
+
file_handler_cri.setLevel(logging.CRITICAL) # 文件中显示所有指定级别的日志
|
|
72
|
+
file_handler_cri.setFormatter(formatter)
|
|
73
|
+
logger.addHandler(file_handler_cri)
|
|
64
74
|
return logger
|
|
65
75
|
|
|
66
76
|
def set_super_log(self,logger_info):
|
|
67
77
|
self.super_log_level = logger_info
|
|
68
78
|
|
|
69
|
-
def super_log(self,s, target: str = "target"):
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
COLOR_YELLOW = "\033[93m"
|
|
73
|
-
COLOR_BLUE = "\033[94m"
|
|
74
|
-
COLOR_RESET = "\033[0m" # 重置颜色
|
|
75
|
-
log_ = self.super_log_level
|
|
76
|
-
|
|
77
|
-
log_("\n"+f"{COLOR_GREEN}=={COLOR_RESET}" * 50)
|
|
78
|
-
log_(target + "\n "+"--" * 40)
|
|
79
|
-
log_(type(s))
|
|
80
|
-
log_(s)
|
|
81
|
-
log_("\n"+f"{COLOR_GREEN}=={COLOR_RESET}" * 50)
|
|
79
|
+
def super_log(self,s, target: str = "target",logger = None):
|
|
80
|
+
logger = logger or self.super_log_level
|
|
81
|
+
logger("\n" + "=="*25 + target +"=="*25 + f"\n type: {str(type(s))}" + f"\ncontent: {s}")
|
|
82
82
|
|