aiecs 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

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 aiecs might be problematic. Click here for more details.

@@ -23,6 +23,21 @@ class DatabaseManager:
23
23
  self.connection_pool = None
24
24
  self._initialized = False
25
25
 
26
+ async def connect(self, min_size: int = 10, max_size: int = 20):
27
+ """Connect to database and initialize connection pool"""
28
+ if self._initialized:
29
+ logger.info("Database already connected")
30
+ return
31
+
32
+ try:
33
+ await self.init_connection_pool(min_size, max_size)
34
+ await self.init_database_schema()
35
+ self._initialized = True
36
+ logger.info("Database connection and schema initialization completed")
37
+ except Exception as e:
38
+ logger.error(f"Failed to connect to database: {e}")
39
+ raise
40
+
26
41
  async def init_connection_pool(self, min_size: int = 10, max_size: int = 20):
27
42
  """Initialize database connection pool"""
28
43
  try:
@@ -279,6 +294,12 @@ class DatabaseManager:
279
294
  logger.error(f"Database error during cleanup: {e}")
280
295
  return False
281
296
 
297
+ async def disconnect(self):
298
+ """Disconnect from database and close connection pool"""
299
+ await self.close()
300
+ self._initialized = False
301
+ logger.info("Database disconnected")
302
+
282
303
  async def close(self):
283
304
  """Close database connection pool"""
284
305
  if self.connection_pool:
@@ -298,16 +298,24 @@ class DependencyChecker:
298
298
  is_critical=False
299
299
  ))
300
300
 
301
- # Python packages
302
- python_packages = ["tika", "python-docx", "python-pptx", "openpyxl", "pdfplumber", "pytesseract", "PIL"]
303
- for pkg in python_packages:
304
- status = self.check_python_package(pkg)
301
+ # Python packages (package_name: import_name)
302
+ python_packages = {
303
+ "tika": "tika",
304
+ "python-docx": "docx", # Package name vs import name
305
+ "python-pptx": "pptx", # Package name vs import name
306
+ "openpyxl": "openpyxl",
307
+ "pdfplumber": "pdfplumber",
308
+ "pytesseract": "pytesseract",
309
+ "PIL": "PIL"
310
+ }
311
+ for pkg_name, import_name in python_packages.items():
312
+ status = self.check_python_package(import_name)
305
313
  python_deps.append(DependencyInfo(
306
- name=pkg,
314
+ name=pkg_name,
307
315
  status=status,
308
- description=f"Python package: {pkg}",
309
- install_command=f"pip install {pkg}",
310
- impact=f"{pkg} functionality will be unavailable",
316
+ description=f"Python package: {pkg_name}",
317
+ install_command=f"pip install {pkg_name}",
318
+ impact=f"{pkg_name} functionality will be unavailable",
311
319
  is_critical=True
312
320
  ))
313
321
 
@@ -348,16 +356,24 @@ class DependencyChecker:
348
356
  is_critical=False
349
357
  ))
350
358
 
351
- # Python packages
352
- python_packages = ["pandas", "numpy", "scipy", "scikit-learn", "statsmodels", "pyreadstat", "openpyxl"]
353
- for pkg in python_packages:
354
- status = self.check_python_package(pkg)
359
+ # Python packages (package_name: import_name)
360
+ python_packages = {
361
+ "pandas": "pandas",
362
+ "numpy": "numpy",
363
+ "scipy": "scipy",
364
+ "scikit-learn": "sklearn", # Package name vs import name
365
+ "statsmodels": "statsmodels",
366
+ "pyreadstat": "pyreadstat",
367
+ "openpyxl": "openpyxl"
368
+ }
369
+ for pkg_name, import_name in python_packages.items():
370
+ status = self.check_python_package(import_name)
355
371
  python_deps.append(DependencyInfo(
356
- name=pkg,
372
+ name=pkg_name,
357
373
  status=status,
358
- description=f"Python package: {pkg}",
359
- install_command=f"pip install {pkg}",
360
- impact=f"{pkg} functionality will be unavailable",
374
+ description=f"Python package: {pkg_name}",
375
+ install_command=f"pip install {pkg_name}",
376
+ impact=f"{pkg_name} functionality will be unavailable",
361
377
  is_critical=True
362
378
  ))
363
379
 
@@ -398,16 +414,26 @@ class DependencyChecker:
398
414
  is_critical=False
