cwyodmodules 0.3.65__py3-none-any.whl → 0.3.67__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.
- cwyodmodules/batch/utilities/helpers/env_helper.py +1 -1
- cwyodmodules/mgmt_config.py +41 -8
- {cwyodmodules-0.3.65.dist-info → cwyodmodules-0.3.67.dist-info}/METADATA +2 -2
- {cwyodmodules-0.3.65.dist-info → cwyodmodules-0.3.67.dist-info}/RECORD +7 -7
- {cwyodmodules-0.3.65.dist-info → cwyodmodules-0.3.67.dist-info}/WHEEL +0 -0
- {cwyodmodules-0.3.65.dist-info → cwyodmodules-0.3.67.dist-info}/licenses/LICENSE +0 -0
- {cwyodmodules-0.3.65.dist-info → cwyodmodules-0.3.67.dist-info}/top_level.txt +0 -0
@@ -26,7 +26,7 @@ class EnvHelper:
|
|
26
26
|
@logger.trace_function(log_execution=True, log_args=False, log_result=False)
|
27
27
|
def __load_config(self, **kwargs) -> None:
|
28
28
|
|
29
|
-
logger.info("Initializing EnvHelper")
|
29
|
+
logger.info("Initializing EnvHelper!")
|
30
30
|
logger.info("AZURE_CLIENT_ID: " + os.getenv("AZURE_CLIENT_ID"))
|
31
31
|
logger.info("key_vault_uri: " + os.getenv("key_vault_uri"))
|
32
32
|
logger.info("head_key_vault_uri: " + os.getenv("head_key_vault_uri"))
|
cwyodmodules/mgmt_config.py
CHANGED
@@ -29,6 +29,36 @@ from azpaddypy.mgmt.local_env_manager import create_local_env_manager
|
|
29
29
|
SERVICE_NAME = os.getenv("SERVICE_NAME", __name__)
|
30
30
|
SERVICE_VERSION = os.getenv("SERVICE_VERSION", "1.0.0")
|
31
31
|
|
32
|
+
def is_running_in_docker():
|
33
|
+
"""
|
34
|
+
Checks if the current process is running inside a Docker container.
|
35
|
+
|
36
|
+
Returns:
|
37
|
+
bool: True if running in Docker, False otherwise.
|
38
|
+
"""
|
39
|
+
# Method 1: Check for /.dockerenv file
|
40
|
+
if os.path.exists('/.dockerenv'):
|
41
|
+
return True
|
42
|
+
|
43
|
+
# Method 2: Check cgroup for "docker"
|
44
|
+
try:
|
45
|
+
with open('/proc/1/cgroup', 'rt') as f:
|
46
|
+
cgroup_content = f.read()
|
47
|
+
if 'docker' in cgroup_content or 'kubepods' in cgroup_content:
|
48
|
+
return True
|
49
|
+
except FileNotFoundError:
|
50
|
+
# /proc/1/cgroup does not exist, not a Linux-like environment
|
51
|
+
pass
|
52
|
+
except Exception:
|
53
|
+
# Handle other potential exceptions, e.g., permissions
|
54
|
+
pass
|
55
|
+
|
56
|
+
return False
|
57
|
+
|
58
|
+
running_in_docker = is_running_in_docker()
|
59
|
+
print("is_running_in_docker: " + str(running_in_docker))
|
60
|
+
|
61
|
+
|
32
62
|
# =============================================================================
|
33
63
|
# LOGGING CONFIGURATION
|
34
64
|
# =============================================================================
|
@@ -40,14 +70,16 @@ LOGGER_ENABLE_CONSOLE = os.getenv("LOGGER_ENABLE_CONSOLE", "true").lower() == "t
|
|
40
70
|
LOGGER_CONNECTION_STRING = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
|
41
71
|
|
42
72
|
# Local development settings
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
73
|
+
if running_in_docker:
|
74
|
+
LOCAL_SETTINGS = {}
|
75
|
+
else:
|
76
|
+
LOCAL_SETTINGS = {
|
77
|
+
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
|
78
|
+
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
|
79
|
+
"input_queue_connection__queueServiceUri": "UseDevelopmentStorage=true",
|
80
|
+
"AzureWebJobsStorage__accountName": "UseDevelopmentStorage=true",
|
81
|
+
"AzureWebJobsStorage__blobServiceUri": "UseDevelopmentStorage=true",
|
82
|
+
}
|
51
83
|
|
52
84
|
# Configure which Azure SDK components to instrument
|
53
85
|
LOGGER_INSTRUMENTATION_OPTIONS = {
|
@@ -198,6 +230,7 @@ logger.info(
|
|
198
230
|
"keyvault_secrets_enabled": KEYVAULT_ENABLE_SECRETS if KEYVAULT_URL else False,
|
199
231
|
"keyvault_keys_enabled": KEYVAULT_ENABLE_KEYS if KEYVAULT_URL else False,
|
200
232
|
"keyvault_certificates_enabled": KEYVAULT_ENABLE_CERTIFICATES if KEYVAULT_URL else False,
|
233
|
+
"running_in_docker": running_in_docker,
|
201
234
|
}
|
202
235
|
)
|
203
236
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cwyodmodules
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.67
|
4
4
|
Summary: Add your description here
|
5
5
|
Author-email: Patrik <patrikhartl@gmail.com>
|
6
6
|
Classifier: Operating System :: OS Independent
|
@@ -40,7 +40,7 @@ Requires-Dist: azure-search-documents==11.6.0b4
|
|
40
40
|
Requires-Dist: semantic-kernel==1.3.0
|
41
41
|
Requires-Dist: pydantic==2.7.4
|
42
42
|
Requires-Dist: pandas>=2.2.3
|
43
|
-
Requires-Dist: azpaddypy>=0.4.
|
43
|
+
Requires-Dist: azpaddypy>=0.4.04
|
44
44
|
Dynamic: license-file
|
45
45
|
|
46
46
|
# paddypy
|
@@ -1,5 +1,5 @@
|
|
1
1
|
cwyodmodules/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
2
|
-
cwyodmodules/mgmt_config.py,sha256=
|
2
|
+
cwyodmodules/mgmt_config.py,sha256=jK941eTQSCUk3j-tfXoHd-mDbVQil2K_qSdsXhW7Pd0,9366
|
3
3
|
cwyodmodules/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
cwyodmodules/api/chat_history.py,sha256=bVXFmhTHIfEiHv_nBrfizO-cQRHhKgrdcZ07OD1b0Tw,20683
|
5
5
|
cwyodmodules/batch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -37,7 +37,7 @@ cwyodmodules/batch/utilities/helpers/azure_postgres_helper_light_rag.py,sha256=M
|
|
37
37
|
cwyodmodules/batch/utilities/helpers/azure_search_helper.py,sha256=vIIMEck1wPg9oRlWweE2gSZ1nUYc_tmEe4QeFlsrwKk,11314
|
38
38
|
cwyodmodules/batch/utilities/helpers/document_chunking_helper.py,sha256=2MZOjW-fHXgYijP3m9O-nizOlk96Yg0axyxT0K6fTnM,725
|
39
39
|
cwyodmodules/batch/utilities/helpers/document_loading_helper.py,sha256=2HBEl3vW-_PKbX5pPntTC_R5eToTk2Qb-q3M4Mt6hCU,603
|
40
|
-
cwyodmodules/batch/utilities/helpers/env_helper.py,sha256=
|
40
|
+
cwyodmodules/batch/utilities/helpers/env_helper.py,sha256=6RWxAws-mD6djMrs2s1t7wdslUFIwzwiI8-3_JLauV4,15922
|
41
41
|
cwyodmodules/batch/utilities/helpers/lightrag_helper.py,sha256=7lb9JMm5IohsO73LWo5bWmlzWCGYNsx_fYl-aFdwATQ,3845
|
42
42
|
cwyodmodules/batch/utilities/helpers/llm_helper.py,sha256=lHLYrUidtaemmKrVbWoo7oIvwluUoPUk16U5lV-YIX8,8282
|
43
43
|
cwyodmodules/batch/utilities/helpers/orchestrator_helper.py,sha256=mCcZyMFG0otnw9gzWd-PYocHmDdFDVg-RT9oDPiDZPk,897
|
@@ -109,8 +109,8 @@ cwyodmodules/graphrag/query/generate.py,sha256=BZiB6iw7PkIovw-CyYFogMHnDxK0Qu_4u
|
|
109
109
|
cwyodmodules/graphrag/query/graph_search.py,sha256=95h3ecSWx4864XgKABtG0fh3Nk8HkqJVzoCrO8daJ-Y,7724
|
110
110
|
cwyodmodules/graphrag/query/types.py,sha256=1Iq1dp4I4a56_cuFjOZ0NTgd0A2_MpVFznp_czgt6cI,617
|
111
111
|
cwyodmodules/graphrag/query/vector_search.py,sha256=9Gwu9LPjtoAYUU8WKqCvbCHAIg3dpk71reoYd1scLnQ,1807
|
112
|
-
cwyodmodules-0.3.
|
113
|
-
cwyodmodules-0.3.
|
114
|
-
cwyodmodules-0.3.
|
115
|
-
cwyodmodules-0.3.
|
116
|
-
cwyodmodules-0.3.
|
112
|
+
cwyodmodules-0.3.67.dist-info/licenses/LICENSE,sha256=UqBDTipijsSW2ZSOXyTZnMsXmLoEHTgNEM0tL4g-Sso,1150
|
113
|
+
cwyodmodules-0.3.67.dist-info/METADATA,sha256=p79esQsPW12FLe0Qkz06AUQ88fPnNobxh2vrY30DT-s,2003
|
114
|
+
cwyodmodules-0.3.67.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
115
|
+
cwyodmodules-0.3.67.dist-info/top_level.txt,sha256=99RENLbkdRX-qpJvsxZ5AfmTL5s6shSaKOWYpz1vwzg,13
|
116
|
+
cwyodmodules-0.3.67.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|