pyegeria 5.4.0.33__py3-none-any.whl → 5.4.0.34__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/.DS_Store +0 -0
- commands/cat/.DS_Store +0 -0
- commands/cat/.env +8 -0
- commands/cat/debug_log.2025-08-26_20-04-40_905576.log.zip +0 -0
- commands/cat/debug_log.2025-08-27_20-09-41_795022.log.zip +0 -0
- commands/cat/debug_log.log +898 -0
- commands/cat/list_format_set.py +4 -1
- commands/cat/logs/pyegeria.log +90 -0
- commands/cli/debug_log.log +0 -0
- commands/doc/.DS_Store +0 -0
- commands/ops/logs/pyegeria.log +0 -0
- md_processing/.DS_Store +0 -0
- md_processing/.idea/.gitignore +8 -0
- md_processing/.idea/inspectionProfiles/Project_Default.xml +59 -0
- md_processing/.idea/md_processing.iml +15 -0
- md_processing/.idea/modules.xml +8 -0
- md_processing/.idea/sonarlint/issuestore/index.pb +0 -0
- md_processing/.idea/sonarlint/securityhotspotstore/index.pb +0 -0
- md_processing/.idea/vcs.xml +6 -0
- md_processing/.idea/workspace.xml +107 -0
- md_processing/__init__.py +3 -2
- md_processing/data/commands.json +11496 -10345
- md_processing/dr_egeria.py +14 -6
- md_processing/dr_egeria_inbox/Derive-Dr-Gov-Defs.md +8 -0
- md_processing/dr_egeria_inbox/Dr.Egeria Templates.md +873 -0
- md_processing/dr_egeria_inbox/arch_test.md +57 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +254 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +696 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +254 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +298 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +608 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +94 -0
- md_processing/dr_egeria_inbox/archive/freddie_intro.md +284 -0
- md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +275 -0
- md_processing/dr_egeria_inbox/archive/test-term.md +110 -0
- md_processing/dr_egeria_inbox/cat_test.md +100 -0
- md_processing/dr_egeria_inbox/collections.md +39 -0
- md_processing/dr_egeria_inbox/data_designer_debug.log +6 -0
- md_processing/dr_egeria_inbox/data_designer_out.md +60 -0
- md_processing/dr_egeria_inbox/data_designer_search_test.md +11 -0
- md_processing/dr_egeria_inbox/data_field.md +54 -0
- md_processing/dr_egeria_inbox/data_spec.md +77 -0
- md_processing/dr_egeria_inbox/data_spec_test.md +2406 -0
- md_processing/dr_egeria_inbox/data_test.md +179 -0
- md_processing/dr_egeria_inbox/data_test2.md +429 -0
- md_processing/dr_egeria_inbox/data_test3.md +462 -0
- md_processing/dr_egeria_inbox/dr_egeria_data_designer_1.md +124 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +168 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +280 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +318 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +1073 -0
- md_processing/dr_egeria_inbox/dr_egeria_isc1.md +44 -0
- md_processing/dr_egeria_inbox/generated_help_report.md +9 -0
- md_processing/dr_egeria_inbox/glossary_list.md +5 -0
- md_processing/dr_egeria_inbox/glossary_search_test.md +40 -0
- md_processing/dr_egeria_inbox/glossary_test1.md +363 -0
- md_processing/dr_egeria_inbox/gov_def.md +482 -0
- md_processing/dr_egeria_inbox/gov_def2.md +447 -0
- md_processing/dr_egeria_inbox/img.png +0 -0
- md_processing/dr_egeria_inbox/output_tests.md +103 -0
- md_processing/dr_egeria_inbox/product.md +211 -0
- md_processing/dr_egeria_inbox/rel.md +8 -0
- md_processing/dr_egeria_inbox/sb.md +119 -0
- md_processing/dr_egeria_inbox/solution-components.md +136 -0
- md_processing/dr_egeria_inbox/solution_blueprints.md +118 -0
- md_processing/dr_egeria_inbox/synonym_test.md +42 -0
- md_processing/dr_egeria_inbox/t2.md +268 -0
- md_processing/dr_egeria_outbox/.DS_Store +0 -0
- md_processing/dr_egeria_outbox/.obsidian/app.json +1 -0
- md_processing/dr_egeria_outbox/.obsidian/appearance.json +1 -0
- md_processing/dr_egeria_outbox/.obsidian/community-plugins.json +7 -0
- md_processing/dr_egeria_outbox/.obsidian/core-plugins.json +33 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/buttons/main.js +5164 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/buttons/manifest.json +10 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/buttons/styles.css +624 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/data.json +10 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/main.js +4459 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/calendar/manifest.json +10 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/data.json +3 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/main.js +153 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/manifest.json +11 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-kanban/styles.css +1 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/main.js +500 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +12 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/obsidian-tasks-plugin/styles.css +1 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/data.json +38 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/main.js +37 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/manifest.json +11 -0
- md_processing/dr_egeria_outbox/.obsidian/plugins/templater-obsidian/styles.css +220 -0
- md_processing/dr_egeria_outbox/.obsidian/types.json +28 -0
- md_processing/dr_egeria_outbox/.obsidian/workspace.json +270 -0
- md_processing/dr_egeria_outbox/Button Test.md +11 -0
- md_processing/dr_egeria_outbox/Scripts/.DS_Store +0 -0
- md_processing/dr_egeria_outbox/Scripts/sendRest.js +24 -0
- md_processing/dr_egeria_outbox/Templates/sendToApi.md.md +17 -0
- md_processing/dr_egeria_outbox/Untitled.canvas +1 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +719 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +41 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +33 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +192 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:08-gov_def2.md +486 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-17 22:10-gov_def2.md +486 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:53-gov_def2.md +486 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 08:54-gov_def2.md +486 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:03-gov_def2.md +486 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:06-gov_def2.md +486 -0
- md_processing/dr_egeria_outbox/thursday/processed-2025-07-18 09:10-gov_def2.md +486 -0
- md_processing/md_commands/glossary_commands.py +2 -2
- md_processing/md_commands/old_project_commands.py +164 -0
- md_processing/md_commands/product_manager_commands.py +5 -5
- md_processing/md_commands/project_commands.py +368 -134
- md_processing/md_processing_utils/common_md_proc_utils.py +1 -0
- md_processing/md_processing_utils/common_md_utils.py +13 -1
- md_processing/md_processing_utils/debug_log +3 -574
- md_processing/md_processing_utils/debug_log.log +0 -0
- md_processing/md_processing_utils/determine_width.py +103 -0
- md_processing/md_processing_utils/generate_dr_help.py +44 -18
- md_processing/md_processing_utils/logs/pyegeria.log +56 -0
- md_processing/md_processing_utils/md_processing_constants.py +37 -4
- pyegeria/.DS_Store +0 -0
- pyegeria/_output_formats.py +38 -10
- pyegeria/glossary_manager.py +0 -2
- pyegeria/output_formatter.py +9 -8
- pyegeria/project_manager.py +541 -420
- {pyegeria-5.4.0.33.dist-info → pyegeria-5.4.0.34.dist-info}/METADATA +2 -1
- {pyegeria-5.4.0.33.dist-info → pyegeria-5.4.0.34.dist-info}/RECORD +129 -24
- md_processing/dr-egeria-outbox/Collections-2025-08-12-13-30-37.md +0 -163
- md_processing/dr-egeria-outbox/Collections-2025-08-12-13-35-58.md +0 -474
- md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +0 -2065
- {pyegeria-5.4.0.33.dist-info → pyegeria-5.4.0.34.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.0.33.dist-info → pyegeria-5.4.0.34.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.0.33.dist-info → pyegeria-5.4.0.34.dist-info}/entry_points.txt +0 -0
File without changes
|
@@ -0,0 +1,103 @@
|
|
1
|
+
"""
|
2
|
+
Determines the width of a markdown table
|
3
|
+
"""
|
4
|
+
|
5
|
+
import re
|
6
|
+
import html
|
7
|
+
from wcwidth import wcswidth
|
8
|
+
|
9
|
+
def split_row(line: str) -> list[str]:
|
10
|
+
s = line.strip()
|
11
|
+
if s.startswith("|"):
|
12
|
+
s = s[1:]
|
13
|
+
if s.endswith("|"):
|
14
|
+
s = s[:-1]
|
15
|
+
|
16
|
+
parts = []
|
17
|
+
cur = []
|
18
|
+
escape = False
|
19
|
+
for ch in s:
|
20
|
+
if escape:
|
21
|
+
cur.append(ch)
|
22
|
+
escape = False
|
23
|
+
elif ch == "\\":
|
24
|
+
escape = True
|
25
|
+
elif ch == "|":
|
26
|
+
parts.append("".join(cur))
|
27
|
+
cur = []
|
28
|
+
else:
|
29
|
+
cur.append(ch)
|
30
|
+
parts.append("".join(cur))
|
31
|
+
return parts
|
32
|
+
|
33
|
+
IMG_RE = re.compile(r'!\[([^\]]*)\]\([^)]+\)')
|
34
|
+
LINK_RE = re.compile(r'\[([^\]]*)\]\([^)]+\)')
|
35
|
+
CODE_TICKS_RE = re.compile(r'`([^`]*)`')
|
36
|
+
EMPH_RE = re.compile(r'(\*\*|\*|__|_)')
|
37
|
+
|
38
|
+
def visible_text(md: str) -> str:
|
39
|
+
s = md
|
40
|
+
s = IMG_RE.sub(lambda m: m.group(1), s) # images → alt
|
41
|
+
s = LINK_RE.sub(lambda m: m.group(1), s) # links → text
|
42
|
+
s = CODE_TICKS_RE.sub(lambda m: m.group(1), s) # remove backticks
|
43
|
+
s = EMPH_RE.sub("", s) # remove emphasis markers
|
44
|
+
|
45
|
+
# unescape common backslash-escapes
|
46
|
+
s = (s
|
47
|
+
.replace("\\|", "|")
|
48
|
+
.replace("\\*", "*")
|
49
|
+
.replace("\\_", "_")
|
50
|
+
.replace("\\`", "`")
|
51
|
+
.replace("\\\\", "\\"))
|
52
|
+
|
53
|
+
s = html.unescape(s) # & → &
|
54
|
+
return s.strip()
|
55
|
+
|
56
|
+
def is_alignment_row(line: str) -> bool:
|
57
|
+
parts = split_row(line)
|
58
|
+
if not parts:
|
59
|
+
return False
|
60
|
+
def is_align_cell(c: str) -> bool:
|
61
|
+
c = c.strip()
|
62
|
+
return c != "" and all(ch in ":-" for ch in c)
|
63
|
+
return all(is_align_cell(p) for p in parts)
|
64
|
+
|
65
|
+
def column_widths(md_table: str) -> list[int]:
|
66
|
+
lines = [ln for ln in md_table.splitlines() if ln.strip()]
|
67
|
+
if not lines:
|
68
|
+
return []
|
69
|
+
|
70
|
+
lines_wo_align = [ln for ln in lines if not is_alignment_row(ln)]
|
71
|
+
|
72
|
+
rows = [split_row(ln) for ln in lines_wo_align]
|
73
|
+
if not rows:
|
74
|
+
return []
|
75
|
+
|
76
|
+
max_cols = max(len(r) for r in rows)
|
77
|
+
for r in rows:
|
78
|
+
if len(r) < max_cols:
|
79
|
+
r.extend([""] * (max_cols - len(r)))
|
80
|
+
|
81
|
+
widths = [0] * max_cols
|
82
|
+
for r in rows:
|
83
|
+
for i, cell in enumerate(r):
|
84
|
+
text = visible_text(cell)
|
85
|
+
w = wcswidth(text)
|
86
|
+
if w < 0: # non-printables fallback
|
87
|
+
w = len(text)
|
88
|
+
widths[i] = max(widths[i], w)
|
89
|
+
print(widths)
|
90
|
+
return widths
|
91
|
+
|
92
|
+
# Example usage
|
93
|
+
if __name__ == "__main__":
|
94
|
+
table = """
|
95
|
+
| Attribute Name | Input Required | Read Only | Generated | Default Value | Notes | Unique Values | Valid Values |
|
96
|
+
| ------------------- | -------------- | --------- | --------- | ------------- | ----------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------- |
|
97
|
+
| Display Name | True | True | False | None | Name of the definition. | False | |
|
98
|
+
| Summary | False | True | False | None | Summary of the definition. | False | |
|
99
|
+
| Description | False | True | False | None | Description of the contents of the definition. | False | |
|
100
|
+
| Category | False | True | False | None | A user specified category name that can be used for example, to define product types or agreement types. | False | |
|
101
|
+
"""
|
102
|
+
|
103
|
+
print(column_widths(table)) # e.g., [9, 28, 36] depending on characters
|
@@ -23,7 +23,7 @@ from md_processing.md_processing_utils.md_processing_constants import (get_comma
|
|
23
23
|
from md_processing.md_processing_utils.message_constants import (ERROR, INFO, WARNING, ALWAYS, EXISTS_REQUIRED)
|
24
24
|
from pyegeria import EgeriaTech
|
25
25
|
from pyegeria._globals import DEBUG_LEVEL
|
26
|
-
from pyegeria.output_formatter import generate_entity_md_table
|
26
|
+
from pyegeria.output_formatter import generate_entity_md_table, populate_columns_from_properties
|
27
27
|
|
28
28
|
# Constants
|
29
29
|
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
@@ -69,18 +69,17 @@ def yes_no(input: str)->str:
|
|
69
69
|
@logger.catch
|
70
70
|
def _extract_help_fields(command: dict):
|
71
71
|
"""
|
72
|
-
|
72
|
+
Build a list of attribute dictionaries for a given command spec.
|
73
|
+
This prepares the data rows used to render the help table.
|
73
74
|
"""
|
74
75
|
|
75
76
|
command_spec = get_command_spec(command)
|
76
77
|
attributes = command_spec.get('Attributes', [])
|
77
|
-
command_display_name = command_spec.get('display_name', None)
|
78
|
-
command_qn_prefix = command_spec.get('qn_prefix', None)
|
79
78
|
|
80
79
|
term_entry: list = []
|
81
80
|
for attr in attributes:
|
82
81
|
for key in attr:
|
83
|
-
if attr[key].get('level','Basic') != "Basic":
|
82
|
+
if attr[key].get('level', 'Basic') != "Basic":
|
84
83
|
continue
|
85
84
|
attribute_name = key
|
86
85
|
input_required = yes_no(attr[key].get('input_required', "No"))
|
@@ -93,19 +92,41 @@ def _extract_help_fields(command: dict):
|
|
93
92
|
unique = yes_no(attr[key].get('unique', "No"))
|
94
93
|
notes = attr[key].get('description', "")
|
95
94
|
valid_values = attr[key].get('valid_values', [])
|
96
|
-
term_entry.append
|
97
|
-
'Attribute Name'
|
98
|
-
'Input Required'
|
99
|
-
'Read Only'
|
100
|
-
'Generated'
|
101
|
-
'Default Value'
|
102
|
-
'Notes'
|
103
|
-
'Unique Values'
|
104
|
-
'Valid Values'
|
105
|
-
|
95
|
+
term_entry.append({
|
96
|
+
'Attribute Name': attribute_name,
|
97
|
+
'Input Required': input_required,
|
98
|
+
'Read Only': read_only,
|
99
|
+
'Generated': generated,
|
100
|
+
'Default Value': default,
|
101
|
+
'Notes': notes,
|
102
|
+
'Unique Values': unique,
|
103
|
+
'Valid Values': valid_values,
|
104
|
+
})
|
106
105
|
|
107
106
|
return term_entry
|
108
107
|
|
108
|
+
@logger.catch
|
109
|
+
def _extract_help_function(element: dict, columns_struct: dict) -> dict:
|
110
|
+
"""
|
111
|
+
Return a populated columns data structure matching the signature and structure
|
112
|
+
of _extract_glossary_properties in glossary_manager.
|
113
|
+
|
114
|
+
Args:
|
115
|
+
element: One row (dict) describing a help attribute with keys matching columns_struct
|
116
|
+
columns_struct: Dict containing formats->columns definitions
|
117
|
+
|
118
|
+
Returns:
|
119
|
+
dict: A structure with key 'formats' and a 'columns' list whose entries have
|
120
|
+
their 'value' fields populated from the element dict.
|
121
|
+
"""
|
122
|
+
# Normalize to a shape compatible with populate_columns_from_properties
|
123
|
+
normalized = {
|
124
|
+
'properties': element or {},
|
125
|
+
'elementHeader': {},
|
126
|
+
}
|
127
|
+
col_data = populate_columns_from_properties(normalized, columns_struct)
|
128
|
+
return col_data
|
129
|
+
|
109
130
|
def create_help_terms():
|
110
131
|
term_entry:str = ""
|
111
132
|
glossary_name = "Egeria-Markdown"
|
@@ -118,6 +139,10 @@ def create_help_terms():
|
|
118
139
|
{'name': 'Notes', 'key': 'Notes'},
|
119
140
|
{'name': 'Unique Values', 'key': 'Unique Values'},
|
120
141
|
{'name': 'Valid Values', 'key': 'Valid Values'}]
|
142
|
+
columns_struct = {"target_type": "Term", "formats": {
|
143
|
+
"types": "ALL",
|
144
|
+
"columns": columns}
|
145
|
+
}
|
121
146
|
|
122
147
|
term_entry = """# Generating glossary entries for the documented commands\n\n
|
123
148
|
This file contains generated Dr.Egeria commands to generate glossary term entries describing
|
@@ -137,14 +162,15 @@ def create_help_terms():
|
|
137
162
|
term_entry+= "# Create Term\n"
|
138
163
|
term_entry+= f"## Term Name\n\n{command}\n\n"
|
139
164
|
term_entry+= f"## Description\n\n{command_description}\n\n"
|
140
|
-
term_entry+= f"##
|
141
|
-
term_entry+= f"##
|
165
|
+
term_entry+= f"## Glossary\n\n{glossary_name}\n\n"
|
166
|
+
term_entry+= f"## Folders\n\nWriting Dr.Egeria Markdown\n\n"
|
142
167
|
|
143
168
|
|
144
169
|
du = _extract_help_fields(command)
|
145
|
-
output = generate_entity_md_table(du, "", "",
|
170
|
+
output = generate_entity_md_table(du, "", "", _extract_help_function, columns_struct, None, "help" )
|
146
171
|
|
147
172
|
term_entry+= f"## Usage\n\n{output}\n\n___\n\n"
|
173
|
+
|
148
174
|
print(term_entry)
|
149
175
|
# Generate filename with current date and time in ISO 8601 format
|
150
176
|
current_datetime = get_iso8601_datetime()
|
@@ -0,0 +1,56 @@
|
|
1
|
+
2025-08-27 19:58:06 | INFO | main:407 - view server @ https://localhost:9443-{}
|
2
|
+
2025-08-27 19:58:10 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
3
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
4
|
+
2025-08-27 19:58:10 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
5
|
+
2025-08-27 19:58:10 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
6
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
7
|
+
2025-08-27 19:58:10 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
8
|
+
2025-08-27 20:01:57 | INFO | main:408 - view server @ https://localhost:9443-{}
|
9
|
+
2025-08-27 20:02:00 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
10
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
11
|
+
2025-08-27 20:02:00 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
12
|
+
2025-08-27 20:02:00 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
13
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
14
|
+
2025-08-27 20:02:00 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
15
|
+
2025-08-27 20:02:38 | INFO | main:408 - view server @ https://localhost:9443-{}
|
16
|
+
2025-08-27 20:02:41 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
17
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
18
|
+
2025-08-27 20:02:41 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
19
|
+
2025-08-27 20:02:41 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
20
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
21
|
+
2025-08-27 20:02:41 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
22
|
+
2025-08-27 20:03:21 | INFO | main:408 - view server @ https://localhost:9443-{}
|
23
|
+
2025-08-27 20:03:25 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
24
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
25
|
+
2025-08-27 20:03:25 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
26
|
+
2025-08-27 20:03:25 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
27
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
28
|
+
2025-08-27 20:03:25 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
29
|
+
2025-08-27 20:04:03 | INFO | main:408 - view server @ https://localhost:9443-{}
|
30
|
+
2025-08-27 20:04:06 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
31
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
32
|
+
2025-08-27 20:04:06 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
33
|
+
2025-08-27 20:04:06 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
34
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
35
|
+
2025-08-27 20:04:06 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
36
|
+
2025-08-27 20:05:01 | INFO | main:408 - view server @ https://localhost:9443-{}
|
37
|
+
2025-08-27 20:05:04 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
38
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
39
|
+
2025-08-27 20:05:04 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
40
|
+
2025-08-27 20:05:04 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
41
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
42
|
+
2025-08-27 20:05:04 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
43
|
+
2025-08-27 20:05:27 | INFO | main:408 - view server @ https://localhost:9443-{}
|
44
|
+
2025-08-27 20:05:30 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
45
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
46
|
+
2025-08-27 20:05:30 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
47
|
+
2025-08-27 20:05:30 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
48
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
49
|
+
2025-08-27 20:05:30 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
50
|
+
2025-08-27 20:06:00 | INFO | main:408 - view server @ https://localhost:9443-{}
|
51
|
+
2025-08-27 20:06:02 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
52
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
53
|
+
2025-08-27 20:06:02 | INFO | __init__:133 - CollectionManager initialized, platform origin is: True-{}
|
54
|
+
2025-08-27 20:06:02 | SUCCESS | get_platform_origin:368 - Got response from https://localhost:9443/open-metadata/platform-services/users/erinoverview/server-platform/origin
|
55
|
+
Response: Egeria OMAG Server Platform (version 5.4-SNAPSHOT)-{}
|
56
|
+
2025-08-27 20:06:02 | INFO | __init__:98 - GlossaryManager initialized, platform origin is: True-{}
|
@@ -126,11 +126,17 @@ COLLECTIONS_LIST = ["List Collections", "View Collections", "List Digital Produc
|
|
126
126
|
"List Naming Standard Rulesets", "View Naming Standard Rulesets",
|
127
127
|
]
|
128
128
|
|
129
|
+
PROJECT_COMMANDS = ["Create Project", "Update Project", "Create Campaign", "Update Campaign",
|
130
|
+
"Create Task", "Update Task", "Create Study Project", "Update Study Project",
|
131
|
+
"Create Personal Project", "Update Personal Project"]
|
132
|
+
|
129
133
|
command_list = ["Provenance", "Create Glossary", "Update Glossary", "Create Term", "Update Term", "List Terms",
|
130
134
|
"List Term Details", "List Glossary Terms", "List Term History", "List Term Revision History",
|
131
135
|
"List Term Update History", "List Glossary Structure", "List Glossaries", "List Categories",
|
132
|
-
"List Glossary Categories", "
|
133
|
-
"
|
136
|
+
"List Glossary Categories", "Lnk Project Dependency", "Attach Project Dependency",
|
137
|
+
"Detach Project Dependency", "Link Parent Project", "Attach Parent Project", "Detach Parent Project",
|
138
|
+
"Detach Parent Project",
|
139
|
+
"Create Solution Blueprint", "Update Solution Blueprint", "View Solution Blueprint",
|
134
140
|
"View Solution Blueprints", "View Blueprints",
|
135
141
|
"View Information Supply Chain", "View Information Supply Chains", "View Supply Chains", "View Supply Chain",
|
136
142
|
"View Solution Components", "View Solution Component", "View Solution Roles", "View Solution Role",
|
@@ -191,6 +197,7 @@ command_list.extend(GOV_COM_LIST)
|
|
191
197
|
command_list.extend(GOV_LINK_LIST)
|
192
198
|
command_list.extend(COLLECTIONS_LIST)
|
193
199
|
command_list.extend(SIMPLE_COLLECTIONS)
|
200
|
+
command_list.extend(PROJECT_COMMANDS)
|
194
201
|
command_list.extend(["Link Governance Response", "Detach Governance Response",
|
195
202
|
"Link Governance Mechanism", "Detach Governance Mechanism"])
|
196
203
|
|
@@ -226,6 +233,27 @@ def get_command_spec(command: str) -> dict | None:
|
|
226
233
|
if obj:
|
227
234
|
return COMMAND_DEFINITIONS.get('Command Specifications', {}).get(obj, None)
|
228
235
|
|
236
|
+
def does_command_match(command: str, alt_names: list[str]) -> bool:
|
237
|
+
# Define verb synonyms
|
238
|
+
verbs_synonyms = {
|
239
|
+
"Link": ["Link", "Attach", "Detach", "Unlink"],
|
240
|
+
"Create": ["Create", "Update"],
|
241
|
+
"View": ["List", "View"],
|
242
|
+
}
|
243
|
+
|
244
|
+
# Extract the verb from the command
|
245
|
+
command_parts = command.split(maxsplit=1)
|
246
|
+
if len(command_parts) < 2:
|
247
|
+
return False # Invalid command structure
|
248
|
+
verb, terms = command_parts
|
249
|
+
|
250
|
+
# Generate all possible combinations and check for a match
|
251
|
+
for primary_verb, synonyms in verbs_synonyms.items():
|
252
|
+
for synonym in synonyms:
|
253
|
+
for alt_name in alt_names:
|
254
|
+
if f"{synonym} {alt_name}" == command:
|
255
|
+
return True
|
256
|
+
return False
|
229
257
|
|
230
258
|
def find_alternate_names(command: str) -> str | None:
|
231
259
|
global COMMAND_DEFINITIONS
|
@@ -234,9 +262,14 @@ def find_alternate_names(command: str) -> str | None:
|
|
234
262
|
for key, value in comm_spec.items():
|
235
263
|
if isinstance(value, dict):
|
236
264
|
v = value.get('alternate_names', "")
|
237
|
-
if command
|
265
|
+
verb = command.split()[0] if command else ""
|
266
|
+
normalized_command = " ".join(command.split())
|
267
|
+
normalized_alternates = (" ".join(s.split()) for s in v)
|
268
|
+
if (command in v):
|
269
|
+
return key
|
270
|
+
elif does_command_match(normalized_command, normalized_alternates):
|
238
271
|
return key
|
239
|
-
|
272
|
+
return None
|
240
273
|
|
241
274
|
|
242
275
|
def get_alternate_names(command: str) -> list | None:
|
pyegeria/.DS_Store
ADDED
Binary file
|
pyegeria/_output_formats.py
CHANGED
@@ -125,7 +125,7 @@ COMMON_FORMATS_ALL = Format(
|
|
125
125
|
columns=COMMON_COLUMNS,
|
126
126
|
)
|
127
127
|
|
128
|
-
PROJECT_COLUMNS = COMMON_COLUMNS
|
128
|
+
PROJECT_COLUMNS = COMMON_COLUMNS +[
|
129
129
|
Column(name="Classifications", key='classifications'),
|
130
130
|
Column(name='Priority', key='priority'),
|
131
131
|
Column(name='Project Status', key='project_status'),
|
@@ -133,6 +133,8 @@ PROJECT_COLUMNS = COMMON_COLUMNS + [
|
|
133
133
|
Column(name='Start Date', key='start_date'),
|
134
134
|
Column(name='Assigned Actors', key='assigned_actors'),
|
135
135
|
Column(name='Resources', key='resource_list'),
|
136
|
+
Column(name="Project Roles", key='project_roles'),
|
137
|
+
Column(name="Managed Projects", key='managed_projects'),
|
136
138
|
]
|
137
139
|
|
138
140
|
GLOSSARY_COLUMNS = COMMON_COLUMNS + [
|
@@ -249,14 +251,14 @@ output_format_sets = FormatSetDict({
|
|
249
251
|
)
|
250
252
|
],
|
251
253
|
),
|
252
|
-
"
|
254
|
+
"Projects": FormatSet(
|
253
255
|
target_type="Project",
|
254
256
|
heading="Project Attributes",
|
255
257
|
description="Attributes that apply to all Projects.",
|
256
258
|
annotations={},
|
257
259
|
formats=[
|
258
260
|
Format(
|
259
|
-
types=["ALL"],
|
261
|
+
types=["ALL", "LIST"],
|
260
262
|
columns=PROJECT_COLUMNS
|
261
263
|
)
|
262
264
|
],
|
@@ -318,6 +320,32 @@ output_format_sets = FormatSetDict({
|
|
318
320
|
spec_params={},
|
319
321
|
)
|
320
322
|
),
|
323
|
+
"Help-Terms": FormatSet(
|
324
|
+
target_type="Term",
|
325
|
+
heading="Display Help for Dr.Egeria Commands",
|
326
|
+
description="Designed for help output of Dr.Egeria commands.",
|
327
|
+
annotations={"wikilinks": ["[[Help]]", "[[Dr.Egeria]]"]},
|
328
|
+
formats=[
|
329
|
+
Format(
|
330
|
+
|
331
|
+
types=["DICT", "FORM", "LIST", "TABLE"],
|
332
|
+
columns= [
|
333
|
+
Column(name='Term Name', key='display_name'),
|
334
|
+
Column(name='Description', key='description'),
|
335
|
+
Column(name="Usage", key='usage', format=True),
|
336
|
+
Column(name="Update Time", key='update_time')
|
337
|
+
|
338
|
+
|
339
|
+
],
|
340
|
+
)
|
341
|
+
],
|
342
|
+
action = ActionParameter(
|
343
|
+
function="GlossaryManager.find_glossary_terms",
|
344
|
+
required_params=["search_string"],
|
345
|
+
optional_params=OPTIONAL_PARAMS,
|
346
|
+
spec_params={},
|
347
|
+
)
|
348
|
+
),
|
321
349
|
|
322
350
|
"Collections": FormatSet(
|
323
351
|
target_type="Collection",
|
@@ -571,13 +599,13 @@ output_format_sets = FormatSetDict({
|
|
571
599
|
)
|
572
600
|
),
|
573
601
|
"Governance Policies": FormatSet(
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
602
|
+
target_type="GovernancePolicy",
|
603
|
+
heading="Governance-Definitions Information",
|
604
|
+
description="Attributes useful to Governance-Definitions.",
|
605
|
+
aliases=["GovernanceDefinitions"],
|
606
|
+
annotations={"wikilinks": ["[[Governance]]"]},
|
607
|
+
formats=[Format(types=["ALL"], columns=GOVERNANCE_DEFINITIONS_COLUMNS)],
|
608
|
+
action=ActionParameter(
|
581
609
|
function="GovernanceOfficer.find_governance_definitions",
|
582
610
|
required_params=["search_string"],
|
583
611
|
optional_params=OPTIONAL_PARAMS,
|
pyegeria/glossary_manager.py
CHANGED
pyegeria/output_formatter.py
CHANGED
@@ -5,6 +5,7 @@ from pyegeria.utils import (camel_to_title_case)
|
|
5
5
|
from markdown_it import MarkdownIt
|
6
6
|
from rich.console import Console
|
7
7
|
from loguru import logger
|
8
|
+
from pyegeria.config import settings
|
8
9
|
|
9
10
|
from pyegeria.mermaid_utilities import construct_mermaid_web
|
10
11
|
from pyegeria._output_formats import select_output_format_set, MD_SEPARATOR
|
@@ -17,7 +18,7 @@ This function and related data structures have been moved back to _output_format
|
|
17
18
|
Please import select_output_format_set from pyegeria._output_formats instead of from this module.
|
18
19
|
"""
|
19
20
|
|
20
|
-
|
21
|
+
Console = Console(width=settings.Environment.console_width)
|
21
22
|
|
22
23
|
|
23
24
|
def _extract_referenceable_properties(element: dict[str, Any]) -> dict[str, Any]:
|
@@ -526,13 +527,13 @@ def generate_entity_md_table(elements: List[Dict],
|
|
526
527
|
"""
|
527
528
|
# Handle pluralization - if entity_type ends with 'y', use 'ies' instead of 's'
|
528
529
|
target_type = columns_struct.get('target_type', entity_type)
|
529
|
-
if target_type.endswith('y'):
|
530
|
-
|
531
|
-
else:
|
532
|
-
|
530
|
+
# if target_type.endswith('y'):
|
531
|
+
# target_type = target_type.replace('y', 'ies')
|
532
|
+
# else:
|
533
|
+
# target_type = target_type.replace('s', 's')
|
533
534
|
|
534
|
-
|
535
|
-
entity_type_plural = target_type
|
535
|
+
entity_type_plural = f"{target_type[:-1]}ies" if target_type.endswith('y') else f"{target_type}s"
|
536
|
+
# entity_type_plural = target_type
|
536
537
|
columns = columns_struct['formats'].get('columns', [])
|
537
538
|
heading = columns_struct.get("heading")
|
538
539
|
if heading == "Default Base Attributes":
|
@@ -556,7 +557,7 @@ def generate_entity_md_table(elements: List[Dict],
|
|
556
557
|
|
557
558
|
# Add rows
|
558
559
|
for element in elements:
|
559
|
-
guid = element.get('elementHeader', {}).get('guid')
|
560
|
+
guid = element.get('elementHeader', {}).get('guid', None)
|
560
561
|
|
561
562
|
# Extractor returns columns_struct with values when possible
|
562
563
|
try:
|