399
415
  ))
400
416
 
401
- # Python packages
402
- python_packages = ["jinja2", "matplotlib", "weasyprint", "bleach", "markdown", "pandas", "openpyxl", "python-docx", "python-pptx"]
403
- for pkg in python_packages:
404
- status = self.check_python_package(pkg)
417
+ # Python packages (package_name: import_name)
418
+ python_packages = {
419
+ "jinja2": "jinja2",
420
+ "matplotlib": "matplotlib",
421
+ "weasyprint": "weasyprint",
422
+ "bleach": "bleach",
423
+ "markdown": "markdown",
424
+ "pandas": "pandas",
425
+ "openpyxl": "openpyxl",
426
+ "python-docx": "docx", # Package name vs import name
427
+ "python-pptx": "pptx" # Package name vs import name
428
+ }
429
+ for pkg_name, import_name in python_packages.items():
430
+ status = self.check_python_package(import_name)
405
431
  python_deps.append(DependencyInfo(
406
- name=pkg,
432
+ name=pkg_name,
407
433
  status=status,
408
- description=f"Python package: {pkg}",
409
- install_command=f"pip install {pkg}",
410
- impact=f"{pkg} functionality will be unavailable",
434
+ description=f"Python package: {pkg_name}",
435
+ install_command=f"pip install {pkg_name}",
436
+ impact=f"{pkg_name} functionality will be unavailable",
411
437
  is_critical=True
412
438
  ))
413
439
 
@@ -448,16 +474,22 @@ class DependencyChecker:
448
474
  is_critical=False
449
475
  ))
450
476
 
451
- # Python packages
452
- python_packages = ["playwright", "scrapy", "httpx", "beautifulsoup4", "lxml"]
453
- for pkg in python_packages:
454
- status = self.check_python_package(pkg)
477
+ # Python packages (package_name: import_name)
478
+ python_packages = {
479
+ "playwright": "playwright",
480
+ "scrapy": "scrapy",
481
+ "httpx": "httpx",
482
+ "beautifulsoup4": "bs4", # Package name vs import name
483
+ "lxml": "lxml"
484
+ }
485
+ for pkg_name, import_name in python_packages.items():
486
+ status = self.check_python_package(import_name)
455
487
  python_deps.append(DependencyInfo(
456
- name=pkg,
488
+ name=pkg_name,
457
489
  status=status,
458
- description=f"Python package: {pkg}",
459
- install_command=f"pip install {pkg}",
460
- impact=f"{pkg} functionality will be unavailable",
490
+ description=f"Python package: {pkg_name}",
491
+ install_command=f"pip install {pkg_name}",
492
+ impact=f"{pkg_name} functionality will be unavailable",
461
493
  is_critical=True
462
494
  ))
463
495
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiecs
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: AI Execute Services - A middleware framework for AI-powered task execution and tool orchestration
5
5
  Author-email: AIECS Team <iretbl@gmail.com>
6
6
  License-Expression: MIT
@@ -31,7 +31,7 @@ aiecs/infrastructure/monitoring/executor_metrics.py,sha256=z8KJpq6tfCOEArfR-YJ4U
31
31
  aiecs/infrastructure/monitoring/structured_logger.py,sha256=iI895YHmPoaLdXjxHxd952PeTfGw6sh-yUDCnF8R7NY,1657
32
32
  aiecs/infrastructure/monitoring/tracing_manager.py,sha256=g4u6paNCZCYdGDEMZiv4bYv_GTG0s8oug-BJgFmkDp0,13449
33
33
  aiecs/infrastructure/persistence/__init__.py,sha256=7M0Z58QsSC6PJlZoLfBEiYQJh6t62P5QtwjiqBU0rEs,238
34
- aiecs/infrastructure/persistence/database_manager.py,sha256=ryagZj92O_6yok23zep-IXYzRAUVKSs9Dc5ZljYHKd0,11793
34
+ aiecs/infrastructure/persistence/database_manager.py,sha256=MRkMTALeeybzAfnfuJrOXbEchBCrMAgsz8YYyEUVMjI,12592
35
35
  aiecs/infrastructure/persistence/file_storage.py,sha256=d3tcV7Wg_-TGsbw3PY9ttNANntR5rIo7mBgE0CGXKZQ,23321
