pyegeria 5.4.7.8__py3-none-any.whl → 5.4.8__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/dr_egeria_command_help.py +1 -1
- commands/cat/list_collections.py +2 -2
- commands/cat/run_report.py +12 -12
- commands/ops/list_archives.py +1 -3
- md_processing/data/generated_format_sets.json +43 -43
- md_processing/md_commands/data_designer_commands.py +10 -10
- md_processing/md_commands/ext_ref_commands.py +2 -2
- md_processing/md_commands/glossary_commands.py +3 -3
- md_processing/md_commands/governance_officer_commands.py +2 -2
- md_processing/md_commands/product_manager_commands.py +8 -8
- md_processing/md_commands/project_commands.py +2 -2
- md_processing/md_commands/solution_architect_commands.py +3 -3
- md_processing/md_commands/view_commands.py +7 -7
- md_processing/md_processing_utils/common_md_proc_utils.py +8 -8
- md_processing/md_processing_utils/gen_format_sets.py +12 -12
- md_processing/md_processing_utils/generate_dr_help.py +1 -1
- pyegeria/__init__.py +3 -3
- pyegeria/_base_client.py +564 -0
- pyegeria/_client_new.py +3378 -722
- pyegeria/_output_format_models.py +41 -16
- pyegeria/_output_formats.py +9 -2642
- pyegeria/automated_curation.py +90 -81
- pyegeria/base_report_formats.py +2835 -0
- pyegeria/classification_manager.py +184 -199
- pyegeria/classification_manager_omvs.py +45 -69
- pyegeria/collection_manager.py +87 -75
- pyegeria/data_designer.py +110 -110
- pyegeria/egeria_cat_client.py +23 -67
- pyegeria/egeria_client.py +2 -2
- pyegeria/egeria_tech_client.py +2 -2
- pyegeria/{external_references.py → external_links.py} +33 -34
- pyegeria/feedback_manager.py +191 -3931
- pyegeria/feedback_manager_omvs.py +104 -306
- pyegeria/format_set_executor.py +16 -16
- pyegeria/glossary_manager.py +30 -30
- pyegeria/governance_officer.py +22 -22
- pyegeria/mcp_adapter.py +6 -6
- pyegeria/output_formatter.py +59 -43
- pyegeria/platform_services.py +2 -1
- pyegeria/project_manager.py +45 -45
- pyegeria/reference_data.py +28 -28
- pyegeria/solution_architect.py +73 -73
- {pyegeria-5.4.7.8.dist-info → pyegeria-5.4.8.dist-info}/METADATA +33 -3
- {pyegeria-5.4.7.8.dist-info → pyegeria-5.4.8.dist-info}/RECORD +48 -47
- pyegeria/egeria_my_client.py +0 -91
- {pyegeria-5.4.7.8.dist-info → pyegeria-5.4.8.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.7.8.dist-info → pyegeria-5.4.8.dist-info}/entry_points.txt +0 -0
- {pyegeria-5.4.7.8.dist-info → pyegeria-5.4.8.dist-info}/licenses/LICENSE +0 -0
- {pyegeria-5.4.7.8.dist-info → pyegeria-5.4.8.dist-info}/top_level.txt +0 -0
pyegeria/reference_data.py
CHANGED
|
@@ -9,9 +9,9 @@ Copyright Contributors to the ODPi Egeria project.
|
|
|
9
9
|
|
|
10
10
|
import asyncio
|
|
11
11
|
|
|
12
|
-
from pyegeria.
|
|
12
|
+
from pyegeria.base_report_formats import select_report_spec
|
|
13
13
|
from pyegeria._client_new import Client2
|
|
14
|
-
from pyegeria.
|
|
14
|
+
from pyegeria.base_report_formats import get_report_spec_match
|
|
15
15
|
from pyegeria.config import settings as app_settings
|
|
16
16
|
from pyegeria.models import (SearchStringRequestBody, FilterRequestBody, GetRequestBody, NewElementRequestBody,
|
|
17
17
|
TemplateRequestBody, DeleteRequestBody, UpdateElementRequestBody,
|
|
@@ -47,7 +47,7 @@ class ReferenceDataManager(Client2):
|
|
|
47
47
|
|
|
48
48
|
Notes
|
|
49
49
|
-----
|
|
50
|
-
- Most high-level list/report methods accept an `output_format` and an optional `
|
|
50
|
+
- Most high-level list/report methods accept an `output_format` and an optional `report_spec` and
|
|
51
51
|
delegate rendering to `pyegeria.output_formatter.generate_output` along with shared helpers such as
|
|
52
52
|
`populate_common_columns`.
|
|
53
53
|
- Private extractor methods follow the convention: `_extract_<entity>_properties(element, columns_struct)` and
|
|
@@ -76,7 +76,7 @@ class ReferenceDataManager(Client2):
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
roles_required = any(column.get('key') == 'project_roles'
|
|
79
|
-
for column in columns_struct.get('formats', {}).get('
|
|
79
|
+
for column in columns_struct.get('formats', {}).get('attributes', []))
|
|
80
80
|
project_props = {}
|
|
81
81
|
|
|
82
82
|
if roles_required:
|
|
@@ -101,7 +101,7 @@ class ReferenceDataManager(Client2):
|
|
|
101
101
|
}
|
|
102
102
|
# Common population pipeline
|
|
103
103
|
col_data = populate_common_columns(element, columns_struct)
|
|
104
|
-
columns_list = col_data.get('formats', {}).get('
|
|
104
|
+
columns_list = col_data.get('formats', {}).get('attributes', [])
|
|
105
105
|
# Overlay extras (project roles) only where empty
|
|
106
106
|
|
|
107
107
|
# extra = self._extract_additional_project_properties(element, columns_struct)
|
|
@@ -113,19 +113,19 @@ class ReferenceDataManager(Client2):
|
|
|
113
113
|
def _generate_vv_def_output(self, elements: dict | list[dict], search_string: str,
|
|
114
114
|
element_type_name: str | None,
|
|
115
115
|
output_format: str = 'DICT',
|
|
116
|
-
|
|
116
|
+
report_spec: dict | str = None) -> str | list[dict]:
|
|
117
117
|
entity_type = 'ValidValueDefinition'
|
|
118
|
-
if
|
|
119
|
-
if isinstance(
|
|
120
|
-
output_formats =
|
|
121
|
-
elif isinstance(
|
|
122
|
-
output_formats =
|
|
118
|
+
if report_spec:
|
|
119
|
+
if isinstance(report_spec, str):
|
|
120
|
+
output_formats = select_report_spec(report_spec, output_format)
|
|
121
|
+
elif isinstance(report_spec, dict):
|
|
122
|
+
output_formats = get_report_spec_match(report_spec, output_format)
|
|
123
123
|
else:
|
|
124
124
|
output_formats = None
|
|
125
125
|
else:
|
|
126
|
-
output_formats =
|
|
126
|
+
output_formats = select_report_spec(entity_type, output_format)
|
|
127
127
|
if output_formats is None:
|
|
128
|
-
output_formats =
|
|
128
|
+
output_formats = select_report_spec('Default', output_format)
|
|
129
129
|
return generate_output(
|
|
130
130
|
elements=elements,
|
|
131
131
|
search_string=search_string,
|
|
@@ -150,7 +150,7 @@ class ReferenceDataManager(Client2):
|
|
|
150
150
|
ignore_case: bool = False,
|
|
151
151
|
start_from: int = 0,
|
|
152
152
|
page_size: int = 0,
|
|
153
|
-
output_format: str = "json",
|
|
153
|
+
output_format: str = "json", report_spec: str | dict = None,
|
|
154
154
|
body: dict | SearchStringRequestBody = None
|
|
155
155
|
) -> list | str:
|
|
156
156
|
""" Returns the list of valid value definitions matching the search string.
|
|
@@ -166,7 +166,7 @@ class ReferenceDataManager(Client2):
|
|
|
166
166
|
Effective time of the query. If not specified will default to any time.
|
|
167
167
|
output_format: str, default = "JSON"
|
|
168
168
|
- Type of output to return.
|
|
169
|
-
|
|
169
|
+
report_spec: dict | str, default = None
|
|
170
170
|
- Output format set to use. If None, the default output format set is used.
|
|
171
171
|
|
|
172
172
|
starts_with : bool, [default=False], optional
|
|
@@ -203,7 +203,7 @@ class ReferenceDataManager(Client2):
|
|
|
203
203
|
metadata_element_types=metadata_element_types,
|
|
204
204
|
starts_with=starts_with, ends_with=ends_with, ignore_case=ignore_case,
|
|
205
205
|
start_from=start_from, page_size=page_size,
|
|
206
|
-
output_format=output_format,
|
|
206
|
+
output_format=output_format, report_spec=report_spec,
|
|
207
207
|
body=body)
|
|
208
208
|
|
|
209
209
|
return response
|
|
@@ -217,7 +217,7 @@ class ReferenceDataManager(Client2):
|
|
|
217
217
|
ignore_case: bool = False,
|
|
218
218
|
start_from: int = 0,
|
|
219
219
|
page_size: int = 0,
|
|
220
|
-
output_format: str = "json",
|
|
220
|
+
output_format: str = "json", report_spec: str | dict = None,
|
|
221
221
|
body: dict | SearchStringRequestBody = None
|
|
222
222
|
) -> list | str:
|
|
223
223
|
|
|
@@ -268,7 +268,7 @@ class ReferenceDataManager(Client2):
|
|
|
268
268
|
start_from,
|
|
269
269
|
page_size,
|
|
270
270
|
output_format,
|
|
271
|
-
|
|
271
|
+
report_spec,
|
|
272
272
|
body,
|
|
273
273
|
)
|
|
274
274
|
)
|
|
@@ -281,7 +281,7 @@ class ReferenceDataManager(Client2):
|
|
|
281
281
|
body: dict | FilterRequestBody = None,
|
|
282
282
|
start_from: int = 0, page_size: int = 0,
|
|
283
283
|
output_format: str = 'JSON',
|
|
284
|
-
|
|
284
|
+
report_spec: str | dict = None) -> list | str:
|
|
285
285
|
url = f"{self.ref_data_command_base}/valid-value-definitions/by-name"
|
|
286
286
|
|
|
287
287
|
response = await self._async_get_name_request(url, _type="ValidValuesDefinition",
|
|
@@ -289,7 +289,7 @@ class ReferenceDataManager(Client2):
|
|
|
289
289
|
filter_string=filter_string,
|
|
290
290
|
classification_names=classification_names,
|
|
291
291
|
start_from=start_from, page_size=page_size,
|
|
292
|
-
output_format=output_format,
|
|
292
|
+
output_format=output_format, report_spec=report_spec,
|
|
293
293
|
body=body)
|
|
294
294
|
|
|
295
295
|
return response
|
|
@@ -300,7 +300,7 @@ class ReferenceDataManager(Client2):
|
|
|
300
300
|
body: dict | FilterRequestBody = None,
|
|
301
301
|
start_from: int = 0, page_size: int = 0,
|
|
302
302
|
output_format: str = 'JSON',
|
|
303
|
-
|
|
303
|
+
report_spec: str | dict = None) -> list | str:
|
|
304
304
|
|
|
305
305
|
loop = asyncio.get_event_loop()
|
|
306
306
|
resp = loop.run_until_complete(
|
|
@@ -311,7 +311,7 @@ class ReferenceDataManager(Client2):
|
|
|
311
311
|
start_from,
|
|
312
312
|
page_size,
|
|
313
313
|
output_format,
|
|
314
|
-
|
|
314
|
+
report_spec,
|
|
315
315
|
)
|
|
316
316
|
)
|
|
317
317
|
return resp
|
|
@@ -320,7 +320,7 @@ class ReferenceDataManager(Client2):
|
|
|
320
320
|
async def _async_get_valid_value_definition_by_guid(self, vv_def_guid: str, element_type: str = None,
|
|
321
321
|
body: dict | GetRequestBody = None,
|
|
322
322
|
output_format: str = 'JSON',
|
|
323
|
-
|
|
323
|
+
report_spec: str | dict = None) -> dict | str:
|
|
324
324
|
"""Return the properties of a specific project. Async version.
|
|
325
325
|
|
|
326
326
|
Parameters
|
|
@@ -333,7 +333,7 @@ class ReferenceDataManager(Client2):
|
|
|
333
333
|
full request body.
|
|
334
334
|
output_format: str, default = "JSON"
|
|
335
335
|
- one of "DICT", "MERMAID" or "JSON"
|
|
336
|
-
|
|
336
|
+
report_spec: str | dict, optional, default = None
|
|
337
337
|
The desired output columns/fields to include.
|
|
338
338
|
|
|
339
339
|
Returns
|
|
@@ -364,7 +364,7 @@ class ReferenceDataManager(Client2):
|
|
|
364
364
|
|
|
365
365
|
response = await self._async_get_guid_request(url, _type=type,
|
|
366
366
|
_gen_output=self._generate_vv_def_output,
|
|
367
|
-
output_format=output_format,
|
|
367
|
+
output_format=output_format, report_spec=report_spec,
|
|
368
368
|
body=body)
|
|
369
369
|
|
|
370
370
|
return response
|
|
@@ -373,7 +373,7 @@ class ReferenceDataManager(Client2):
|
|
|
373
373
|
def get_valid_value_definition_by_guid(self, vv_def_guid: str, element_type: str = None,
|
|
374
374
|
body: dict | GetRequestBody = None,
|
|
375
375
|
output_format: str = 'JSON',
|
|
376
|
-
|
|
376
|
+
report_spec: str | dict = None) -> dict | str:
|
|
377
377
|
"""Return the properties of a specific project.
|
|
378
378
|
|
|
379
379
|
Parameters
|
|
@@ -386,7 +386,7 @@ class ReferenceDataManager(Client2):
|
|
|
386
386
|
full request body.
|
|
387
387
|
output_format: str, default = "JSON"
|
|
388
388
|
- one of "DICT", "MERMAID" or "JSON"
|
|
389
|
-
|
|
389
|
+
report_spec: str | dict, optional, default = None
|
|
390
390
|
The desired output columns/fields to include.
|
|
391
391
|
|
|
392
392
|
Returns
|
|
@@ -418,7 +418,7 @@ class ReferenceDataManager(Client2):
|
|
|
418
418
|
"""
|
|
419
419
|
loop = asyncio.get_event_loop()
|
|
420
420
|
resp = loop.run_until_complete(
|
|
421
|
-
self._async_get_valid_value_definition_by_guid(vv_def_guid, element_type, body, output_format,
|
|
421
|
+
self._async_get_valid_value_definition_by_guid(vv_def_guid, element_type, body, output_format, report_spec)
|
|
422
422
|
)
|
|
423
423
|
|
|
424
424
|
return resp
|