ws-bom-robot-app 0.0.14__tar.gz → 0.0.16__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.
Files changed (52) hide show
  1. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/PKG-INFO +28 -5
  2. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/README.md +25 -1
  3. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/setup.py +1 -1
  4. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/agent_lcel.py +3 -5
  5. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/main.py +6 -1
  6. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/tools/tool_manager.py +15 -2
  7. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/tools/utils.py +6 -3
  8. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/agent_utils.py +1 -1
  9. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/main.py +52 -3
  10. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/requirements.txt +3 -3
  11. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/task_manager.py +1 -1
  12. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app.egg-info/PKG-INFO +28 -5
  13. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app.egg-info/requires.txt +2 -3
  14. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/pyproject.toml +0 -0
  15. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/setup.cfg +0 -0
  16. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/__init__.py +0 -0
  17. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/auth.py +0 -0
  18. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/config.py +0 -0
  19. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/cron_manager.py +0 -0
  20. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/__init__.py +0 -0
  21. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/agent_description.py +0 -0
  22. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/agent_handler.py +0 -0
  23. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/api.py +0 -0
  24. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/defaut_prompt.py +0 -0
  25. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/models/__init__.py +0 -0
  26. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/models/api.py +0 -0
  27. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/models/base.py +0 -0
  28. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/models/kb.py +0 -0
  29. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/settings.py +0 -0
  30. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
  31. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
  32. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
  33. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/tools/tool_builder.py +0 -0
  34. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
  35. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/download.py +0 -0
  36. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/faiss_helper.py +0 -0
  37. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/kb.py +0 -0
  38. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/print.py +0 -0
  39. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
  40. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
  41. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/generator.py +0 -0
  42. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
  43. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/integration/base.py +0 -0
  44. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/integration/manager.py +0 -0
  45. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
  46. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
  47. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/loader/base.py +0 -0
  48. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +0 -0
  49. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app/util.py +0 -0
  50. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app.egg-info/SOURCES.txt +0 -0
  51. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
  52. {ws_bom_robot_app-0.0.14 → ws_bom_robot_app-0.0.16}/ws_bom_robot_app.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.14
3
+ Version: 0.0.16
4
4
  Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
5
  Home-page: https://github.com/websolutespa/bom
6
6
  Author: Websolute Spa
@@ -13,8 +13,8 @@ Description-Content-Type: text/markdown
13
13
  Requires-Dist: standardwebhooks==1.0.0
14
14
  Requires-Dist: apscheduler==3.11.0
15
15
  Requires-Dist: aiofiles==24.1.0
16
- Requires-Dist: pydantic==2.9.2
17
- Requires-Dist: pydantic-settings==2.6.0
16
+ Requires-Dist: pydantic==2.10.3
17
+ Requires-Dist: pydantic-settings==2.6.1
18
18
  Requires-Dist: fastapi[standard]==0.115.5
19
19
  Requires-Dist: langchain==0.3.9
20
20
  Requires-Dist: langchain-openai==0.2.10
@@ -23,7 +23,6 @@ Requires-Dist: langchain-core==0.3.21
23
23
  Requires-Dist: faiss-cpu==1.9.0
24
24
  Requires-Dist: python-magic==0.4.27
25
25
  Requires-Dist: opencv-python-headless==4.10.0.84
26
- Requires-Dist: jmespath==1.0.1
27
26
  Requires-Dist: unstructured[all-docs]==0.15.14
28
27
  Requires-Dist: langchain_unstructured==0.1.5
29
28
  Requires-Dist: html5lib==1.1
@@ -174,7 +173,31 @@ py -m pip install --upgrade -e .
174
173
  py -m pip show ws-bom-robot-app
