pyegeria 5.4.4.6__py3-none-any.whl → 5.4.4.7__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.
- commands/cat/debug_log.2025-09-15_19-06-37_086464.log.zip +0 -0
- md_processing/data/commands.json +54 -2
- md_processing/dr-egeria-outbox/DataStruct-DrE-2025-09-19-22-35-57.md +46 -0
- md_processing/md_commands/product_manager_commands.py +5 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +1 -1
- md_processing/md_processing_utils/debug_log +84 -0
- md_processing/md_processing_utils/extraction_utils.py +1 -1
- md_processing/md_processing_utils/generate_md_cmd_templates.py +1 -1
- md_processing/md_processing_utils/md_processing_constants.py +1 -1
- pyegeria/__init__.py +1 -1
- pyegeria/_client_new.py +2 -2
- pyegeria/_output_formats.py +2 -1
- pyegeria/{automated_curation_omvs.py → automated_curation.py} +673 -467
- pyegeria/data_designer.py +3 -3
- pyegeria/egeria_client.py +1 -1
- pyegeria/egeria_tech_client.py +1 -1
- pyegeria/mermaid_utilities.py +1 -1
- pyegeria/models.py +1 -1
- pyegeria/output_formatter.py +47 -7
- pyegeria/project_manager.py +1 -1
- pyegeria/reference_data.py +1 -1
- pyegeria/x_action_author_omvs.py +2 -2
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/METADATA +1 -1
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/RECORD +27 -25
- pyegeria/load_config_orig.py +0 -218
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.4.6.dist-info → pyegeria-5.4.4.7.dist-info}/entry_points.txt +0 -0
pyegeria/data_designer.py
CHANGED
@@ -280,7 +280,7 @@ class DataDesigner(Client2):
|
|
280
280
|
|
281
281
|
"""
|
282
282
|
url = f"{self.data_designer_root}/data-structures/from-template"
|
283
|
-
return await self.
|
283
|
+
return await self._async_create_elem_from_template(url, body)
|
284
284
|
|
285
285
|
@dynamic_catch
|
286
286
|
def create_data_structure_from_template(self, body: dict | TemplateRequestBody) -> str:
|
@@ -1697,7 +1697,7 @@ class DataDesigner(Client2):
|
|
1697
1697
|
|
1698
1698
|
url = f"{base_path(self, self.view_server)}/data-fields/from-template"
|
1699
1699
|
|
1700
|
-
return await self.
|
1700
|
+
return await self._async_create_elem_from_template(url, body)
|
1701
1701
|
|
1702
1702
|
@dynamic_catch
|
1703
1703
|
def create_data_field_from_template(self, body: dict | TemplateRequestBody) -> str:
|
@@ -2946,7 +2946,7 @@ class DataDesigner(Client2):
|
|
2946
2946
|
"""
|
2947
2947
|
|
2948
2948
|
url = f"{base_path(self, self.view_server)}/data-classes/from-template"
|
2949
|
-
return await self.
|
2949
|
+
return await self._async_create_elem_from_template(url, body)
|
2950
2950
|
|
2951
2951
|
@dynamic_catch
|
2952
2952
|
def create_data_class_from_template(self, body: dict | TemplateRequestBody) -> str:
|
pyegeria/egeria_client.py
CHANGED
@@ -16,7 +16,7 @@ from pyegeria.asset_catalog_omvs import AssetCatalog
|
|
16
16
|
# from pyegeria.collection_manager import CollectionManager
|
17
17
|
from pyegeria.glossary_manager import GlossaryManager
|
18
18
|
from pyegeria.project_manager import ProjectManager
|
19
|
-
from pyegeria.
|
19
|
+
from pyegeria.automated_curation import AutomatedCuration
|
20
20
|
from pyegeria.classification_manager_omvs import ClassificationManager
|
21
21
|
from pyegeria.template_manager_omvs import TemplateManager
|
22
22
|
from pyegeria.runtime_manager_omvs import RuntimeManager
|
pyegeria/egeria_tech_client.py
CHANGED
@@ -5,7 +5,7 @@ Copyright Contributors to the ODPi Egeria project.
|
|
5
5
|
Runtime manager is a view service that supports user interaction with the running platforms.
|
6
6
|
|
7
7
|
"""
|
8
|
-
from pyegeria.
|
8
|
+
from pyegeria.automated_curation import AutomatedCuration
|
9
9
|
from pyegeria.classification_manager_omvs import ClassificationManager
|
10
10
|
from pyegeria.data_designer import DataDesigner
|
11
11
|
from pyegeria.egeria_cat_client import EgeriaCat
|
pyegeria/mermaid_utilities.py
CHANGED
@@ -21,7 +21,7 @@ nest_asyncio.apply()
|
|
21
21
|
from IPython.display import HTML, display
|
22
22
|
from rich.console import Console
|
23
23
|
|
24
|
-
from pyegeria.
|
24
|
+
from pyegeria.automated_curation import AutomatedCuration
|
25
25
|
from pyegeria._exceptions import (
|
26
26
|
InvalidParameterException,
|
27
27
|
PropertyServerException,
|
pyegeria/models.py
CHANGED
@@ -323,7 +323,7 @@ class TemplateRequestBody(PyegeriaModel):
|
|
323
323
|
parent_at_end_1: bool | None = True
|
324
324
|
template_guid: str
|
325
325
|
replacement_properties: dict[str, Any] = {}
|
326
|
-
|
326
|
+
placeholder_property_values: dict[str, Any] = {}
|
327
327
|
deep_copy: bool | None = False
|
328
328
|
effective_from: datetime | None = None
|
329
329
|
effective_to: datetime | None = None
|
pyegeria/output_formatter.py
CHANGED
@@ -908,13 +908,53 @@ def extract_basic_dict(elements: Union[Dict, List[Dict]]) -> Union[Dict, List[Di
|
|
908
908
|
result.append(body)
|
909
909
|
return result
|
910
910
|
|
911
|
-
def
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
911
|
+
def _extract_default_properties(self, element: dict, columns_struct: dict) -> dict:
|
912
|
+
props = element.get('properties', {}) or {}
|
913
|
+
normalized = {
|
914
|
+
'properties': props,
|
915
|
+
'elementHeader': element.get('elementHeader', {}),
|
916
|
+
}
|
917
|
+
# Common population pipeline
|
918
|
+
col_data = populate_common_columns(element, columns_struct)
|
919
|
+
columns_list = col_data.get('formats', {}).get('columns', [])
|
920
|
+
|
921
|
+
return col_data
|
922
|
+
|
923
|
+
|
924
|
+
def _generate_default_output(self, elements: dict | list[dict], search_string: str,
|
925
|
+
element_type_name: str | None,
|
926
|
+
output_format: str = 'DICT',
|
927
|
+
output_format_set: dict | str = None) -> str | list[dict]:
|
928
|
+
entity_type = 'Referenceable'
|
929
|
+
if output_format_set:
|
930
|
+
if isinstance(output_format_set, str):
|
931
|
+
output_formats = select_output_format_set(output_format_set, output_format)
|
932
|
+
elif isinstance(output_format_set, dict):
|
933
|
+
output_formats = get_output_format_type_match(output_format_set, output_format)
|
934
|
+
else:
|
935
|
+
output_formats = None
|
936
|
+
else:
|
937
|
+
output_formats = select_output_format_set(entity_type, output_format)
|
938
|
+
if output_formats is None:
|
939
|
+
output_formats = select_output_format_set('Default', output_format)
|
940
|
+
return generate_output(
|
941
|
+
elements=elements,
|
942
|
+
search_string=search_string,
|
943
|
+
entity_type=entity_type,
|
944
|
+
output_format=output_format,
|
945
|
+
extract_properties_func=_extract_default_properties,
|
946
|
+
get_additional_props_func=None,
|
947
|
+
columns_struct=output_formats,
|
948
|
+
)
|
949
|
+
|
950
|
+
|
951
|
+
def generate_output(elements: Union[Dict, List[Dict]],
|
952
|
+
search_string: str,
|
953
|
+
entity_type: str,
|
954
|
+
output_format: str,
|
955
|
+
extract_properties_func: Callable,
|
956
|
+
get_additional_props_func: Optional[Callable] = None,
|
957
|
+
columns_struct: dict = None) -> Union[str, list[dict]]:
|
918
958
|
"""
|
919
959
|
Generate output in the specified format for the given elements.
|
920
960
|
|
pyegeria/project_manager.py
CHANGED
@@ -915,7 +915,7 @@ class ProjectManager(Client2):
|
|
915
915
|
"""
|
916
916
|
|
917
917
|
url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/from-template"
|
918
|
-
return await self.
|
918
|
+
return await self._async_create_elem_from_template(url, body)
|
919
919
|
|
920
920
|
@dynamic_catch
|
921
921
|
def create_project_from_template(
|
pyegeria/reference_data.py
CHANGED
@@ -652,7 +652,7 @@ class ReferenceDataManager(Client2):
|
|
652
652
|
"""
|
653
653
|
|
654
654
|
url = f"{self.ref_data_command_base}/valid-value-definitions/from-template"
|
655
|
-
return await self.
|
655
|
+
return await self._async_create_elem_from_template(url, body)
|
656
656
|
|
657
657
|
@dynamic_catch
|
658
658
|
def create_valid_value_definition_from_template(
|
pyegeria/x_action_author_omvs.py
CHANGED
@@ -9,7 +9,7 @@ Copyright Contributors to the ODPi Egeria project.
|
|
9
9
|
|
10
10
|
|
11
11
|
from requests import Response
|
12
|
-
from pyegeria.
|
12
|
+
from pyegeria.automated_curation import AutomatedCuration
|
13
13
|
from pyegeria._globals import NO_ELEMENTS_FOUND
|
14
14
|
|
15
15
|
|
@@ -49,7 +49,7 @@ class ActionAuthor(AutomatedCuration):
|
|
49
49
|
)
|
50
50
|
self.action_command_root = f"{platform_url}/servers/"
|
51
51
|
|
52
|
-
async def
|
52
|
+
async def _async_create_elem_from_template(
|
53
53
|
self, body: str, server: str = None
|
54
54
|
) -> str:
|
55
55
|
"""Create a metadata element from a template. Async version.
|
@@ -4,6 +4,7 @@ commands/cat/Dr-Egeria_md-orig.py,sha256=ZX20BvRo0fIFisvy5Z-VJDLVyKbQoud89-CUV2S
|
|
4
4
|
commands/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiqRY,967
|
5
5
|
commands/cat/__init__.py,sha256=l4CImkjEiTQKS7QR-RQwzHIgRpfP032Mn_NZEuIILwg,98
|
6
6
|
commands/cat/debug_log.2025-09-14_11-03-29_316193.log.zip,sha256=A3iGk7EgW9u5eAXxUoQZe1glh_29TQceOAyjK_6IBZk,22787
|
7
|
+
commands/cat/debug_log.2025-09-15_19-06-37_086464.log.zip,sha256=KVM2LYsrlKcAXtuTiNGRYRRVo7OCoXUW5ymusHiQzIk,11972
|
7
8
|
commands/cat/dr_egeria_command_help.py,sha256=_HOJd1IplnYhoQm1cwsROS9SxVKILLUf9YNlGMvvdF4,15359
|
8
9
|
commands/cat/dr_egeria_jupyter.py,sha256=rfLVV_84Q8Pqcq1flmijKvZ7sEZFy7JAcAP_NAbb46Y,5656
|
9
10
|
commands/cat/dr_egeria_md.py,sha256=zz-XtRW0sfBOG8kA51OFR5uKQ7JULGoOgXeJBXQBqTM,4889
|
@@ -216,9 +217,10 @@ md_processing/.obsidian/core-plugins.json,sha256=Brm8YrAcwFEdXZjASKcuSS2gsKga_oP
|
|
216
217
|
md_processing/.obsidian/workspace.json,sha256=NLVJEOtsowljw7Ka035ReHLPu4iitk2ZsuSDN6zUAFY,4282
|
217
218
|
md_processing/__init__.py,sha256=gx-vCZXFjuq4T63qb5XKgW8DA2DoeAuqmO7xg4VmH3Y,7226
|
218
219
|
md_processing/data/commands-working.json,sha256=uCo_azcuuYqGm7QffJeCGj7PyZuZRGdu7kKf4XWmMoA,1162560
|
219
|
-
md_processing/data/commands.json,sha256=
|
220
|
+
md_processing/data/commands.json,sha256=X-AFeNkzVWb3Q0x6Zf7Ej2qo_LY0vGIMeDqJVDIuass,1546841
|
220
221
|
md_processing/data/generated_format_sets.json,sha256=TXvGK_Gm5ieq9i6u9M1j4CaNPzoV2m0hisKK2fWCtIM,98502
|
221
222
|
md_processing/data/generated_format_sets.py,sha256=2BfRzb5G5n8Cz6VwirQXlBq1fHBISIh4x7jquXg6QEw,36402
|
223
|
+
md_processing/dr-egeria-outbox/DataStruct-DrE-2025-09-19-22-35-57.md,sha256=TlARiu_jKhUa4vvF6Rpp9USoi0sEHbVYuVpFXQlWyJE,1269
|
222
224
|
md_processing/dr_egeria.py,sha256=VVo0kv2qDAdHmbi-nZA1HoPJH8wzLVDa1a_FSWCsVBI,20405
|
223
225
|
md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb,sha256=dbzNu90fCKNohOWVSRBOB1GLyd95x8Qw51I5AkaPtso,11552
|
224
226
|
md_processing/md_commands/__init__.py,sha256=ssEojzFlSYtY2bHqqOoKo8PFaANZ_kq_gIbtlXnuc2s,93
|
@@ -226,68 +228,68 @@ md_processing/md_commands/data_designer_commands.py,sha256=cT2godlpPS5vbWvpZbzTD
|
|
226
228
|
md_processing/md_commands/ext_ref_commands.py,sha256=Pv4JLiXJUQbHcuMsN71Dzg4U1B1vhNs4YwhXn0A1lc8,23129
|
227
229
|
md_processing/md_commands/glossary_commands.py,sha256=slKnvs6ktdAOZI_EmpVWUB7hrdSngUnitucZu9dR9PE,33411
|
228
230
|
md_processing/md_commands/governance_officer_commands.py,sha256=c7SnJqQooPr3zCebDzeztAM8wZq9G7ZB4EpJ-uR5moI,26479
|
229
|
-
md_processing/md_commands/product_manager_commands.py,sha256=
|
231
|
+
md_processing/md_commands/product_manager_commands.py,sha256=CtRG_MCe1bhyOnlm03S_Ee-LcYkJGdZkBSsOLIqonew,52035
|
230
232
|
md_processing/md_commands/project_commands.py,sha256=peAoemgzb8bEQghi8nFU6JrZ5Hro90Bl1JDHl7_nAtM,17127
|
231
233
|
md_processing/md_commands/solution_architect_commands.py,sha256=4Ghb8j2wlDdWtHoSCrx5jCJFEJfqII4mnFJ_tqduRKI,52569
|
232
234
|
md_processing/md_commands/view_commands.py,sha256=dvRD0Vjv1w9FTfV5W-4EMQBTk2NAUJlIP2jQ411kHS4,11815
|
233
235
|
md_processing/md_processing_utils/__init__.py,sha256=LxAmxlcji26ziKV4gGar01d95gL9vgToRIeJW8N-Ifs,80
|
234
|
-
md_processing/md_processing_utils/common_md_proc_utils.py,sha256=
|
236
|
+
md_processing/md_processing_utils/common_md_proc_utils.py,sha256=_Z4B0PPyFOuJ43gBtWGsolqUXnqOP6Hry0BpgzAvDlo,58610
|
235
237
|
md_processing/md_processing_utils/common_md_utils.py,sha256=mHU-H5L43Egu_EpLqSQkMgyZS_xX-_TRloov_rUtO1w,26766
|
238
|
+
md_processing/md_processing_utils/debug_log,sha256=33cQkrJSwgRN21MlKCikb-rvEGWZKCrZvn028LqAK5U,19887
|
236
239
|
md_processing/md_processing_utils/determine_width.py,sha256=nzinSuSF9SeuVOfKXsg-l1cqLkNYKZnF6HYfJpft44A,4236
|
237
240
|
md_processing/md_processing_utils/dr-egeria-help-2025-09-09T11:10:03.md,sha256=x_J_baA18EsMHW_O-EZiNkXAQ3MEwta8ZLsKPil55O8,166018
|
238
241
|
md_processing/md_processing_utils/dr-egeria-help-2025-09-10T14:49:49.md,sha256=qnu8YS-7Ra0GQtPPiCKb4PpQBcJAmfaG50ufFpr9b-s,175356
|
239
242
|
md_processing/md_processing_utils/dr-egeria-help-2025-09-10T14:57:46.md,sha256=1gBIR4iuBsAXpGdg4nPgFHOGcLcDCZbNvvg-9cHD4fM,55188
|
240
|
-
md_processing/md_processing_utils/extraction_utils.py,sha256=
|
243
|
+
md_processing/md_processing_utils/extraction_utils.py,sha256=Hx3OPjMLfChBPwJxHeRNeQaSrZbopoj87iE7poPV4ns,22358
|
241
244
|
md_processing/md_processing_utils/gen_format_sets.py,sha256=ZdoLSjR-e7dZBG3tVr-HRmy-WQuAgIzj5g9tYIn4KQA,16480
|
242
245
|
md_processing/md_processing_utils/generate_dr_help.py,sha256=MJWlr_22Y9pjWqQbfSLb6C-t1GlQNlbWXkCmDnphfME,7419
|
243
|
-
md_processing/md_processing_utils/generate_md_cmd_templates.py,sha256=
|
246
|
+
md_processing/md_processing_utils/generate_md_cmd_templates.py,sha256=mFenxe9Jq8QivgmI0ZFtO_iu6P6RH_EiNa__CGyDw_0,5809
|
244
247
|
md_processing/md_processing_utils/generate_md_templates.py,sha256=DMnMQ7_LbmQCS8aG-ppHGTu25obOSn4ZzSg7V21k9jo,3547
|
245
|
-
md_processing/md_processing_utils/md_processing_constants.py,sha256=
|
248
|
+
md_processing/md_processing_utils/md_processing_constants.py,sha256=8LEwrtYr7UkgWGyT6mquUaKMb4--LEtv24DHr1yeGv8,21069
|
246
249
|
md_processing/md_processing_utils/message_constants.py,sha256=UBf18obM83umM6zplR7ychre4xLRbBnTzidHDZ2gNvM,548
|
247
250
|
pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
|
248
|
-
pyegeria/__init__.py,sha256=
|
251
|
+
pyegeria/__init__.py,sha256=H9U3s0TYSIJXqfpMb4uSme4mYZ5Q3O2cWdT3yJaTEow,11837
|
249
252
|
pyegeria/_client.py,sha256=hJHn5pD8sbelP_M9dK-M5Z2CYqpRXzXfg1UCgAdQ6dQ,33416
|
250
|
-
pyegeria/_client_new.py,sha256=
|
253
|
+
pyegeria/_client_new.py,sha256=vK0uhQHk5dLukraTI9sT6eW3o_NUNG5eSLJVDKIZqDc,69774
|
251
254
|
pyegeria/_deprecated_gov_engine.py,sha256=dWNcwVsE5__dF2u4QiIyQrssozzzOjBbLld8MdpmVCQ,17264
|
252
255
|
pyegeria/_exceptions.py,sha256=1SrnV194V4_YJNnNAU0myTHQ3dhLn4GF2B2gZcj1u90,18153
|
253
256
|
pyegeria/_exceptions_new.py,sha256=srmrlqoWy7VvOJOhPcYFKW32MCIovgEg5J7PrYDxzQA,19706
|
254
257
|
pyegeria/_globals.py,sha256=qSU5hM4uuJZPp-YapEEKxfcdgH9hauc6R7gRkELLroY,1132
|
255
258
|
pyegeria/_output_format_models.py,sha256=p9fTYaIa5KyTMIR4-JAbE9g66_gGMPTnUqjIq20Zr1o,14494
|
256
|
-
pyegeria/_output_formats.py,sha256
|
259
|
+
pyegeria/_output_formats.py,sha256=ayG2inyR0d6zwD9yOdT5VZ5DJSOgvGrtIqFvkH2E0ZE,175279
|
257
260
|
pyegeria/_validators.py,sha256=pNxND0dN2qvyuGE52N74l1Ezfrh2p9Hao2ziR_t1ENI,7425
|
258
261
|
pyegeria/asset_catalog_omvs.py,sha256=P6FceMP0FgakGSOt3ePxpEbsF7nnypzo1aQahjdL_94,29021
|
259
|
-
pyegeria/
|
262
|
+
pyegeria/automated_curation.py,sha256=GLUrPf90VeRf3AJNA2tZQJBj3dUhzoRtEBBw0NiSlyU,138891
|
260
263
|
pyegeria/classification_manager_omvs.py,sha256=eodP8Fn7zi78unsjk0XNW7lnxI7R0Fb7_SLI-HA39PQ,187249
|
261
264
|
pyegeria/collection_manager.py,sha256=-w6QMcLpfBh4tc0-aFF81idywFJrxdsm6AWQByrvqw4,236904
|
262
265
|
pyegeria/collection_models.py,sha256=d3DdWONqDdAeuUQgussiCNfvhKIDFpaI35cdW_Tv4_0,5315
|
263
266
|
pyegeria/config.py,sha256=N-qHq74GN29Mwfp8MbXvj7uEsKCIXotL7MDwFcj3nIU,29380
|
264
267
|
pyegeria/core_omag_server_config.py,sha256=pNQpocICkZx8sRsTw5DPUe-TFyxlIo1U88qqgci_f7I,97764
|
265
268
|
pyegeria/create_tech_guid_lists.py,sha256=hf5q8Xrdsz-bqeIW3yTORZ1XB6_BrKzLDWWwC_bNG2g,4811
|
266
|
-
pyegeria/data_designer.py,sha256=
|
269
|
+
pyegeria/data_designer.py,sha256=oMDC-knFdepi3d5S3s-cmcmKc_1DHjAVBu9m-lZppdM,188692
|
267
270
|
pyegeria/egeria_cat_client.py,sha256=H4V3Qm52Vhfh16kwf2gTibtsT5PZwdjxTKOnNef1rbs,3088
|
268
|
-
pyegeria/egeria_client.py,sha256=
|
271
|
+
pyegeria/egeria_client.py,sha256=N_CvaUgb8tQtRLsy8dfLNJ2lPPiCrfW-AFiLBxqIlyI,6102
|
269
272
|
pyegeria/egeria_config_client.py,sha256=YkgndiZ6-CfhwVeBW9ErS7l95SIrd0G9--H8kAfeBJY,2479
|
270
273
|
pyegeria/egeria_my_client.py,sha256=3dSBUlrivzih75hodNHe-2BM9pGB8AQVLru-_NbhYNE,3186
|
271
|
-
pyegeria/egeria_tech_client.py,sha256=
|
274
|
+
pyegeria/egeria_tech_client.py,sha256=8Apr5YEFL2qgn-QTv9YWTI-23rGI94NiUp4418EiZ4k,4707
|
272
275
|
pyegeria/external_references.py,sha256=DyOmGhG0LWIN4INABCiJRrHxfZ5FWE7TFtc3S_k5iEI,74360
|
273
276
|
pyegeria/feedback_manager_omvs.py,sha256=0xBs0p54vmdfVYYgQ8pOanLC4fxfgTk1Z61Y6D1U7_I,152978
|
274
277
|
pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kKyjvpDA,47464
|
275
278
|
pyegeria/glossary_manager.py,sha256=EmCnIPG-W0bUD7MVn2Vopb-cb_TR1J8MMOOFzo38aWk,106786
|
276
279
|
pyegeria/governance_officer.py,sha256=OYEewhoe3HBcxTR6kGdKNkwLT4gkQDRGKfFIsVlD5oI,109203
|
277
280
|
pyegeria/load_config.py,sha256=XDwPAHB3MvGRuoP8kg1lJJAI4BgMWZ3TYxfxYROgJj4,1188
|
278
|
-
pyegeria/load_config_orig.py,sha256=lOM37vdIBcYfLQFTLP5bDuNc7vTFGBNYPfqHtWGNvA4,11624
|
279
281
|
pyegeria/logging_configuration.py,sha256=BxTQRN-7OOdk5t1f1xSn8gKU8iT-MfWEgbn6cYWrRsY,7674
|
280
282
|
pyegeria/md_processing_helpers.py,sha256=xlQuK5eP_PJqUdy4BScQ97NyBD95jMS3EUg0wK5CsZo,2137
|
281
283
|
pyegeria/md_processing_utils.py,sha256=KRESCqAYjCgHRAdhHH49lLDDhaq740CUlqTG0bN-6Oo,99119
|
282
284
|
pyegeria/md_processing_utils_orig.py,sha256=SToZtXQiysi2_vmIY4-T2NIELRirzQ1zjkho_2jFsNE,52603
|
283
|
-
pyegeria/mermaid_utilities.py,sha256=
|
285
|
+
pyegeria/mermaid_utilities.py,sha256=w_zED21bLCeXtfpBoGpPoG3kQlJDXwrLznLIuugvXzM,54285
|
284
286
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
285
|
-
pyegeria/models.py,sha256=
|
287
|
+
pyegeria/models.py,sha256=EhqVugZU7RT_FCiuSI4nRz_6sp8GkttrPYeB2hFN-8s,20375
|
286
288
|
pyegeria/my_profile_omvs.py,sha256=d0oJYCJG7pS9BINPuGciVa00ac0jwPHNANXDCLginEc,34720
|
287
|
-
pyegeria/output_formatter.py,sha256=
|
289
|
+
pyegeria/output_formatter.py,sha256=pFHGEhSnLppRN0gl7_CwkHSZkC6G8r1Con9At2NMwOU,43442
|
288
290
|
pyegeria/platform_services.py,sha256=AJNa8n2mKfAMK68q886YCD-p5bpCxIlCxBsRdr0R9O4,41708
|
289
|
-
pyegeria/project_manager.py,sha256=
|
290
|
-
pyegeria/reference_data.py,sha256=
|
291
|
+
pyegeria/project_manager.py,sha256=9L1tJPjGtcN_jwLjVAwR4mWDuT-R5mKJ8l1Jb30jqF0,65884
|
292
|
+
pyegeria/reference_data.py,sha256=tTKNNqRXMUYgyByojHOEPNt5oAHlDIbzdWciaKSPxzw,41844
|
291
293
|
pyegeria/registered_info.py,sha256=y0-LgDIQXpph0lEWxIOG3_HsqX_Z2iAIb3xu4Aa4B70,6344
|
292
294
|
pyegeria/runtime_manager_omvs.py,sha256=bVAFJPRnIbTxdzmDHx7XgJBlyh_ZyHiKeUGqFT1Ozpg,80293
|
293
295
|
pyegeria/server_operations.py,sha256=dTqUEmX1B77b0x61OSU0aonsW8KwIpfzb3eioRpwaiI,16832
|
@@ -295,9 +297,9 @@ pyegeria/solution_architect.py,sha256=wds7wIBmDdV1H6SPhLPicWDzA7dfjhSCfO-_s4CByD
|
|
295
297
|
pyegeria/template_manager_omvs.py,sha256=chBljs1vy5wr9DRAtbvIt4Cob_7HxGfxLkCNlDTM-rQ,42755
|
296
298
|
pyegeria/utils.py,sha256=xOTxk9PH8ZGZmgIwz_a6rczTVLADLEjucr10ZJTUnY4,9272
|
297
299
|
pyegeria/valid_metadata_omvs.py,sha256=Xq9DqBQvBFFJzaFIRKcVZ2k4gJvSh9yeXs_j-O3vn1w,65050
|
298
|
-
pyegeria/x_action_author_omvs.py,sha256=
|
299
|
-
pyegeria-5.4.4.
|
300
|
-
pyegeria-5.4.4.
|
301
|
-
pyegeria-5.4.4.
|
302
|
-
pyegeria-5.4.4.
|
303
|
-
pyegeria-5.4.4.
|
300
|
+
pyegeria/x_action_author_omvs.py,sha256=uyN8IieAe9H4aOWqJyKTzW-fetStHuoDoybianjCT70,6425
|
301
|
+
pyegeria-5.4.4.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
302
|
+
pyegeria-5.4.4.7.dist-info/METADATA,sha256=vYffXlfmeQOY45n9sI7sWDbjWpLhybHhkZsNJ4XF2fQ,6292
|
303
|
+
pyegeria-5.4.4.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
304
|
+
pyegeria-5.4.4.7.dist-info/entry_points.txt,sha256=HAS-LHaaBfkaZ19XU9g5mXwn2uj2HK99isdijI-VIDk,6353
|
305
|
+
pyegeria-5.4.4.7.dist-info/RECORD,,
|
pyegeria/load_config_orig.py
DELETED
@@ -1,218 +0,0 @@
|
|
1
|
-
|
2
|
-
"""
|
3
|
-
SPDX-License-Identifier: Apache-2.0
|
4
|
-
Copyright Contributors to the ODPi Egeria project.
|
5
|
-
|
6
|
-
This module manages configuration information for pyegeria and pyegeria clients.
|
7
|
-
|
8
|
-
The load_app_config() function loads configuration information:
|
9
|
-
1) Default configuration variables are specified in the Dict structure below.
|
10
|
-
2) We construct a path to an external configuration JSON file from the Environment Variables
|
11
|
-
- PYEGERIA_ROOT_PATH
|
12
|
-
- PYEGERIA_CONFIG_FILE
|
13
|
-
3) If a valid configuration file is found, the configuration will be loaded on top of the default configuration.
|
14
|
-
4) We then update the in-memory configuration from Environment Variables, if set.
|
15
|
-
|
16
|
-
The result is that Environment Variable values take priority over configuration file values which override the defaults.
|
17
|
-
|
18
|
-
The get_app_config() function is used by other modules to get configuration information from the configuration structure
|
19
|
-
and makes it available as a dict.
|
20
|
-
|
21
|
-
"""
|
22
|
-
import inspect
|
23
|
-
import os
|
24
|
-
import json
|
25
|
-
|
26
|
-
from loguru import logger
|
27
|
-
from pyegeria._exceptions_new import PyegeriaInvalidParameterException
|
28
|
-
|
29
|
-
|
30
|
-
# from dotenv import load_dotenv # pip install python-dotenv if you use .env files
|
31
|
-
|
32
|
-
# --- Configuration Loading Logic ---
|
33
|
-
|
34
|
-
# Private variable to hold the loaded configuration
|
35
|
-
_app_config = None
|
36
|
-
|
37
|
-
def load_app_config():
|
38
|
-
"""
|
39
|
-
Loads application configuration from files and environment variables.
|
40
|
-
This function should ideally be called only once at application startup.
|
41
|
-
"""
|
42
|
-
global _app_config # Declare intent to modify the global _app_config
|
43
|
-
|
44
|
-
if _app_config is not None:
|
45
|
-
# Configuration already loaded, return existing instance
|
46
|
-
return _app_config
|
47
|
-
|
48
|
-
|
49
|
-
# Define default configuration values
|
50
|
-
config = {
|
51
|
-
"Environment": {
|
52
|
-
"Console Width": 200,
|
53
|
-
"Dr.Egeria Inbox": "md_processing/dr-egeria-inbox",
|
54
|
-
"Dr.Egeria Outbox": "md_processing/dr-egeria-outbox",
|
55
|
-
"Egeria Engine Host URL": "",
|
56
|
-
"Egeria Engine Host": "qs-engine-host",
|
57
|
-
"Egeria Glossary Path": "glossary",
|
58
|
-
"Egeria Integration Daemon URL": "https://localhost:9443",
|
59
|
-
"Egeria Integration Daemon": "qs-integration-daemon",
|
60
|
-
"Egeria Jupyter": True,
|
61
|
-
"Egeria Kafka Endpoint": "localhost:9192",
|
62
|
-
"Egeria Mermaid Folder": "mermaid_graphs",
|
63
|
-
"Egeria Metadata Store": "qs-metadata-store",
|
64
|
-
"Egeria Platform URL": "https://localhost:9443",
|
65
|
-
"Egeria View Server URL": "https://localhost:9443",
|
66
|
-
"Egeria View Server": "qs-view-server",
|
67
|
-
"Pyegeria Root": "/Users/dwolfson/localGit/egeria-v5-3/egeria-python",
|
68
|
-
},
|
69
|
-
|
70
|
-
"Debug": {
|
71
|
-
"debug_mode": False,
|
72
|
-
"enable_logger_catch": False,
|
73
|
-
"timeout_seconds": 30,
|
74
|
-
},
|
75
|
-
"feature_x_enabled": False,
|
76
|
-
"Logging": {
|
77
|
-
"console_filter_levels": [
|
78
|
-
"ERROR"
|
79
|
-
],
|
80
|
-
"console_logging_enabled": [
|
81
|
-
"_client_new",
|
82
|
-
"_exceptions_new",
|
83
|
-
"collections_manager_omvs"
|
84
|
-
"tests",
|
85
|
-
],
|
86
|
-
"console_logging_level": "INFO",
|
87
|
-
"enable_logging": False,
|
88
|
-
"file_logging_level": "INFO",
|
89
|
-
"log_directory": "logs",
|
90
|
-
"logging_console_format":
|
91
|
-
" <cyan>{name}</cyan>:<cyan>{line}</cyan> - <level>{message}</level> -{extra}",
|
92
|
-
" <green>{time:YYYY-MM-DD HH:mm:ss}</green> | <level>{level}</level> |"
|
93
|
-
"logging_file_format":
|
94
|
-
" {time:YYYY-MM-DD HH:mm:ss} | {level} | {function}:{line} - {message }-{extra}"
|
95
|
-
},
|
96
|
-
"User Profile": {
|
97
|
-
"Egeria Home Collection": "MyHome",
|
98
|
-
"Egeria Home Glossary Name": "Egeria-Markdown",
|
99
|
-
"Egeria Local Qualifier": "PDR"
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
root_path = os.getenv("PYEGERIA_ROOT_PATH", config["Environment"].get("Pyegeria Root",""))
|
104
|
-
config_file = os.getenv("PYEGERIA_CONFIG_FILE", "config.json")
|
105
|
-
config_file_path = os.path.join(root_path,config_file)
|
106
|
-
if os.path.exists(config_file_path):
|
107
|
-
try:
|
108
|
-
with open(config_file_path, 'r') as f:
|
109
|
-
file_config = json.load(f)
|
110
|
-
config.update(file_config) # Merge/override defaults
|
111
|
-
# logger.debug("Configuration file loaded from {}".format(config_file_path))
|
112
|
-
except json.JSONDecodeError:
|
113
|
-
print(f"Warning: Could not parse {config_file_path}. Using defaults/env vars.")
|
114
|
-
except Exception as e:
|
115
|
-
print(f"Warning: Error reading {config_file_path}: {e}. Using defaults/env vars.")
|
116
|
-
else:
|
117
|
-
logger.warning(f"Warning: Could not find {config_file_path}. Using defaults/env vars.")
|
118
|
-
|
119
|
-
debug = config["Debug"]
|
120
|
-
debug['debug_mode'] = os.getenv("PYEGERIA_DEBUG_MODE", debug.get("debug_mode", False))
|
121
|
-
debug["enable_logger_catch"] = os.getenv("PYEGERIA_ENABLE_LOGGER_CATCH", debug.get("enable_logger_catch", False))
|
122
|
-
debug["timeout_seconds"] = int(os.getenv("PYEGERIA_TIMEOUT_SECONDS", debug.get("timeout_seconds", 30)))
|
123
|
-
|
124
|
-
env = config["Environment"]
|
125
|
-
env["Console Width"] = int(os.getenv("PYEGERIA_CONSOLE_WIDTH", env.get("EGERIA_WIDTH", 200)))
|
126
|
-
env["Dr.Egeria Inbox"] = os.getenv("DR_EGERIA_INBOX_PATH", env.get("Dr_EGERIA_INBOX",
|
127
|
-
"md_processing/dr-egeria-inbox"))
|
128
|
-
env["Dr.Egeria Outbox"] = os.getenv("DR_EGERIA_OUTBOX_PATH", env.get("DR_EGERIA_OUTBOX",
|
129
|
-
"md_processing/dr-egeria-outbox"))
|
130
|
-
env["Egeria Engine Host"] = os.getenv("EGERIA_ENGINE_HOST", env.get("Egeria Engine Host", "qs-engine-host"))
|
131
|
-
env["Egeria Engine Host URL"] = os.getenv("EGERIA_ENGINE_HOST_URL",env.get("Egeria Engine Host URL", "https://localhost:9443"))
|
132
|
-
|
133
|
-
env["Egeria Glossary Path"] = os.getenv("EGERIA_GLOSSARY_PATH", env.get("Egeria Glossary Path", "glossary"))
|
134
|
-
env["Egeria Integration Daemon"] = os.getenv("EGERIA_INTEGRATION_DAEMON", env.get("Egeria Integration Daemon", "qs-integration-daemon"))
|
135
|
-
env["Egeria Integration Daemon URL"] = os.getenv("EGERIA_INTEGRATION_DAEMON_URL",env.get("Egeria Integration Daemon URL", "https://localhost:9443"))
|
136
|
-
env["Egeria Jupyter"] = os.getenv("EGERIA_JUPYTER", env.get("Egeria Jupyter", True))
|
137
|
-
env["Egeria Kafka"] = os.getenv("EGERIA_KAFKA", env.get("Egeria Kafka", "https://localhost:9192"))
|
138
|
-
env["Egeria Mermaid Folder"] = os.getenv("EGERIA_MERMAID_FOLDER", env.get("Egeria Mermaid Folder","mermaid_graphs"))
|
139
|
-
env["Egeria Metadata Store"] = os.getenv("EGERIA_METADATA_STORE", env.get("Egeria Metadata Store","qs-metadata-store"))
|
140
|
-
env["Egeria Platform URL"] = os.getenv("EGERIA_PLATFORM_URL", env.get("Egeria Platform URL","https://localhost:9443"))
|
141
|
-
env["Egeria View Server"] = os.getenv("EGERIA_VIEW_SERVER", env.get("Egeria View Server","qs-view-server"))
|
142
|
-
env["Egeria VIew Server URL"] = os.getenv("EGERIA_VIEW_SERVER_URL", env.get("Egeria View Server URL","https://localhost:9443"))
|
143
|
-
env["Pyegeria Root"] = root_path
|
144
|
-
|
145
|
-
log = config["Logging"]
|
146
|
-
log["console_filter_levels"] = os.getenv("PYEGERIA_CONSOLE_FILTER_LEVELS",
|
147
|
-
log.get("console_filter_levels", ["ERROR"]))
|
148
|
-
log["console_logging_enabled"] = os.getenv("PYEGERIA_CONSOLE_LOGGING_ENABLED",
|
149
|
-
log.get("console_logging_enabled", ["tests"]))
|
150
|
-
log["console_logging_level"] = os.getenv("PYEGERIA_CONSOLE_LOG_LVL", log.get("console_logging_level", None))
|
151
|
-
log["enable_logging"] = os.getenv("PYEGERIA_ENABLE_LOGGING", log.get("enable_logging", False))
|
152
|
-
log["file_logging_level"] = os.getenv("PYEGERIA_FILE_LOG_LVL", log.get("file_logging_level","INFO"))
|
153
|
-
log["log_directory"] = os.getenv("PYEGERIA_LOG_DIRECTORY", log.get("log_directory",'logs'))
|
154
|
-
log["logging_console_format"] = os.getenv("PYEGERIA_LOGGING_CONSOLE_FORMAT", log.get("logging_console_format",
|
155
|
-
" <green>{time:YYYY-MM-DD HH:mm:ss}</green> | <level>{level}</level> | "
|
156
|
-
"<cyan>{name}</cyan>:<cyan>{line}</cyan> - "
|
157
|
-
"<level>{message}</level> -{extra}" ))
|
158
|
-
log["logging_file_format"] = os.getenv("PYEGERIA_LOGGING_FILE_FORMAT",log.get("logging_file_format",
|
159
|
-
" {time:YYYY-MM-DD HH:mm:ss} | {level} | {function}:{line} "
|
160
|
-
"- {message }-{extra}" ))
|
161
|
-
|
162
|
-
user = config["User Profile"]
|
163
|
-
user["Egeria Home Collection"] = os.getenv("EGERIA_HOME_COLLECTION", user.get("Egeria Home Collection", "myHome"))
|
164
|
-
user["Egeria Home Glossary Name"] = os.getenv("EGERIA_HOME_GLOSSARY_NAME", user.get("Egeria Home Glossary Name", "Egeria-Markdown"))
|
165
|
-
user["Egeria Local Qualifier"] = os.getenv("EGERIA_LOCAL_QUALIFIER", user.get("Egeria Local Qualifier", "myLocal"))
|
166
|
-
user["user_name"] = os.getenv("EGERIA_USER_NAME", "peterprofile")
|
167
|
-
user["user_pwd"] = os.getenv("EGERIA_USER_PASSWORD", "secret")
|
168
|
-
|
169
|
-
if not user.get("user_pwd"):
|
170
|
-
context: dict = {}
|
171
|
-
context['caller method'] = inspect.currentframe().f_back.f_code.co_name
|
172
|
-
additional_info: dict = {"reason": "Egeria user password is not found in the environment"}
|
173
|
-
raise PyegeriaInvalidParameterException(None, context, additional_info)
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
# Handle type conversion for env vars (they are always strings)
|
179
|
-
# if "TIMEOUT_SECONDS" in os.environ:
|
180
|
-
# try:
|
181
|
-
# config["timeout_seconds"] = int(os.getenv("TIMEOUT_SECONDS"))
|
182
|
-
# except ValueError:
|
183
|
-
# print("Warning: TIMEOUT_SECONDS environment variable is not an integer. Using default.")
|
184
|
-
#
|
185
|
-
# if "DEBUG_MODE" in os.environ:
|
186
|
-
# # Convert string "True", "False", "1", "0" to boolean
|
187
|
-
# debug_str = os.getenv("DEBUG_MODE").lower()
|
188
|
-
# config["debug_mode"] = debug_str in ('True', '1', 't', 'y', 'yes', 'on')
|
189
|
-
#
|
190
|
-
# if "FEATURE_X_ENABLED" in os.environ:
|
191
|
-
# feature_x_str = os.getenv("FEATURE_X_ENABLED").lower()
|
192
|
-
# config["feature_x_enabled"] = feature_x_str in ('True', '1', 't', 'y', 'yes', 'on')
|
193
|
-
|
194
|
-
# 4. Handle sensitive API key (only from environment variable)
|
195
|
-
# config["api_key"] = os.getenv("MY_SERVICE_API_KEY")
|
196
|
-
# if config["api_key"] is None:
|
197
|
-
# print("Error: MY_SERVICE_API_KEY environment variable is critical and not set.")
|
198
|
-
# # In a production application, you might raise a critical exception here:
|
199
|
-
# # raise ValueError("MY_SERVICE_API_KEY is not set!")
|
200
|
-
|
201
|
-
_app_config = config # Store the final loaded configuration
|
202
|
-
return _app_config
|
203
|
-
|
204
|
-
def get_app_config():
|
205
|
-
"""
|
206
|
-
Provides access to the loaded application configuration.
|
207
|
-
Ensures config is loaded if not already (useful for testing or simple scripts).
|
208
|
-
For structured apps, load_app_config() should be called explicitly once at startup.
|
209
|
-
"""
|
210
|
-
if _app_config is None:
|
211
|
-
# If get_app_config is called before load_app_config, load it now.
|
212
|
-
# This can be convenient but explicit loading is generally better.
|
213
|
-
return load_app_config()
|
214
|
-
return _app_config
|
215
|
-
|
216
|
-
# You can also define constants based on the config for common access,
|
217
|
-
# but be aware these won't update if the config changes after initial load.
|
218
|
-
# E.g., API_ENDPOINT = get_app_config().get("api_endpoint")
|
File without changes
|
File without changes
|
File without changes
|