pyegeria 5.4.0.dev10__py3-none-any.whl → 5.4.0.dev12__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 +6290 -6042
- commands/cat/debug_log.2025-07-01_15-22-20_102237.zip +0 -0
- commands/cat/debug_log.2025-07-04_15-43-28_460900.zip +0 -0
- commands/cat/debug_log.2025-07-06_20-48-04_338314.zip +0 -0
- commands/cat/debug_log.2025-07-09_10-17-09_526262.zip +0 -0
- commands/cat/dr_egeria_md.py +24 -14
- commands/cat/list_collections.py +11 -4
- md_processing/__init__.py +3 -1
- md_processing/data/commands.json +7842 -2231
- md_processing/md_commands/data_designer_commands.py +67 -80
- md_processing/md_commands/glossary_commands.py +3 -1
- md_processing/md_commands/product_manager_commands.py +1746 -0
- md_processing/md_commands/solution_architect_commands.py +390 -236
- md_processing/md_processing_utils/common_md_proc_utils.py +8 -6
- md_processing/md_processing_utils/md_processing_constants.py +25 -4
- pyegeria/__init__.py +1 -0
- pyegeria/_client.py +0 -1
- pyegeria/collection_manager_omvs.py +504 -546
- pyegeria/data_designer_omvs.py +16 -8
- pyegeria/egeria_tech_client.py +9 -25
- pyegeria/governance_officer_omvs.py +1446 -1343
- pyegeria/output_formatter.py +96 -8
- pyegeria/solution_architect_omvs.py +2278 -1728
- {pyegeria-5.4.0.dev10.dist-info → pyegeria-5.4.0.dev12.dist-info}/METADATA +1 -1
- {pyegeria-5.4.0.dev10.dist-info → pyegeria-5.4.0.dev12.dist-info}/RECORD +28 -25
- commands/cat/debug_log.2025-06-24_15-51-28_769553.zip +0 -0
- commands/cat/debug_log.2025-06-26_11-18-40_644650.zip +0 -0
- {pyegeria-5.4.0.dev10.dist-info → pyegeria-5.4.0.dev12.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.0.dev10.dist-info → pyegeria-5.4.0.dev12.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.0.dev10.dist-info → pyegeria-5.4.0.dev12.dist-info}/entry_points.txt +0 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
commands/cat/dr_egeria_md.py
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
"""
|
2
2
|
This is an ongoing experiment in parsing and playing with Freddie docs
|
3
3
|
"""
|
4
|
-
import os
|
4
|
+
import os
|
5
|
+
import sys
|
5
6
|
from datetime import datetime
|
7
|
+
|
6
8
|
from loguru import logger
|
9
|
+
|
7
10
|
log_format = "{time} | {level} | {function} | {line} | {message} | {extra}"
|
8
11
|
logger.remove()
|
9
|
-
logger.add(sys.stderr, level="
|
12
|
+
logger.add(sys.stderr, level="INFO", format=log_format, colorize=True)
|
10
13
|
logger.add("debug_log.log", rotation="1 day", retention="1 week", compression="zip", level="TRACE", format=log_format,
|
11
14
|
colorize=True)
|
12
15
|
import click
|
@@ -16,12 +19,13 @@ from rich.console import Console
|
|
16
19
|
from md_processing import (extract_command, process_glossary_upsert_command, process_term_upsert_command,
|
17
20
|
process_category_upsert_command, process_provenance_command, get_current_datetime_string,
|
18
21
|
process_per_proj_upsert_command, command_list, process_blueprint_upsert_command,
|
19
|
-
process_solution_component_upsert_command,
|
22
|
+
process_solution_component_upsert_command, process_component_link_unlink_command,
|
23
|
+
process_term_list_command,
|
20
24
|
process_category_list_command, process_glossary_list_command, process_term_history_command,
|
21
25
|
process_glossary_structure_command, process_term_revision_history_command,
|
22
26
|
process_create_term_term_relationship_command, process_term_details_command,
|
23
|
-
process_information_supply_chain_upsert_command,
|
24
|
-
process_information_supply_chain_link_unlink_command,process_sol_arch_list_command)
|
27
|
+
process_information_supply_chain_upsert_command,
|
28
|
+
process_information_supply_chain_link_unlink_command, process_sol_arch_list_command)
|
25
29
|
from md_processing.md_commands.data_designer_commands import (process_data_spec_upsert_command,
|
26
30
|
process_data_dict_upsert_command,
|
27
31
|
process_data_collection_list_command,
|
@@ -64,7 +68,8 @@ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_eger
|
|
64
68
|
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
65
69
|
@click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
66
70
|
@logger.catch
|
67
|
-
def process_markdown_file(input_file: str, directive: str, server: str, url: str, userid: str,
|
71
|
+
def process_markdown_file(input_file: str, directive: str, server: str, url: str, userid: str,
|
72
|
+
user_pass: str, ) -> None:
|
68
73
|
"""
|
69
74
|
Process a markdown file by parsing and executing Dr. Egeria md_commands. Write output to a new file.
|
70
75
|
"""
|
@@ -135,20 +140,24 @@ def process_markdown_file(input_file: str, directive: str, server: str, url: str
|
|
135
140
|
"Update Solution Blueprint"]:
|
136
141
|
result = process_blueprint_upsert_command(client, current_block, directive)
|
137
142
|
elif potential_command in ["View Solution Blueprints", "View Blueprint", "View Solution Blueprint"]:
|
138
|
-
result = process_sol_arch_list_command(client, current_block, "Solution Blueprints",directive)
|
143
|
+
result = process_sol_arch_list_command(client, current_block, "Solution Blueprints", directive)
|
139
144
|
elif potential_command in ["View Solution Component", "View Solution Components"]:
|
140
|
-
result = process_sol_arch_list_command(client, current_block, "Solution Components",directive)
|
145
|
+
result = process_sol_arch_list_command(client, current_block, "Solution Components", directive)
|
141
146
|
elif potential_command in ["View Solution Roles", "View Solution Role"]:
|
142
|
-
result = process_sol_arch_list_command(client, current_block, "Solution Roles",directive)
|
147
|
+
result = process_sol_arch_list_command(client, current_block, "Solution Roles", directive)
|
143
148
|
elif potential_command in ["View Information Supply Chain", "View Information Supply Chains"]:
|
144
|
-
result = process_sol_arch_list_command(client, current_block, "Information Supply Chains",directive)
|
149
|
+
result = process_sol_arch_list_command(client, current_block, "Information Supply Chains", directive)
|
145
150
|
elif potential_command in ["Create Solution Component", "Update Solution Component"]:
|
146
151
|
result = process_solution_component_upsert_command(client, current_block, directive)
|
152
|
+
elif potential_command in ["Link Solution Components", "Link Solution Component Peers", "Wire Solution Components",
|
153
|
+
"Unlink Solution Components", "Detach Solution Components", "Detach Solution Component Peers"]:
|
154
|
+
result = process_component_link_unlink_command(client, current_block, directive)
|
147
155
|
elif potential_command in ["Create Information Supply Chain", "Update Information Supply Chain"]:
|
148
156
|
result = process_information_supply_chain_upsert_command(client, current_block, directive)
|
149
|
-
|
150
|
-
|
151
|
-
|
157
|
+
|
158
|
+
elif potential_command in ["Link Information Supply Chain Peers", "Link Information Supply Chains",
|
159
|
+
"Link Supply Chains", "Unlink Information Supply Chain Peers",
|
160
|
+
"Unlink Information Supply Chains", "Unlink Supply Chains"]:
|
152
161
|
result = process_information_supply_chain_link_unlink_command(client, current_block, directive)
|
153
162
|
|
154
163
|
elif potential_command in ["Create Data Spec", "Create Data Specification", "Update Data Spec",
|
@@ -163,7 +172,8 @@ def process_markdown_file(input_file: str, directive: str, server: str, url: str
|
|
163
172
|
result = process_data_structure_upsert_command(client, current_block, directive)
|
164
173
|
elif potential_command in ["Create Data Class", "Update Data Class"]:
|
165
174
|
result = process_data_class_upsert_command(client, current_block, directive)
|
166
|
-
elif potential_command in ["View Data Dictionaries", "View Data Dictionary", "View Data Specifications",
|
175
|
+
elif potential_command in ["View Data Dictionaries", "View Data Dictionary", "View Data Specifications",
|
176
|
+
"View Data Specs"]:
|
167
177
|
result = process_data_collection_list_command(client, current_block, directive)
|
168
178
|
elif potential_command in ["View Data Structures", "View Data Structure"]:
|
169
179
|
result = process_data_structure_list_command(client, current_block, directive)
|
commands/cat/list_collections.py
CHANGED
@@ -87,14 +87,21 @@ def display_collections(
|
|
87
87
|
action = "Report"
|
88
88
|
elif output_format == "DICT":
|
89
89
|
action = "Dict"
|
90
|
+
elif output_format == "HTML":
|
91
|
+
action = "html"
|
92
|
+
elif output_format == "LIST":
|
93
|
+
action = "List"
|
90
94
|
|
91
95
|
if output_format != "TABLE":
|
92
96
|
file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH)
|
93
|
-
|
97
|
+
if output_format == "HTML":
|
98
|
+
file_name = f"Collections-{time.strftime('%Y-%m-%d-%H-%M-%S')}-{action}.html"
|
99
|
+
else:
|
100
|
+
file_name = f"Collections-{time.strftime('%Y-%m-%d-%H-%M-%S')}-{action}.md"
|
94
101
|
full_file_path = os.path.join(file_path, file_name)
|
95
102
|
os.makedirs(os.path.dirname(full_file_path), exist_ok=True)
|
96
103
|
output = m_client.find_collections(
|
97
|
-
search_string.strip(), None,
|
104
|
+
search_string.strip(), None, True, False, ignore_case=True,
|
98
105
|
output_format=output_format
|
99
106
|
)
|
100
107
|
if output == NO_ELEMENTS_FOUND:
|
@@ -129,7 +136,7 @@ def display_collections(
|
|
129
136
|
table.add_column("Members")
|
130
137
|
|
131
138
|
collections = m_client.find_collections(
|
132
|
-
search_string.strip(), None,
|
139
|
+
search_string.strip(), None, True, False, ignore_case=True,
|
133
140
|
output_format = "DICT"
|
134
141
|
)
|
135
142
|
if type(collections) is list:
|
@@ -200,7 +207,7 @@ def main():
|
|
200
207
|
search_string = Prompt.ask(
|
201
208
|
"Enter the collection you are searching for or '*' for all:", default="*"
|
202
209
|
).strip()
|
203
|
-
output_format = Prompt.ask("What output format do you want?", choices=["DICT", "TABLE", "FORM", "REPORT"], default="TABLE")
|
210
|
+
output_format = Prompt.ask("What output format do you want?", choices=["DICT", "TABLE", "FORM", "REPORT", "HTML", "LIST"], default="TABLE")
|
204
211
|
|
205
212
|
display_collections(search_string, server, url, userid, user_pass, output_format = output_format)
|
206
213
|
|
md_processing/__init__.py
CHANGED
@@ -2,10 +2,12 @@
|
|
2
2
|
This package contains functions to parse and process Egeria Markdown (Freddie)
|
3
3
|
"""
|
4
4
|
|
5
|
+
from md_processing.md_commands.product_manager_commands import (process_digital_product_upsert_command,)
|
6
|
+
|
5
7
|
from md_processing.md_commands.solution_architect_commands import (process_blueprint_upsert_command,
|
6
8
|
process_solution_component_upsert_command,
|
9
|
+
process_component_link_unlink_command,
|
7
10
|
process_information_supply_chain_upsert_command,
|
8
|
-
process_information_supply_chain_segment_upsert_command,
|
9
11
|
process_information_supply_chain_link_unlink_command,
|
10
12
|
process_sol_arch_list_command)
|
11
13
|
|