175
174
  ```
176
175
 
177
- launch the debugger
176
+ code quality tools
177
+
178
+ ```pwsh
179
+ # .\src\robot
180
+ !py -m pip install -U scanreq prospector[with_everything]
181
+ ## unused requirements
182
+ scanreq -r requirements.txt -p ./ws_bom_robot_app
183
+ ## style/linting
184
+ prospector ./ws_bom_robot_app -t pylint -t pydocstyle
185
+ ## code quality/complexity
186
+ prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
187
+ ## security
188
+ prospector ./ws_bom_robot_app -t dodgy -t bandit
189
+ ## package
190
+ prospector ./ws_bom_robot_app -t pyroma
191
+ ```
192
+
193
+ lauch pytest
194
+
195
+ ```pwsh
196
+ !py -m pip install -U pytest pytest-asyncio pytest-mock pytest-cov
197
+ pytest --cov=ws_bom_robot_app --log-cli-level=info
198
+ ```
199
+
200
+ launch debugger
178
201
 
179
202
  ```pwsh
180
203
  streamlit run debugger.py --server.port 6002
@@ -142,7 +142,31 @@ py -m pip install --upgrade -e .
142
142
  py -m pip show ws-bom-robot-app
143
143
  ```
144
144
 
145
- launch the debugger
145
+ code quality tools
146
+
147
+ ```pwsh
148
+ # .\src\robot
149
+ !py -m pip install -U scanreq prospector[with_everything]
150
+ ## unused requirements
151
+ scanreq -r requirements.txt -p ./ws_bom_robot_app
152
+ ## style/linting
153
+ prospector ./ws_bom_robot_app -t pylint -t pydocstyle
154
+ ## code quality/complexity
155
+ prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
156
+ ## security
157
+ prospector ./ws_bom_robot_app -t dodgy -t bandit
158
+ ## package
159
+ prospector ./ws_bom_robot_app -t pyroma
160
+ ```
161
+
162
+ lauch pytest
163
+
164
+ ```pwsh
165
+ !py -m pip install -U pytest pytest-asyncio pytest-mock pytest-cov
166
+ pytest --cov=ws_bom_robot_app --log-cli-level=info
167
+ ```
168
+
169
+ launch debugger
146
170
 
147
171
  ```pwsh
148
172
  streamlit run debugger.py --server.port 6002
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="ws_bom_robot_app",
5
- version="0.0.14",
5
+ version="0.0.16",
6
6
  description="A FastAPI application serving ws bom/robot/llm platform ai.",
7
7
  long_description=open("README.md", encoding='utf-8').read(),
8
8
  long_description_content_type="text/markdown",
@@ -53,11 +53,9 @@ class AgentLcel:
53
53
  def __create_agent(self):
