pyegeria 5.4.0.dev13__py3-none-any.whl → 5.4.0.dev14__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 +2802 -2
- commands/cat/debug_log.2025-07-15_14-28-38_087378.zip +0 -0
- commands/cat/debug_log.2025-07-16_15-48-50_037087.zip +0 -0
- commands/cat/dr_egeria_md.py +30 -6
- md_processing/__init__.py +16 -3
- md_processing/data/commands.json +18541 -171
- md_processing/dr_egeria_outbox-pycharm/.obsidian/app.json +1 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/appearance.json +1 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/core-plugins.json +31 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/workspace.json +177 -0
- md_processing/dr_egeria_outbox-pycharm/monday/processed-2025-07-14 12:38-data_designer_out.md +663 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +719 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +41 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +33 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +192 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-16 19:15-gov_def2.md +527 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 12:08-gov_def2.md +527 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 14:27-gov_def2.md +474 -0
- md_processing/family_docs/Data Designer/Create_Data_Class.md +164 -0
- md_processing/family_docs/Data Designer/Create_Data_Dictionary.md +30 -0
- md_processing/family_docs/Data Designer/Create_Data_Field.md +162 -0
- md_processing/family_docs/Data Designer/Create_Data_Specification.md +36 -0
- md_processing/family_docs/Data Designer/Create_Data_Structure.md +38 -0
- md_processing/family_docs/Data Designer/View_Data_Classes.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Dictionaries.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Fields.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Specifications.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Structures.md +78 -0
- md_processing/family_docs/Data Designer.md +842 -0
- md_processing/family_docs/Digital Product Manager/Add_Member->Collection.md +42 -0
- md_processing/family_docs/Digital Product Manager/Attach_Collection->Resource.md +36 -0
- md_processing/family_docs/Digital Product Manager/Create_Agreement.md +96 -0
- md_processing/family_docs/Digital Product Manager/Create_Data_Sharing_Agreement.md +72 -0
- md_processing/family_docs/Digital Product Manager/Create_DigitalSubscription.md +102 -0
- md_processing/family_docs/Digital Product Manager/Create_Digital_Product.md +134 -0
- md_processing/family_docs/Digital Product Manager/Link_Agreement_Items.md +60 -0
- md_processing/family_docs/Digital Product Manager/Link_Contracts.md +26 -0
- md_processing/family_docs/Digital Product Manager/Link_Digital_Product_-_Digital_Product.md +30 -0
- md_processing/family_docs/Digital Product Manager/Link_Subscribers.md +48 -0
- md_processing/family_docs/Digital Product Manager.md +668 -0
- md_processing/family_docs/Glossary/Attach_Category_Parent.md +18 -0
- md_processing/family_docs/Glossary/Attach_Term-Term_Relationship.md +26 -0
- md_processing/family_docs/Glossary/Create_Category.md +38 -0
- md_processing/family_docs/Glossary/Create_Glossary.md +42 -0
- md_processing/family_docs/Glossary/Create_Term.md +70 -0
- md_processing/family_docs/Glossary.md +206 -0
- md_processing/family_docs/Governance Officer/Create_Business_Imperative.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Certification_Type.md +112 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Approach.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Obligation.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Principle.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Procedure.md +128 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Process.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Processing_Purpose.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Responsibility.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Rule.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Strategy.md +106 -0
- md_processing/family_docs/Governance Officer/Create_License_Type.md +112 -0
- md_processing/family_docs/Governance Officer/Create_Naming_Standard_Rule.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Regulation_Article.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Regulation_Definition.md +118 -0
- md_processing/family_docs/Governance Officer/Create_Security_Access_Control.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Security_Group.md +120 -0
- md_processing/family_docs/Governance Officer/Create_Service_Level_Objectives.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Threat_Definition.md +106 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Controls.md +32 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Drivers.md +32 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Policies.md +32 -0
- md_processing/family_docs/Governance Officer/View_Governance_Definitions.md +82 -0
- md_processing/family_docs/Governance Officer.md +2412 -0
- md_processing/family_docs/Solution Architect/Create_Information_Supply_Chain.md +70 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Blueprint.md +44 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Component.md +96 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Role.md +66 -0
- md_processing/family_docs/Solution Architect/Link_Information_Supply_Chain_Peers.md +32 -0
- md_processing/family_docs/Solution Architect/Link_Solution_Component_Peers.md +32 -0
- md_processing/family_docs/Solution Architect/View_Information_Supply_Chains.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Blueprints.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Components.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Roles.md +32 -0
- md_processing/family_docs/Solution Architect.md +490 -0
- md_processing/md_commands/data_designer_commands.py +9 -10
- md_processing/md_commands/glossary_commands.py +16 -2
- md_processing/md_commands/governance_officer_commands.py +420 -0
- md_processing/md_commands/product_manager_commands.py +186 -752
- md_processing/md_commands/project_commands.py +5 -2
- md_processing/md_commands/solution_architect_commands.py +9 -8
- md_processing/md_processing_utils/common_md_proc_utils.py +15 -10
- md_processing/md_processing_utils/common_md_utils.py +194 -2
- md_processing/md_processing_utils/debug_log +574 -0
- md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +2065 -0
- md_processing/md_processing_utils/extraction_utils.py +1 -1
- md_processing/md_processing_utils/generate_dr_help.py +20 -5
- md_processing/md_processing_utils/generate_md_cmd_templates.py +143 -0
- md_processing/md_processing_utils/md_processing_constants.py +56 -4
- pyegeria/governance_officer_omvs.py +14 -99
- pyegeria/output_formatter.py +3 -2
- pyegeria/utils.py +7 -0
- {pyegeria-5.4.0.dev13.dist-info → pyegeria-5.4.0.dev14.dist-info}/METADATA +1 -1
- {pyegeria-5.4.0.dev13.dist-info → pyegeria-5.4.0.dev14.dist-info}/RECORD +103 -29
- 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/debug_log.2025-07-10_10-25-47_958331.zip +0 -0
- pyegeria/m_test.py +0 -118
- {pyegeria-5.4.0.dev13.dist-info → pyegeria-5.4.0.dev14.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.0.dev13.dist-info → pyegeria-5.4.0.dev14.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.0.dev13.dist-info → pyegeria-5.4.0.dev14.dist-info}/entry_points.txt +0 -0
Binary file
|
Binary file
|
commands/cat/dr_egeria_md.py
CHANGED
@@ -15,6 +15,7 @@ logger.add("debug_log.log", rotation="1 day", retention="1 week", compression="z
|
|
15
15
|
import click
|
16
16
|
from rich import print
|
17
17
|
from rich.console import Console
|
18
|
+
from md_processing.md_processing_utils.common_md_utils import setup_log
|
18
19
|
|
19
20
|
from md_processing import (extract_command, process_glossary_upsert_command, process_term_upsert_command,
|
20
21
|
process_category_upsert_command, process_provenance_command, get_current_datetime_string,
|
@@ -25,7 +26,11 @@ from md_processing import (extract_command, process_glossary_upsert_command, pro
|
|
25
26
|
process_glossary_structure_command, process_term_revision_history_command,
|
26
27
|
process_create_term_term_relationship_command, process_term_details_command,
|
27
28
|
process_information_supply_chain_upsert_command,
|
28
|
-
process_information_supply_chain_link_unlink_command, process_sol_arch_list_command
|
29
|
+
process_information_supply_chain_link_unlink_command, process_sol_arch_list_command,
|
30
|
+
process_digital_product_upsert_command, process_agreement_upsert_command,
|
31
|
+
process_gov_definition_upsert_command, GOV_COM_LIST, GOV_LINK_LIST,
|
32
|
+
process_gov_def_link_detach_command, process_gov_definition_list_command,
|
33
|
+
process_gov_def_context_command)
|
29
34
|
from md_processing.md_commands.data_designer_commands import (process_data_spec_upsert_command,
|
30
35
|
process_data_dict_upsert_command,
|
31
36
|
process_data_collection_list_command,
|
@@ -35,7 +40,6 @@ from md_processing.md_commands.data_designer_commands import (process_data_spec_
|
|
35
40
|
process_data_field_upsert_command,
|
36
41
|
process_data_structure_upsert_command,
|
37
42
|
process_data_class_upsert_command)
|
38
|
-
|
39
43
|
from pyegeria import EgeriaTech
|
40
44
|
|
41
45
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
@@ -57,10 +61,11 @@ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
|
|
57
61
|
EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
|
58
62
|
EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
|
59
63
|
|
60
|
-
|
64
|
+
setup_log()
|
61
65
|
@click.command("process_markdown_file", help="Process a markdown file and return the output as a string.")
|
62
66
|
@click.option("--input-file", help="Markdown file to process.", default="dr_egeria_intro_part1.md", required=True,
|
63
67
|
prompt=False)
|
68
|
+
@click.option("--output-folder", help="Output folder.", default=".", required=False)
|
64
69
|
@click.option("--directive", default="process", help="How to process the file",
|
65
70
|
type=click.Choice(["display", "validate", "process"], case_sensitive=False), prompt=False, )
|
66
71
|
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
|
@@ -68,7 +73,7 @@ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_eger
|
|
68
73
|
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
69
74
|
@click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
70
75
|
@logger.catch
|
71
|
-
def process_markdown_file(input_file: str, directive: str, server: str, url: str, userid: str,
|
76
|
+
def process_markdown_file(input_file: str, output_folder:str, directive: str, server: str, url: str, userid: str,
|
72
77
|
user_pass: str, ) -> None:
|
73
78
|
"""
|
74
79
|
Process a markdown file by parsing and executing Dr. Egeria md_commands. Write output to a new file.
|
@@ -181,11 +186,25 @@ def process_markdown_file(input_file: str, directive: str, server: str, url: str
|
|
181
186
|
result = process_data_field_list_command(client, current_block, directive)
|
182
187
|
elif potential_command in ["View Data Classes", "View Data Class"]:
|
183
188
|
result = process_data_class_list_command(client, current_block, directive)
|
189
|
+
elif potential_command in ["Create Digital Product", "Create Data Product","Update Digital Product", "Update Data Product"]:
|
190
|
+
result = process_digital_product_upsert_command(client, current_block, directive)
|
191
|
+
elif potential_command in ["Create Agreement", "Create Data Sharing Agreement", "Update Agreement", "Update Data Sharing Agreement"]:
|
192
|
+
result = process_agreement_upsert_command(client, current_block, directive)
|
193
|
+
elif potential_command in GOV_COM_LIST:
|
194
|
+
result = process_gov_definition_upsert_command(client, current_block, directive)
|
195
|
+
elif potential_command in ['View Governance Definitions', 'List Governance Definitions',
|
196
|
+
'View Gov Definitions', 'List Gov Definitions']:
|
197
|
+
result = process_gov_definition_list_command(client, current_block, directive)
|
198
|
+
elif potential_command in ['View Governance Definition Context', 'List Governance Definition Context',
|
199
|
+
'View Gov Definition Context', 'List Gov Definition Context']:
|
200
|
+
result = process_gov_def_context_command(client, current_block, directive)
|
201
|
+
|
184
202
|
|
185
203
|
|
186
204
|
else:
|
187
205
|
# If object_action is not recognized, keep the block as-is
|
188
206
|
result = None
|
207
|
+
print(f"\n===> Unknown command: {potential_command}")
|
189
208
|
# print(json.dumps(dr_egeria_state.get_element_dictionary(), indent=4))
|
190
209
|
if result:
|
191
210
|
if directive == "process":
|
@@ -245,7 +264,11 @@ def process_markdown_file(input_file: str, directive: str, server: str, url: str
|
|
245
264
|
if updated:
|
246
265
|
path, filename = os.path.split(input_file) # Get both parts
|
247
266
|
new_filename = f"processed-{get_current_datetime_string()}-{filename}" # Create the new filename
|
248
|
-
|
267
|
+
|
268
|
+
if output_folder:
|
269
|
+
new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH, output_folder, new_filename)
|
270
|
+
else:
|
271
|
+
new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH, new_filename)
|
249
272
|
os.makedirs(os.path.dirname(new_file_path), exist_ok=True)
|
250
273
|
|
251
274
|
with open(new_file_path, 'w') as f2:
|
@@ -256,6 +279,7 @@ def process_markdown_file(input_file: str, directive: str, server: str, url: str
|
|
256
279
|
else:
|
257
280
|
if directive != 'display':
|
258
281
|
click.echo("\nNo updates detected. New File not created.")
|
282
|
+
logger.error("===> Unknown Command? <===")
|
259
283
|
|
260
284
|
except (Exception):
|
261
285
|
console.print_exception(show_locals=True)
|
@@ -290,4 +314,4 @@ def process_markdown_file(input_file: str, directive: str, server: str, url: str
|
|
290
314
|
# main()
|
291
315
|
|
292
316
|
if __name__ == "__main__":
|
293
|
-
process_markdown_file()
|
317
|
+
process_markdown_file()
|
md_processing/__init__.py
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
"""
|
2
2
|
This package contains functions to parse and process Egeria Markdown (Freddie)
|
3
3
|
"""
|
4
|
+
from md_processing.md_commands.governance_officer_commands import (process_gov_definition_upsert_command,
|
5
|
+
process_gov_def_link_detach_command,
|
6
|
+
process_gov_definition_list_command,
|
7
|
+
process_gov_def_context_command)
|
4
8
|
|
5
|
-
|
9
|
+
|
10
|
+
from md_processing.md_commands.product_manager_commands import (process_digital_product_upsert_command,
|
11
|
+
process_agreement_upsert_command)
|
6
12
|
|
7
13
|
from md_processing.md_commands.solution_architect_commands import (process_blueprint_upsert_command,
|
8
14
|
process_solution_component_upsert_command,
|
@@ -36,7 +42,12 @@ from md_processing.md_processing_utils.common_md_utils import (render_markdown,
|
|
36
42
|
console, debug_level, get_element_dictionary,
|
37
43
|
update_element_dictionary, clear_element_dictionary,
|
38
44
|
is_present, find_key_with_value,
|
39
|
-
process_provenance_command
|
45
|
+
process_provenance_command, set_metadata_source_request_body,
|
46
|
+
set_rel_request_body, set_filter_request_body,
|
47
|
+
set_update_body, set_peer_gov_def_request_body,
|
48
|
+
set_gov_prop_body, set_prop_body, set_create_body,
|
49
|
+
|
50
|
+
)
|
40
51
|
from md_processing.md_processing_utils.extraction_utils import (extract_command_plus, extract_command,
|
41
52
|
extract_attribute, process_simple_attribute,
|
42
53
|
process_name_list, process_element_identifiers,
|
@@ -51,9 +62,11 @@ from md_processing.md_processing_utils.md_processing_constants import (ALWAYS, E
|
|
51
62
|
SOLUTION_LINKING_ROLE_LABELS, OUTPUT_LABELS,
|
52
63
|
SEARCH_LABELS, GUID_LABELS,
|
53
64
|
ELEMENT_OUTPUT_FORMATS, TERM_RELATIONSHPS,
|
54
|
-
command_list, COMMAND_DEFINITIONS
|
65
|
+
command_list, COMMAND_DEFINITIONS, GOV_COM_LIST,
|
66
|
+
GOV_LINK_LIST)
|
55
67
|
# Import functions from md_processing_constants
|
56
68
|
from md_processing.md_processing_utils.md_processing_constants import (load_commands, get_command_spec, get_attribute,
|
57
69
|
get_attribute_labels, get_alternate_names)
|
58
70
|
# Import message constants
|
59
71
|
from md_processing.md_processing_utils.message_constants import (message_types, ALWAYS, ERROR, INFO, WARNING)
|
72
|
+
|