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/output_formatter.py
CHANGED
|
@@ -8,14 +8,14 @@ from loguru import logger
|
|
|
8
8
|
from pyegeria.config import settings
|
|
9
9
|
|
|
10
10
|
from pyegeria.mermaid_utilities import construct_mermaid_web
|
|
11
|
-
from pyegeria.
|
|
11
|
+
from pyegeria.base_report_formats import select_report_format, MD_SEPARATOR, get_report_spec_match
|
|
12
12
|
from pyegeria.models import to_camel_case
|
|
13
13
|
|
|
14
14
|
"""
|
|
15
|
-
Note on
|
|
15
|
+
Note on select_report_spec function:
|
|
16
16
|
|
|
17
17
|
This function and related data structures have been moved back to _output_formats.py.
|
|
18
|
-
Please import
|
|
18
|
+
Please import select_report_spec from pyegeria._output_formats instead of from this module.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
console = Console(width=settings.Environment.console_width)
|
|
@@ -237,7 +237,7 @@ def populate_columns_from_properties(element: dict, columns_struct: dict) -> dic
|
|
|
237
237
|
Populate a columns_struct with values from the element's properties.
|
|
238
238
|
|
|
239
239
|
The element dict is expected to have a nested 'properties' dict whose keys are in camelCase.
|
|
240
|
-
The columns_struct is expected to follow the format returned by
|
|
240
|
+
The columns_struct is expected to follow the format returned by select_report_spec, where
|
|
241
241
|
columns are located at columns_struct['formats']['columns'] and each column is a dict containing
|
|
242
242
|
at least a 'key' field expressed in snake_case. For each column whose snake_case key corresponds
|
|
243
243
|
to a key in the element properties (after converting to camelCase), this function adds a 'value'
|
|
@@ -258,9 +258,9 @@ def populate_columns_from_properties(element: dict, columns_struct: dict) -> dic
|
|
|
258
258
|
if not isinstance(props, dict):
|
|
259
259
|
return columns_struct
|
|
260
260
|
|
|
261
|
-
# Get the
|
|
261
|
+
# Get the attributes list if present
|
|
262
262
|
formats = columns_struct.get('formats') or {}
|
|
263
|
-
columns = formats.get('
|
|
263
|
+
columns = formats.get('attributes') if isinstance(formats, dict) else None
|
|
264
264
|
if not isinstance(columns, list):
|
|
265
265
|
return columns_struct
|
|
266
266
|
|
|
@@ -306,7 +306,7 @@ def get_required_relationships(element: dict, columns_struct: dict) -> dict:
|
|
|
306
306
|
return columns_struct
|
|
307
307
|
|
|
308
308
|
formats = columns_struct.get('formats') or {}
|
|
309
|
-
columns = formats.get('
|
|
309
|
+
columns = formats.get('attributes') if isinstance(formats, dict) else None
|
|
310
310
|
if not isinstance(columns, list):
|
|
311
311
|
return columns_struct
|
|
312
312
|
|
|
@@ -403,10 +403,10 @@ def generate_entity_md(elements: List[Dict],
|
|
|
403
403
|
"""
|
|
404
404
|
heading = columns_struct.get("heading")
|
|
405
405
|
if heading == "Default Base Attributes":
|
|
406
|
-
elements_md = "## Reporting on Default Base Attributes - Perhaps couldn't find a valid combination of
|
|
406
|
+
elements_md = "## Reporting on Default Base Attributes - Perhaps couldn't find a valid combination of report_spec and output_format?\n\n"
|
|
407
407
|
else:
|
|
408
408
|
elements_md = ""
|
|
409
|
-
base_columns = columns_struct['formats'].get('
|
|
409
|
+
base_columns = columns_struct['formats'].get('attributes') if columns_struct else None
|
|
410
410
|
|
|
411
411
|
for element in elements:
|
|
412
412
|
if element is None:
|
|
@@ -437,7 +437,7 @@ def generate_entity_md(elements: List[Dict],
|
|
|
437
437
|
# Determine display name
|
|
438
438
|
display_name = None
|
|
439
439
|
if returned_struct is not None:
|
|
440
|
-
cols = returned_struct.get('formats', {}).get('
|
|
440
|
+
cols = returned_struct.get('formats', {}).get('attributes', [])
|
|
441
441
|
# Find value from 'display_name' or 'title'
|
|
442
442
|
for col in cols:
|
|
443
443
|
if col.get('key') in ('display_name', 'title'):
|
|
@@ -461,7 +461,7 @@ def generate_entity_md(elements: List[Dict],
|
|
|
461
461
|
|
|
462
462
|
# Add attributes based on column spec if available, otherwise, add all (legacy)
|
|
463
463
|
if returned_struct is not None:
|
|
464
|
-
cols = returned_struct.get('formats', {}).get('
|
|
464
|
+
cols = returned_struct.get('formats', {}).get('attributes', [])
|
|
465
465
|
for column in cols:
|
|
466
466
|
name = column.get('name')
|
|
467
467
|
key = column.get('key')
|
|
@@ -536,10 +536,10 @@ def generate_entity_md_table(elements: List[Dict],
|
|
|
536
536
|
|
|
537
537
|
entity_type_plural = f"{target_type[:-1]}ies" if target_type.endswith('y') else f"{target_type}s"
|
|
538
538
|
# entity_type_plural = target_type
|
|
539
|
-
columns = columns_struct['formats'].get('
|
|
539
|
+
columns = columns_struct['formats'].get('attributes', [])
|
|
540
540
|
heading = columns_struct.get("heading")
|
|
541
541
|
if heading == "Default Base Attributes":
|
|
542
|
-
elements_md = "## Reporting on Default Base Attributes - Perhaps couldn't find a valid combination of
|
|
542
|
+
elements_md = "## Reporting on Default Base Attributes - Perhaps couldn't find a valid combination of report_spec and output_format?\n\n"
|
|
543
543
|
else:
|
|
544
544
|
elements_md = ""
|
|
545
545
|
|
|
@@ -569,7 +569,7 @@ def generate_entity_md_table(elements: List[Dict],
|
|
|
569
569
|
|
|
570
570
|
# For help mode, bypass extraction
|
|
571
571
|
if output_format == "help":
|
|
572
|
-
returned_struct = {"formats": {"
|
|
572
|
+
returned_struct = {"formats": {"attributes": columns}}
|
|
573
573
|
|
|
574
574
|
# Additional props (if any)
|
|
575
575
|
additional_props = {}
|
|
@@ -579,7 +579,7 @@ def generate_entity_md_table(elements: List[Dict],
|
|
|
579
579
|
# Build row
|
|
580
580
|
row = "| "
|
|
581
581
|
if returned_struct is not None:
|
|
582
|
-
for column in returned_struct.get('formats', {}).get('
|
|
582
|
+
for column in returned_struct.get('formats', {}).get('attributes', []):
|
|
583
583
|
key = column.get('key')
|
|
584
584
|
value = column.get('value')
|
|
585
585
|
if (value in (None, "")) and key in additional_props:
|
|
@@ -654,9 +654,9 @@ def generate_entity_dict(elements: List[Dict],
|
|
|
654
654
|
# Create entity dictionary
|
|
655
655
|
entity_dict = {}
|
|
656
656
|
|
|
657
|
-
columns = columns_struct['formats'].get('
|
|
657
|
+
columns = columns_struct['formats'].get('attributes', None) if columns_struct else None
|
|
658
658
|
if returned_struct is not None:
|
|
659
|
-
for column in returned_struct.get('formats', {}).get('
|
|
659
|
+
for column in returned_struct.get('formats', {}).get('attributes', []):
|
|
660
660
|
key = column.get('key')
|
|
661
661
|
name = column.get('name')
|
|
662
662
|
value = column.get('value')
|
|
@@ -725,29 +725,41 @@ def generate_entity_dict(elements: List[Dict],
|
|
|
725
725
|
|
|
726
726
|
def resolve_output_formats(entity_type: str,
|
|
727
727
|
output_format: str,
|
|
728
|
-
|
|
729
|
-
default_label: Optional[str] = None
|
|
728
|
+
report_spec: Optional[Union[str, dict]] = None,
|
|
729
|
+
default_label: Optional[str] = None,
|
|
730
|
+
**kwargs) -> Optional[dict]:
|
|
730
731
|
"""
|
|
731
|
-
Resolve
|
|
732
|
+
Resolve a report format structure given an entity type, the desired output format
|
|
732
733
|
(e.g., DICT, LIST, MD, REPORT, FORM), and either a label (str) or a dict of format sets.
|
|
733
734
|
|
|
735
|
+
Backward compatibility:
|
|
736
|
+
- Accepts legacy kwarg 'report_spec' and treats it as report_spec.
|
|
737
|
+
|
|
734
738
|
Selection order:
|
|
735
|
-
- If
|
|
736
|
-
- If
|
|
739
|
+
- If report_spec is a str: select by label.
|
|
740
|
+
- If report_spec is a dict: use get_report_spec_match to pick a matching format.
|
|
737
741
|
- Else: try selecting by entity_type or default_label.
|
|
738
742
|
- Fallback: select "Default".
|
|
739
743
|
"""
|
|
740
|
-
from pyegeria.
|
|
744
|
+
from pyegeria.base_report_formats import get_report_spec_match
|
|
745
|
+
|
|
746
|
+
if report_spec is None and isinstance(kwargs, dict):
|
|
747
|
+
if 'report_spec' in kwargs:
|
|
748
|
+
report_spec = kwargs.get('report_spec')
|
|
749
|
+
elif 'report_format' in kwargs:
|
|
750
|
+
report_spec = kwargs.get('report_format')
|
|
751
|
+
elif 'output_format_spec' in kwargs:
|
|
752
|
+
report_spec = kwargs.get('output_format_spec')
|
|
741
753
|
|
|
742
|
-
if isinstance(
|
|
743
|
-
return
|
|
744
|
-
if isinstance(
|
|
745
|
-
return
|
|
754
|
+
if isinstance(report_spec, str):
|
|
755
|
+
return select_report_format(report_spec, output_format)
|
|
756
|
+
if isinstance(report_spec, dict):
|
|
757
|
+
return get_report_spec_match(report_spec, output_format)
|
|
746
758
|
|
|
747
759
|
label = default_label or entity_type
|
|
748
|
-
fmt =
|
|
760
|
+
fmt = select_report_format(label, output_format)
|
|
749
761
|
if fmt is None:
|
|
750
|
-
fmt =
|
|
762
|
+
fmt = select_report_format("Default", output_format)
|
|
751
763
|
return fmt
|
|
752
764
|
|
|
753
765
|
|
|
@@ -758,7 +770,7 @@ def overlay_additional_values(columns_struct: dict, extra: Optional[dict]) -> di
|
|
|
758
770
|
"""
|
|
759
771
|
if not isinstance(columns_struct, dict) or not extra:
|
|
760
772
|
return columns_struct
|
|
761
|
-
columns = columns_struct.get('formats', {}).get('
|
|
773
|
+
columns = columns_struct.get('formats', {}).get('attributes')
|
|
762
774
|
if not isinstance(columns, list):
|
|
763
775
|
return columns_struct
|
|
764
776
|
for col in columns:
|
|
@@ -795,7 +807,7 @@ def populate_common_columns(
|
|
|
795
807
|
"""
|
|
796
808
|
# 1) Base properties
|
|
797
809
|
col_data = populate_columns_from_properties(element, columns_struct)
|
|
798
|
-
columns_list = col_data.get('formats', {}).get('
|
|
810
|
+
columns_list = col_data.get('formats', {}).get('attributes', [])
|
|
799
811
|
|
|
800
812
|
# 2) Header overlay
|
|
801
813
|
header_props = _extract_referenceable_properties(element) if include_header else {}
|
|
@@ -925,7 +937,7 @@ def _extract_default_properties(self, element: dict, columns_struct: dict) -> di
|
|
|
925
937
|
}
|
|
926
938
|
# Common population pipeline
|
|
927
939
|
col_data = populate_common_columns(element, columns_struct)
|
|
928
|
-
columns_list = col_data.get('formats', {}).get('
|
|
940
|
+
columns_list = col_data.get('formats', {}).get('attributes', [])
|
|
929
941
|
|
|
930
942
|
return col_data
|
|
931
943
|
|
|
@@ -933,19 +945,23 @@ def _extract_default_properties(self, element: dict, columns_struct: dict) -> di
|
|
|
933
945
|
def _generate_default_output(self, elements: dict | list[dict], search_string: str,
|
|
934
946
|
element_type_name: str | None,
|
|
935
947
|
output_format: str = 'DICT',
|
|
936
|
-
|
|
948
|
+
report_format: dict | str | None = None,
|
|
949
|
+
**kwargs) -> str | list[dict]:
|
|
937
950
|
entity_type = 'Referenceable'
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
951
|
+
# Backward compatibility: accept legacy kwarg
|
|
952
|
+
if report_format is None and isinstance(kwargs, dict) and 'report_spec' in kwargs:
|
|
953
|
+
report_format = kwargs.get('report_spec')
|
|
954
|
+
if report_format:
|
|
955
|
+
if isinstance(report_format, str):
|
|
956
|
+
output_formats = select_report_format(report_format, output_format)
|
|
957
|
+
elif isinstance(report_format, dict):
|
|
958
|
+
output_formats = get_report_spec_match(report_format, output_format)
|
|
943
959
|
else:
|
|
944
960
|
output_formats = None
|
|
945
961
|
else:
|
|
946
|
-
output_formats =
|
|
962
|
+
output_formats = select_report_format(entity_type, output_format)
|
|
947
963
|
if output_formats is None:
|
|
948
|
-
output_formats =
|
|
964
|
+
output_formats = select_report_format('Default', output_format)
|
|
949
965
|
return generate_output(
|
|
950
966
|
elements=elements,
|
|
951
967
|
search_string=search_string,
|
|
@@ -979,11 +995,11 @@ def generate_output(elements: Union[Dict, List[Dict]],
|
|
|
979
995
|
Returns:
|
|
980
996
|
Formatted output as string or list of dictionaries
|
|
981
997
|
"""
|
|
982
|
-
columns = columns_struct['formats'].get('
|
|
998
|
+
columns = columns_struct['formats'].get('attributes',None) if columns_struct else None
|
|
983
999
|
if not columns:
|
|
984
|
-
columns_struct =
|
|
1000
|
+
columns_struct = select_report_format("Default",output_format)
|
|
985
1001
|
if columns_struct:
|
|
986
|
-
columns = columns_struct.get('formats', {}).get('
|
|
1002
|
+
columns = columns_struct.get('formats', {}).get('attributes', None)
|
|
987
1003
|
|
|
988
1004
|
target_type = columns_struct.get('target_type', entity_type) if columns_struct else entity_type
|
|
989
1005
|
if target_type is None:
|
pyegeria/platform_services.py
CHANGED
|
@@ -12,7 +12,8 @@ import json
|
|
|
12
12
|
|
|
13
13
|
import httpx
|
|
14
14
|
|
|
15
|
-
from pyegeria._client_new import Client2
|
|
15
|
+
from pyegeria._client_new import Client2
|
|
16
|
+
from pyegeria._globals import enable_ssl_check
|
|
16
17
|
from pyegeria._exceptions import (
|
|
17
18
|
InvalidParameterException,
|
|
18
19
|
OMAGCommonErrorCode,
|
pyegeria/project_manager.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,
|
|
@@ -50,7 +50,7 @@ class ProjectManager(Client2):
|
|
|
50
50
|
|
|
51
51
|
Notes
|
|
52
52
|
-----
|
|
53
|
-
- Most high-level list/report methods accept an `output_format` and an optional `
|
|
53
|
+
- Most high-level list/report methods accept an `output_format` and an optional `report_spec` and
|
|
54
54
|
delegate rendering to `pyegeria.output_formatter.generate_output` along with shared helpers such as
|
|
55
55
|
`populate_common_columns`.
|
|
56
56
|
- Private extractor methods follow the convention: `_extract_<entity>_properties(element, columns_struct)` and
|
|
@@ -79,7 +79,7 @@ class ProjectManager(Client2):
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
roles_required = any(column.get('key') == 'project_roles'
|
|
82
|
-
for column in columns_struct.get('formats', {}).get('
|
|
82
|
+
for column in columns_struct.get('formats', {}).get('attributes', []))
|
|
83
83
|
project_props = {}
|
|
84
84
|
|
|
85
85
|
if roles_required:
|
|
@@ -104,7 +104,7 @@ class ProjectManager(Client2):
|
|
|
104
104
|
}
|
|
105
105
|
# Common population pipeline
|
|
106
106
|
col_data = populate_common_columns(element, columns_struct)
|
|
107
|
-
columns_list = col_data.get('formats', {}).get('
|
|
107
|
+
columns_list = col_data.get('formats', {}).get('attributes', [])
|
|
108
108
|
# Overlay extras (project roles) only where empty
|
|
109
109
|
extra = self._extract_additional_project_properties(element, columns_struct)
|
|
110
110
|
col_data = overlay_additional_values(col_data, extra)
|
|
@@ -114,19 +114,19 @@ class ProjectManager(Client2):
|
|
|
114
114
|
def _generate_project_output(self, elements: dict | list[dict], search_string: str,
|
|
115
115
|
element_type_name: str | None,
|
|
116
116
|
output_format: str = 'DICT',
|
|
117
|
-
|
|
117
|
+
report_spec: dict | str = None) -> str | list[dict]:
|
|
118
118
|
entity_type = 'Project'
|
|
119
|
-
if
|
|
120
|
-
if isinstance(
|
|
121
|
-
output_formats =
|
|
122
|
-
elif isinstance(
|
|
123
|
-
output_formats =
|
|
119
|
+
if report_spec:
|
|
120
|
+
if isinstance(report_spec, str):
|
|
121
|
+
output_formats = select_report_spec(report_spec, output_format)
|
|
122
|
+
elif isinstance(report_spec, dict):
|
|
123
|
+
output_formats = get_report_spec_match(report_spec, output_format)
|
|
124
124
|
else:
|
|
125
125
|
output_formats = None
|
|
126
126
|
else:
|
|
127
|
-
output_formats =
|
|
127
|
+
output_formats = select_report_spec(entity_type, output_format)
|
|
128
128
|
if output_formats is None:
|
|
129
|
-
output_formats =
|
|
129
|
+
output_formats = select_report_spec('Default', output_format)
|
|
130
130
|
return generate_output(
|
|
131
131
|
elements=elements,
|
|
132
132
|
search_string=search_string,
|
|
@@ -146,7 +146,7 @@ class ProjectManager(Client2):
|
|
|
146
146
|
parent_guid: str,
|
|
147
147
|
body: dict | GetRequestBody = None,
|
|
148
148
|
output_format: str = 'JSON',
|
|
149
|
-
|
|
149
|
+
report_spec: str | dict = None,
|
|
150
150
|
) -> list | str:
|
|
151
151
|
"""Returns the list of projects that are linked off of the supplied element. Any relationship will do.
|
|
152
152
|
The request body is optional, but if supplied acts as a filter on project status. Async version.
|
|
@@ -159,7 +159,7 @@ class ProjectManager(Client2):
|
|
|
159
159
|
Optionally, filter results by project status.
|
|
160
160
|
output_format: str, default = "JSON"
|
|
161
161
|
- Type of output to return.
|
|
162
|
-
|
|
162
|
+
report_spec: dict | str, default = None
|
|
163
163
|
- Output format set to use. If None, the default output format set is used.
|
|
164
164
|
|
|
165
165
|
start_from: int, [default=0], optional
|
|
@@ -193,7 +193,7 @@ class ProjectManager(Client2):
|
|
|
193
193
|
response = await self._async_get_guid_request(url, "Project", self._extract_project_properties,
|
|
194
194
|
body=body,
|
|
195
195
|
output_format=output_format,
|
|
196
|
-
|
|
196
|
+
report_spec=report_spec)
|
|
197
197
|
return response
|
|
198
198
|
|
|
199
199
|
@dynamic_catch
|
|
@@ -202,7 +202,7 @@ class ProjectManager(Client2):
|
|
|
202
202
|
parent_guid: str,
|
|
203
203
|
body: dict | GetRequestBody = None,
|
|
204
204
|
output_format: str = 'JSON',
|
|
205
|
-
|
|
205
|
+
report_spec: str | dict = None) -> str | dict:
|
|
206
206
|
|
|
207
207
|
"""Returns the list of projects that are linked off of the supplied element. Any relationship will do.
|
|
208
208
|
The request body is optional, but if supplied acts as a filter on project status.
|
|
@@ -217,7 +217,7 @@ class ProjectManager(Client2):
|
|
|
217
217
|
Time at which to query for projects. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
|
218
218
|
output_format: str, default = "JSON"
|
|
219
219
|
- Type of output to return.
|
|
220
|
-
|
|
220
|
+
report_spec: dict | str, default = None
|
|
221
221
|
- Output format set to use. If None, the default output format set is used.
|
|
222
222
|
|
|
223
223
|
start_from: int, [default=0], optional
|
|
@@ -248,7 +248,7 @@ class ProjectManager(Client2):
|
|
|
248
248
|
parent_guid,
|
|
249
249
|
body,
|
|
250
250
|
output_format,
|
|
251
|
-
|
|
251
|
+
report_spec
|
|
252
252
|
)
|
|
253
253
|
)
|
|
254
254
|
return resp
|
|
@@ -260,7 +260,7 @@ class ProjectManager(Client2):
|
|
|
260
260
|
start_from: int = 0,
|
|
261
261
|
page_size: int = 0,
|
|
262
262
|
output_format: str = 'JSON',
|
|
263
|
-
|
|
263
|
+
report_spec: str | dict = None,
|
|
264
264
|
body: dict | GetRequestBody = None,) -> str | dict:
|
|
265
265
|
|
|
266
266
|
"""Returns the list of projects with a particular classification. The name of the classification is
|
|
@@ -303,7 +303,7 @@ class ProjectManager(Client2):
|
|
|
303
303
|
filter_string = project_classification, start_from=start_from,
|
|
304
304
|
page_size=page_size, body=body,
|
|
305
305
|
output_format=output_format,
|
|
306
|
-
|
|
306
|
+
report_spec=report_spec)
|
|
307
307
|
return response
|
|
308
308
|
|
|
309
309
|
@dynamic_catch
|
|
@@ -313,7 +313,7 @@ class ProjectManager(Client2):
|
|
|
313
313
|
start_from: int = 0,
|
|
314
314
|
page_size: int = 0,
|
|
315
315
|
output_format: str = 'JSON',
|
|
316
|
-
|
|
316
|
+
report_spec: str | dict = None,
|
|
317
317
|
body: dict | GetRequestBody = None,
|
|
318
318
|
) -> str | dict:
|
|
319
319
|
"""Returns the list of projects with a particular classification. The name of the classification is
|
|
@@ -355,7 +355,7 @@ class ProjectManager(Client2):
|
|
|
355
355
|
start_from,page_size,
|
|
356
356
|
|
|
357
357
|
output_format,
|
|
358
|
-
|
|
358
|
+
report_spec,
|
|
359
359
|
body
|
|
360
360
|
)
|
|
361
361
|
)
|
|
@@ -370,7 +370,7 @@ class ProjectManager(Client2):
|
|
|
370
370
|
ignore_case: bool = False,
|
|
371
371
|
start_from: int = 0,
|
|
372
372
|
page_size: int = 0,
|
|
373
|
-
output_format: str = "json",
|
|
373
|
+
output_format: str = "json", report_spec: str | dict = None,
|
|
374
374
|
body: dict | SearchStringRequestBody = None
|
|
375
375
|
) -> list | str:
|
|
376
376
|
"""Returns the list of projects matching the search string.
|
|
@@ -420,13 +420,13 @@ class ProjectManager(Client2):
|
|
|
420
420
|
)
|
|
421
421
|
|
|
422
422
|
response = await self._async_find_request(url, _type="Project",
|
|
423
|
-
_gen_output=self.
|
|
423
|
+
_gen_output=self._generate_comment_output,
|
|
424
424
|
search_string=search_string,
|
|
425
425
|
classification_names=classification_names,
|
|
426
426
|
metadata_element_types=metadata_element_types,
|
|
427
427
|
starts_with=starts_with, ends_with=ends_with, ignore_case=ignore_case,
|
|
428
428
|
start_from=start_from, page_size=page_size,
|
|
429
|
-
output_format=output_format,
|
|
429
|
+
output_format=output_format, report_spec=report_spec,
|
|
430
430
|
body=body)
|
|
431
431
|
|
|
432
432
|
return response
|
|
@@ -440,7 +440,7 @@ class ProjectManager(Client2):
|
|
|
440
440
|
ignore_case: bool = False,
|
|
441
441
|
start_from: int = 0,
|
|
442
442
|
page_size: int = 0,
|
|
443
|
-
output_format: str = "json",
|
|
443
|
+
output_format: str = "json", report_spec: str | dict = None,
|
|
444
444
|
body: dict | SearchStringRequestBody = None
|
|
445
445
|
) -> list | str:
|
|
446
446
|
|
|
@@ -495,7 +495,7 @@ class ProjectManager(Client2):
|
|
|
495
495
|
start_from,
|
|
496
496
|
page_size,
|
|
497
497
|
output_format,
|
|
498
|
-
|
|
498
|
+
report_spec,
|
|
499
499
|
body,
|
|
500
500
|
)
|
|
501
501
|
)
|
|
@@ -508,15 +508,15 @@ class ProjectManager(Client2):
|
|
|
508
508
|
body: dict | FilterRequestBody = None,
|
|
509
509
|
start_from: int = 0, page_size: int = 0,
|
|
510
510
|
output_format: str = 'JSON',
|
|
511
|
-
|
|
511
|
+
report_spec: str | dict = None) -> list | str:
|
|
512
512
|
url = f"{self.project_command_base}/by-name"
|
|
513
513
|
|
|
514
514
|
response = await self._async_get_name_request(url, _type="Projects",
|
|
515
|
-
_gen_output=self.
|
|
515
|
+
_gen_output=self._generate_comment_output,
|
|
516
516
|
filter_string=filter_string,
|
|
517
517
|
classification_names=classification_names,
|
|
518
518
|
start_from=start_from, page_size=page_size,
|
|
519
|
-
output_format=output_format,
|
|
519
|
+
output_format=output_format, report_spec=report_spec,
|
|
520
520
|
body=body)
|
|
521
521
|
|
|
522
522
|
return response
|
|
@@ -527,7 +527,7 @@ class ProjectManager(Client2):
|
|
|
527
527
|
body: dict | FilterRequestBody = None,
|
|
528
528
|
start_from: int = 0, page_size: int = 0,
|
|
529
529
|
output_format: str = 'JSON',
|
|
530
|
-
|
|
530
|
+
report_spec: str | dict = None) -> list | str:
|
|
531
531
|
|
|
532
532
|
loop = asyncio.get_event_loop()
|
|
533
533
|
resp = loop.run_until_complete(
|
|
@@ -538,7 +538,7 @@ class ProjectManager(Client2):
|
|
|
538
538
|
start_from,
|
|
539
539
|
page_size,
|
|
540
540
|
output_format,
|
|
541
|
-
|
|
541
|
+
report_spec,
|
|
542
542
|
)
|
|
543
543
|
)
|
|
544
544
|
return resp
|
|
@@ -547,7 +547,7 @@ class ProjectManager(Client2):
|
|
|
547
547
|
async def _async_get_project_by_guid(self, project_guid: str, element_type: str = None,
|
|
548
548
|
body: dict | GetRequestBody = None,
|
|
549
549
|
output_format: str = 'JSON',
|
|
550
|
-
|
|
550
|
+
report_spec: str | dict = None) -> dict | str:
|
|
551
551
|
"""Return the properties of a specific project. Async version.
|
|
552
552
|
|
|
553
553
|
Parameters
|
|
@@ -560,7 +560,7 @@ class ProjectManager(Client2):
|
|
|
560
560
|
full request body.
|
|
561
561
|
output_format: str, default = "JSON"
|
|
562
562
|
- one of "DICT", "MERMAID" or "JSON"
|
|
563
|
-
|
|
563
|
+
report_spec: str | dict, optional, default = None
|
|
564
564
|
The desired output columns/fields to include.
|
|
565
565
|
|
|
566
566
|
Returns
|
|
@@ -596,8 +596,8 @@ class ProjectManager(Client2):
|
|
|
596
596
|
type = element_type if element_type else "Collection"
|
|
597
597
|
|
|
598
598
|
response = await self._async_get_guid_request(url, _type=type,
|
|
599
|
-
_gen_output=self.
|
|
600
|
-
output_format=output_format,
|
|
599
|
+
_gen_output=self._generate_comment_output,
|
|
600
|
+
output_format=output_format, report_spec=report_spec,
|
|
601
601
|
body=body)
|
|
602
602
|
|
|
603
603
|
return response
|
|
@@ -606,7 +606,7 @@ class ProjectManager(Client2):
|
|
|
606
606
|
def get_project_by_guid(self, project_guid: str, element_type: str = None,
|
|
607
607
|
body: dict | GetRequestBody = None,
|
|
608
608
|
output_format: str = 'JSON',
|
|
609
|
-
|
|
609
|
+
report_spec: str | dict = None) -> dict | str:
|
|
610
610
|
"""Return the properties of a specific project.
|
|
611
611
|
|
|
612
612
|
Parameters
|
|
@@ -619,7 +619,7 @@ class ProjectManager(Client2):
|
|
|
619
619
|
full request body.
|
|
620
620
|
output_format: str, default = "JSON"
|
|
621
621
|
- one of "DICT", "MERMAID" or "JSON"
|
|
622
|
-
|
|
622
|
+
report_spec: str | dict, optional, default = None
|
|
623
623
|
The desired output columns/fields to include.
|
|
624
624
|
|
|
625
625
|
Returns
|
|
@@ -651,7 +651,7 @@ class ProjectManager(Client2):
|
|
|
651
651
|
"""
|
|
652
652
|
loop = asyncio.get_event_loop()
|
|
653
653
|
resp = loop.run_until_complete(
|
|
654
|
-
self._async_get_project_by_guid(project_guid, element_type, body, output_format,
|
|
654
|
+
self._async_get_project_by_guid(project_guid, element_type, body, output_format, report_spec)
|
|
655
655
|
)
|
|
656
656
|
|
|
657
657
|
return resp
|
|
@@ -663,7 +663,7 @@ class ProjectManager(Client2):
|
|
|
663
663
|
element_type: str = None,
|
|
664
664
|
body: dict | GetRequestBody = None,
|
|
665
665
|
output_format: str = 'JSON',
|
|
666
|
-
|
|
666
|
+
report_spec: str | dict = None,
|
|
667
667
|
) -> dict | str:
|
|
668
668
|
"""Return the mermaid graph of a specific project. Async version.
|
|
669
669
|
|
|
@@ -695,8 +695,8 @@ class ProjectManager(Client2):
|
|
|
695
695
|
f"ojects/{project_guid}/graph")
|
|
696
696
|
|
|
697
697
|
response = await self._async_get_guid_request(url, _type=element_type,
|
|
698
|
-
_gen_output=self.
|
|
699
|
-
output_format=output_format,
|
|
698
|
+
_gen_output=self._generate_comment_output,
|
|
699
|
+
output_format=output_format, report_spec=report_spec,
|
|
700
700
|
body=body)
|
|
701
701
|
|
|
702
702
|
return response
|
|
@@ -708,7 +708,7 @@ class ProjectManager(Client2):
|
|
|
708
708
|
element_type: str = None,
|
|
709
709
|
body: dict | GetRequestBody = None,
|
|
710
710
|
output_format: str = 'JSON',
|
|
711
|
-
|
|
711
|
+
report_spec: str | dict = None,
|
|
712
712
|
) -> dict | str:
|
|
713
713
|
"""Return the mermaid graph of a specific project. Async version.
|
|
714
714
|
|
|
@@ -737,7 +737,7 @@ class ProjectManager(Client2):
|
|
|
737
737
|
"""
|
|
738
738
|
loop = asyncio.get_event_loop()
|
|
739
739
|
resp = loop.run_until_complete(
|
|
740
|
-
self._async_get_project_graph(project_guid, element_type, body, output_format,
|
|
740
|
+
self._async_get_project_graph(project_guid, element_type, body, output_format, report_spec)
|
|
741
741
|
)
|
|
742
742
|
|
|
743
743
|
return resp
|