54
54
  agent: Any = (
55
55
  {
56
- "input": lambda x: x["input"],
57
- "agent_scratchpad": lambda x: format_to_openai_tool_messages(
58
- x["intermediate_steps"]
59
- ),
60
- "chat_history": lambda x: x["chat_history"],
56
+ "input": lambda x: x["input"],
57
+ "agent_scratchpad": lambda x: format_to_openai_tool_messages(x["intermediate_steps"]),
58
+ "chat_history": lambda x: x["chat_history"],
61
59
  }
62
60
  | RunnableLambda(self.__create_prompt)
63
61
  | self.__llm_with_tools
@@ -24,7 +24,12 @@ async def invoke(rq: InvokeRequest) -> str:
24
24
 
25
25
  async def __stream(rq: StreamRequest,formatted: bool = True) -> None:
26
26
  await rq.initialize()
27
- callbacks: List[AsyncCallbackHandler] = [AgentHandler(rq.thread_id) if formatted else RawAgentHandler()]
27
+ if formatted:
28
+ agent_handler = AgentHandler(rq.thread_id)
29
+ else:
30
+ agent_handler = RawAgentHandler()
31
+ os.environ["AGENT_HANDLER_FORMATTED"] = str(formatted)
32
+ callbacks: List[AsyncCallbackHandler] = [agent_handler]
28
33
  settings.init()
29
34
 
30
35
  #CREATION OF CHAT HISTORY FOR AGENT
@@ -1,4 +1,4 @@
1
- from typing import Optional, Type
1
+ from typing import Optional, Type, Callable
2
2
  from ws_bom_robot_app.llm.models.api import LlmAppTool
3
3
  from ws_bom_robot_app.llm.utils.faiss_helper import FaissHelper
4
4
  from ws_bom_robot_app.llm.tools.utils import getRandomWaitingMessage, translate_text
@@ -7,13 +7,26 @@ from pydantic import BaseModel, ConfigDict
7
7
  from langchain_community.utilities.dalle_image_generator import DallEAPIWrapper
8
8
 
9
9
  class ToolConfig(BaseModel):
10
- function: callable
10
+ function: Callable
11
11
  model: Optional[Type[BaseModel]] = None
12
12
  model_config = ConfigDict(
13
13
  arbitrary_types_allowed=True
14
14
  )
15
15
 
16
16
  class ToolManager:
17
+ """
18
+ ToolManager is responsible for managing various tools used in the application.
19
+
20
+ Attributes:
21
+ app_tool (LlmAppTool): The application tool configuration.
22
+ api_key (str): The API key for accessing external services.
23
+ callbacks (list): A list of callback functions to be executed.
24
+
25
+ Methods:
26
+ document_retriever(query: str): Asynchronously retrieves documents based on the query.
27
+ image_generator(query: str, language: str = "it"): Asynchronously generates an image based on the query.
28
+ get_coroutine(): Retrieves the coroutine function based on the tool configuration.
29
+ """
17
30
 
18
31
  def __init__(
19
32
  self,
@@ -1,20 +1,23 @@
1
- import random
1
+ import random, os
2
2
  from langchain_openai import ChatOpenAI
3
3
  from langchain_core.prompts import PromptTemplate
4
4
  from ws_bom_robot_app.llm.utils.print import printString
5
5
 
6
+ def __print_output(data: str) -> None:
7
+ printString(data) if os.environ.get("AGENT_HANDLER_FORMATTED") == str(True) else print(f"{data} ")
8
+
6
9
  def getRandomWaitingMessage(waiting_messages: str, traduction: bool = True) -> str:
7
10
  if not waiting_messages: return ""
8
11
  messages = [msg.strip() for msg in waiting_messages.split(";") if msg.strip()]
9
12
  if not messages: return ""
10
13
  chosen_message = random.choice(messages) + "\n"
11
14
  if not traduction:
12
- printString(chosen_message)
15
+ __print_output(chosen_message)
13
16
  return chosen_message
14
17
 
15
18
  async def translate_text(api_key, language, text: str, callbacks: list) -> str:
16
19
  if language == "it":
17
- printString(text)
20
+ __print_output(text)
18
21
  return
19
22
  llm = ChatOpenAI(api_key=api_key, model="gpt-3.5-turbo-0125", streaming=True)
20
23
  sys_message = """Il tuo compito è di tradurre il testo_da_tradure nella seguente lingua: \n\n lingua: {language}\n\n testo_da_tradure: {testo_da_tradure} \n\nTraduci il testo_da_tradure nella lingua {language} senza aggiungere altro:"""
@@ -5,7 +5,7 @@ from ws_bom_robot_app.llm.utils.faiss_helper import FaissHelper
5
5
 
6
6
  async def get_rules(rules: LlmRules, api_key:str, input: str) -> str:
7
7
  with HiddenPrints():
8
- if any([input=="",rules is None,rules.vector_db == "",not os.path.exists(rules.vector_db)]):
8
+ if any([input=="",rules is None,rules and rules.vector_db == "",rules and not os.path.exists(rules.vector_db)]):
9
9
  return ""
10
10
  rules_prompt = ""
11
11
  rules_doc = await FaissHelper.invoke(rules.vector_db,api_key,input,search_type="similarity_score_threshold", search_kwargs={"score_threshold": rules.threshold}) #type: ignore
@@ -38,14 +38,45 @@ async def openapi(authenticate: bool = Depends(authenticate)):
38
38
  @app.get("/api/health",tags=["diag"])
39
39
  def health():
40
40
  return {"status": "ok"}
41
-
41
+ def __get_size(bytes, suffix="B"):
42
+ """
43
+ Scale bytes to its proper format
44
+ e.g:
45
+ 1253656 => '1.20MB'
46
+ 1253656678 => '1.17GB'
47
+ """
48
+ factor = 1024
49
+ for unit in ["", "K", "M", "G", "T", "P"]:
50
+ if bytes < factor:
51
+ return f"{bytes:.2f}{unit}{suffix}"
52
+ bytes /= factor
53
+ def __get_disk_info():
54
+ import psutil
55
+ partitions = psutil.disk_partitions()
56
+ _disks:list = []
57
+ for partition in partitions:
58
+ device = partition.device
59
+ mountpoint = partition.mountpoint
60
+ fstype = partition.fstype
61
+ try:
62
+ usage = psutil.disk_usage(mountpoint)
63
+ except PermissionError:
64
+ continue
65
+ total = __get_size(usage.total)
66
+ used = __get_size(usage.used)
67
+ free = __get_size(usage.free)
68
+ percent = f"{usage.percent}%"
69
+ _disks.append({"device": device, "mountpoint": mountpoint, "fstype": fstype, "total": total, "used": used, "free": free, "percent": percent})
70
+ return _disks
42
71
  @app.get("/api/diag",tags=["diag"])
43
72
  def diag(authenticate: bool = Depends(authenticate)):
44
- import pkg_resources
73
+ import pkg_resources, psutil
45
74
  from ws_bom_robot_app.llm.vector_store.loader.base import Loader as wsll
46
75
  from ws_bom_robot_app.llm.vector_store.integration.manager import IntegrationManager as wsim
47
76
  from ws_bom_robot_app.llm.tools.tool_manager import ToolManager as wstm
48
77
  from ws_bom_robot_app.llm.agent_description import AgentDescriptor as wsad
78
+ svmem = psutil.virtual_memory()
79
+ swap = psutil.swap_memory()
49
80
  return {
50
81
  "status":"ok",
51
82
  "uptime": {'from':_uptime,'elapsed':str(datetime.datetime.now()-_uptime)},
@@ -56,9 +87,27 @@ def diag(authenticate: bool = Depends(authenticate)):
56
87
  "version": platform.version(),
57
88
  "type": platform.machine(),
58
89
  "processor": platform.processor(),
59
- "cpu": os.cpu_count(),
60
90
  "architecture": platform.architecture()
61
91
  },
92
+ "cpu": {
93
+ "physical_core": psutil.cpu_count(logical=False),
94
+ "total_core": psutil.cpu_count(logical=True),
95
+ "load": f"{psutil.cpu_percent(interval=1)}%"
96
+ },
97
+ "memory": {
98
+ "total": f"{__get_size(svmem.total)}",
99
+ "available": f"{__get_size(svmem.available)}",
100
+ "used": f"{__get_size(svmem.used)}",
101
+ "free": f"{__get_size(svmem.free)}",
102
+ "percent": f"{svmem.percent}%"
103
+ },
104
+ "swap": {
105
+ "total": f"{__get_size(swap.total)}",
106
+ "used": f"{__get_size(swap.used)}",
107
+ "free": f"{__get_size(swap.free)}",
108
+ "percent": f"{swap.percent}%"
109
+ },
110
+ "disk": __get_disk_info(),
62
111
  "sys": {
63
112
  "version": sys.version,
64
113
  "platform": sys.platform,
@@ -2,8 +2,8 @@
2
2
  standardwebhooks==1.0.0
3
3
  apscheduler==3.11.0
4
4
  aiofiles==24.1.0
5
- pydantic==2.9.2
6
- pydantic-settings==2.6.0
5
+ pydantic==2.10.3
6
+ pydantic-settings==2.6.1
7
7
  fastapi[standard]==0.115.5
8
8
 
9
9
  #framework
@@ -20,7 +20,7 @@ faiss-cpu==1.9.0
20
20
  #loaders
21
21
  python-magic==0.4.27
22
22
  opencv-python-headless==4.10.0.84 #docker specs
23
- jmespath==1.0.1 #tmp fix to pre-extract from native pkg due to issues with wheel
23
+ #jmespath==1.0.1 #tmp fix to pre-extract from native pkg due to issues with wheel
24
24
  unstructured[all-docs]==0.15.14
25
25
  langchain_unstructured==0.1.5
26
26
  html5lib==1.1 #beautifulsoup4 parser
@@ -133,7 +133,7 @@ class TaskStatistics(BaseModel):
133
133
 
134
134
  #region interface
135
135
  class TaskManagerStrategy(ABC):
136
- def __init__(self, max_concurrent_tasks: int = floor(config.robot_task_max_total_parallelism / config.runtime_options().number_of_workers)):
136
+ def __init__(self, max_concurrent_tasks: int = max(1,floor(config.robot_task_max_total_parallelism / config.runtime_options().number_of_workers))):
137
137
  self.max_concurrent_tasks = max_concurrent_tasks
138
138
  self.semaphore = asyncio.Semaphore(self.max_concurrent_tasks)
139
139
  self.running_tasks = dict[str, TaskEntry]()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.14
3
+ Version: 0.0.16
4
4
  Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
5
  Home-page: https://github.com/websolutespa/bom
6
6
  Author: Websolute Spa
@@ -13,8 +13,8 @@ Description-Content-Type: text/markdown
13
13
  Requires-Dist: standardwebhooks==1.0.0
14
14
  Requires-Dist: apscheduler==3.11.0
15
15
  Requires-Dist: aiofiles==24.1.0
16
- Requires-Dist: pydantic==2.9.2
17
- Requires-Dist: pydantic-settings==2.6.0
16
+ Requires-Dist: pydantic==2.10.3
17
+ Requires-Dist: pydantic-settings==2.6.1
18
18
  Requires-Dist: fastapi[standard]==0.115.5
19
19
  Requires-Dist: langchain==0.3.9
20
20
  Requires-Dist: langchain-openai==0.2.10
@@ -23,7 +23,6 @@ Requires-Dist: langchain-core==0.3.21
23
23
  Requires-Dist: faiss-cpu==1.9.0
24
24
  Requires-Dist: python-magic==0.4.27
25
25
  Requires-Dist: opencv-python-headless==4.10.0.84
26
- Requires-Dist: jmespath==1.0.1
27
26
  Requires-Dist: unstructured[all-docs]==0.15.14
28
27
  Requires-Dist: langchain_unstructured==0.1.5
29
28
  Requires-Dist: html5lib==1.1
@@ -174,7 +173,31 @@ py -m pip install --upgrade -e .
174
173
  py -m pip show ws-bom-robot-app
175
174
  ```
176
175
 
177
- launch the debugger
176
+ code quality tools
177
+
178
+ ```pwsh
179
+ # .\src\robot
180
+ !py -m pip install -U scanreq prospector[with_everything]
181
+ ## unused requirements
182
+ scanreq -r requirements.txt -p ./ws_bom_robot_app
183
+ ## style/linting
184
+ prospector ./ws_bom_robot_app -t pylint -t pydocstyle
185
+ ## code quality/complexity
186
+ prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
187
+ ## security
188
+ prospector ./ws_bom_robot_app -t dodgy -t bandit
189
+ ## package
190
+ prospector ./ws_bom_robot_app -t pyroma
191
+ ```
192
+
193
+ lauch pytest
194
+
195
+ ```pwsh
196
+ !py -m pip install -U pytest pytest-asyncio pytest-mock pytest-cov
197
+ pytest --cov=ws_bom_robot_app --log-cli-level=info
198
+ ```
199
+
200
+ launch debugger
178
201
 
179
202
  ```pwsh
180
203
  streamlit run debugger.py --server.port 6002
@@ -1,8 +1,8 @@
1
1
  standardwebhooks==1.0.0
2
2
  apscheduler==3.11.0
3
3
  aiofiles==24.1.0
4
- pydantic==2.9.2
5
- pydantic-settings==2.6.0
4
+ pydantic==2.10.3
5
+ pydantic-settings==2.6.1
6
6
  fastapi[standard]==0.115.5
7
7
  langchain==0.3.9
8
8
  langchain-openai==0.2.10
@@ -11,7 +11,6 @@ langchain-core==0.3.21
11
11
  faiss-cpu==1.9.0
12
12
  python-magic==0.4.27
13
13
  opencv-python-headless==4.10.0.84
14
- jmespath==1.0.1
15
14
  unstructured[all-docs]==0.15.14
16
15
  langchain_unstructured==0.1.5
17
16
  html5lib==1.1