36
36
  aiecs/infrastructure/persistence/redis_client.py,sha256=CqPtYFP8-KHl3cJG9VHun9YFFSp3kCc3ZaZbW7GlqUU,5791
37
37
  aiecs/llm/__init__.py,sha256=EsOIu25eDnhEYKZDb1h_O9RxYIF7vaiORUZSUipzhsM,1084
@@ -45,7 +45,7 @@ aiecs/scripts/DEPENDENCY_SYSTEM_SUMMARY.md,sha256=K6V1Ugbxx-I-2w1GfS9y7wA4Spgb0m
45
45
  aiecs/scripts/README_DEPENDENCY_CHECKER.md,sha256=pE-ISxRycwUvn2EZeOzbtfSTVQPs2ui-_PGJAR50JRQ,6002
46
46
  aiecs/scripts/README_WEASEL_PATCH.md,sha256=h0e3Xy6FArLgjika3pRZRhZRbyuj6iLzTU-AhHkWE7M,3581
47
47
  aiecs/scripts/__init__.py,sha256=cVxQ5iqym520eDQSpV7B6hWolndCLMOVdvhC_D280PE,66
48
- aiecs/scripts/dependency_checker.py,sha256=VKvUAkua7IdskGBf5pipf9b0cet_2jZariecQzXnh-c,32647
48
+ aiecs/scripts/dependency_checker.py,sha256=1BpwodgHTGeMcr7rGH0vnAokPCMOJTczzAUSzGiTOS0,33836
49
49
  aiecs/scripts/dependency_fixer.py,sha256=0X8Eojf9N0yba2znEYrIwa7kWCKzZbV1OlnRwlrjq-Y,13961
50
50
  aiecs/scripts/download_nlp_data.py,sha256=P2ObKS2P7oGCQU257mByU8Ca4-UXpfH8ZrgOUYT12Ys,10985
51
51
  aiecs/scripts/fix_weasel_validator.py,sha256=w_s2VTIAgWPi-3VUXlrINBkLm9765QHdRf4g5RzBUug,4073
@@ -82,9 +82,9 @@ aiecs/utils/prompt_loader.py,sha256=cBS2bZXpYQOWSiOGkhwIzyy3_bETqwIblRi_9qQT9iQ,
82
82
  aiecs/utils/token_usage_repository.py,sha256=cSu2lQq7obNrjYBdtvqkCeWeApscHVcYa9JNgl3T3gU,10206
83
83
  aiecs/ws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
84
  aiecs/ws/socket_server.py,sha256=j_9idVY_rWlTsF51FgmuhWCWFVt7_gAHL8vNg3IxV5g,1476
85
- aiecs-1.0.0.dist-info/licenses/LICENSE,sha256=_1YRaIS0eZu1pv6xfz245UkU0i1Va2B841hv3OWRwqg,12494
86
- aiecs-1.0.0.dist-info/METADATA,sha256=Xze89EZqwZMCyqauhsOZb-Ss3RtLsUsV7vmyXsH87_A,16388
87
- aiecs-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
88
- aiecs-1.0.0.dist-info/entry_points.txt,sha256=0Bj2pSaZM-ADKTktbCQ0KQxRe0s8mQFKVsg3IGDJGqA,342
89
- aiecs-1.0.0.dist-info/top_level.txt,sha256=22IlUlOqh9Ni3jXlQNMNUqzbW8dcxXPeR_EQ-BJVcV8,6
90
- aiecs-1.0.0.dist-info/RECORD,,
85
+ aiecs-1.0.1.dist-info/licenses/LICENSE,sha256=_1YRaIS0eZu1pv6xfz245UkU0i1Va2B841hv3OWRwqg,12494
86
+ aiecs-1.0.1.dist-info/METADATA,sha256=tRQdJ7E_SGsY28EGauleXzQE5UAiZ1cebT7WLnjo1CI,16388
87
+ aiecs-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
88
+ aiecs-1.0.1.dist-info/entry_points.txt,sha256=0Bj2pSaZM-ADKTktbCQ0KQxRe0s8mQFKVsg3IGDJGqA,342
89
+ aiecs-1.0.1.dist-info/top_level.txt,sha256=22IlUlOqh9Ni3jXlQNMNUqzbW8dcxXPeR_EQ-BJVcV8,6
90
+ aiecs-1.0.1.dist-info/RECORD,,
File without changes