pyegeria 5.3.3.13.dev1__py3-none-any.whl → 5.3.3.13.dev3__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.
- pyegeria/__init__.py +2 -1
- pyegeria/commands/tech/list_information_supply_chains.py +5 -3
- pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Subject Onboarding.html +32 -32
- pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Treatment Validation.html +35 -35
- pyegeria/commands/tech/work/mermaid_graphs/Employee Expense Payment.html +20 -20
- pyegeria/commands/tech/work/mermaid_graphs/New Drug Product Information Distribution.html +21 -21
- pyegeria/commands/tech/work/mermaid_graphs/New Employee Onboarding.html +20 -20
- pyegeria/commands/tech/work/mermaid_graphs/Personalized Treatment Ordering.html +21 -21
- pyegeria/commands/tech/work/mermaid_graphs/Physical Inventory Tracking.html +23 -23
- pyegeria/commands/tech/work/mermaid_graphs/Sustainability Reporting.html +20 -20
- pyegeria/commands/tech/work/mermaid_graphs/{{displayName}}.html +17 -17
- pyegeria/mermaid_utilities.py +18 -41
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev3.dist-info}/METADATA +1 -1
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev3.dist-info}/RECORD +17 -17
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev3.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev3.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev3.dist-info}/entry_points.txt +0 -0
pyegeria/mermaid_utilities.py
CHANGED
@@ -42,35 +42,7 @@ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
|
42
42
|
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
43
43
|
EGERIA_MERMAID_FOLDER = os.environ.get("EGERIA_MERMAID_FOLDER", "./work/mermaid_graphs")
|
44
44
|
|
45
|
-
|
46
|
-
# def check_mermaid_version():
|
47
|
-
# """Check the version of Mermaid.js loaded in Jupyter Notebook"""
|
48
|
-
# display(HTML("""
|
49
|
-
# <script>
|
50
|
-
# function checkMermaid() {
|
51
|
-
# if (window.mermaid && typeof window.mermaid.version !== "undefined") {
|
52
|
-
# console.log("Mermaid.js version:", mermaid.version);
|
53
|
-
# alert("Mermaid.js version: " + mermaid.version);
|
54
|
-
# } else {
|
55
|
-
# console.warn("Mermaid.js is not loaded yet. Please ensure it's properly injected.");
|
56
|
-
# alert("Mermaid.js is not loaded yet. Please ensure it's properly injected.");
|
57
|
-
# }
|
58
|
-
# }
|
59
|
-
# // Delay execution to ensure Mermaid.js has had time to load
|
60
|
-
# setTimeout(checkMermaid, 1000);
|
61
|
-
# </script>
|
62
|
-
# """))
|
63
|
-
|
64
|
-
# another site to get mermaid from is "https://cdnjs.cloudflare.com/ajax/libs/mermaid/11.4.1/mermaid.min.js";
|
65
|
-
# below was:
|
66
|
-
#<script src="https://unpkg.com/mermaid@11.4.0/dist/mermaid.min.js"></script>
|
67
|
-
# <script type="text/javascript">
|
68
|
-
# if (!window.mermaid) {
|
69
|
-
# var mermaidScript = document.createElement('script');
|
70
|
-
# mermaidScript.src = https://unpkg.com/mermaid@11.4.1/dist/mermaid.min.js"
|
71
|
-
# document.head.appendChild(mermaidScript);
|
72
|
-
# }
|
73
|
-
# </script>
|
45
|
+
|
74
46
|
def load_mermaid():
|
75
47
|
"""Inject Mermaid.js library"""
|
76
48
|
# Alternative CDN URL via unpkg
|
@@ -83,15 +55,7 @@ def load_mermaid():
|
|
83
55
|
</script>
|
84
56
|
|
85
57
|
"""
|
86
|
-
|
87
|
-
# <script src="https://unpkg.com/mermaid@11.4.0/dist/mermaid.min.js"></script>
|
88
|
-
# <script>
|
89
|
-
# document.addEventListener('DOMContentLoaded', function() {{
|
90
|
-
# mermaid.initialize({{"startOnLoad": true}});
|
91
|
-
# }});
|
92
|
-
# </script>
|
93
|
-
#
|
94
|
-
# """
|
58
|
+
|
95
59
|
display(HTML(mermaid_js))
|
96
60
|
|
97
61
|
|
@@ -130,9 +94,9 @@ def construct_mermaid_html(mermaid_str: str) -> str:
|
|
130
94
|
<style type="text/css">
|
131
95
|
#mySvgId {
|
132
96
|
width: 100%;
|
133
|
-
height:
|
134
|
-
overflow:
|
135
|
-
border:
|
97
|
+
height: 600px;
|
98
|
+
overflow: scroll;
|
99
|
+
border: 2px solid #ccc;
|
136
100
|
position: relative;
|
137
101
|
margin-bottom: 10px;
|
138
102
|
}
|
@@ -235,6 +199,19 @@ def construct_mermaid_html(mermaid_str: str) -> str:
|
|
235
199
|
|
236
200
|
return html_prefix + mermaid_code + html_postfix
|
237
201
|
|
202
|
+
def save_mermaid_html(title: str, mermaid_str: str, folder:str = EGERIA_MERMAID_FOLDER):
|
203
|
+
"""Save a Mermaid diagram to a file"""
|
204
|
+
if not os.path.exists(folder):
|
205
|
+
os.makedirs(folder)
|
206
|
+
mermaid_file = os.path.join(folder, title + ".html")
|
207
|
+
|
208
|
+
payload = construct_mermaid_html(mermaid_str)
|
209
|
+
|
210
|
+
with open(mermaid_file, "w") as f:
|
211
|
+
f.write(payload)
|
212
|
+
return mermaid_file
|
213
|
+
|
214
|
+
|
238
215
|
|
239
216
|
|
240
217
|
def save_mermaid_graph(title, mermaid_str, folder:str = EGERIA_MERMAID_FOLDER):
|
@@ -1,5 +1,5 @@
|
|
1
1
|
pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
|
2
|
-
pyegeria/__init__.py,sha256
|
2
|
+
pyegeria/__init__.py,sha256=CTd-w5CYi5BpCLIM7in5qkfWC8N1eZ6JI554rQj2AUQ,22118
|
3
3
|
pyegeria/_client.py,sha256=Hj8Tmo6DuKJPLROZrUw7NXzo7O_BgbewlvRwJZPKPBA,30889
|
4
4
|
pyegeria/_deprecated_gov_engine.py,sha256=dWNcwVsE5__dF2u4QiIyQrssozzzOjBbLld8MdpmVCQ,17264
|
5
5
|
pyegeria/_exceptions.py,sha256=NJ7vAhmvusK1ENvY2MMrBB6A6TgpYjzS9QJxFH56b8c,18470
|
@@ -197,7 +197,7 @@ pyegeria/commands/tech/list_elements_by_property_value.py,sha256=3OG8uyPKY3zX-K_
|
|
197
197
|
pyegeria/commands/tech/list_elements_by_property_value_x.py,sha256=y77Nszqg5XtyQXwKm3XjB38gwmlpiULEn4NLr_SnRug,7065
|
198
198
|
pyegeria/commands/tech/list_elements_for_classification.py,sha256=jck8bPQHiS61IKslmA2a_B1iopHZ0cE50vAs6Ud2Gkc,6207
|
199
199
|
pyegeria/commands/tech/list_gov_action_processes.py,sha256=NaoZ3t5n1uXcLI0OdUAgMTuzDrEkptY9w7uQeZ4KZP8,4587
|
200
|
-
pyegeria/commands/tech/list_information_supply_chains.py,sha256=
|
200
|
+
pyegeria/commands/tech/list_information_supply_chains.py,sha256=1upwBKbQKagu0S048RUHHVolHWJyMH-cHPViHwnyp8A,5630
|
201
201
|
pyegeria/commands/tech/list_registered_services.py,sha256=fNh21Acd5bCbOQmxpDMOH6QNT5GkiGPLZpadbzIA8F8,6541
|
202
202
|
pyegeria/commands/tech/list_related_elements_with_prop_value.py,sha256=NhWSfJmtBIUN5IBWEK_uQn0OxpCeWnVhy0kaZ_gyEGw,8157
|
203
203
|
pyegeria/commands/tech/list_related_specification.py,sha256=aMUZBiQcTMaNTvSgGUsRjqvqhmebP9iO0eAlbJsDWBk,5925
|
@@ -208,15 +208,15 @@ pyegeria/commands/tech/list_solution_blueprints2.py,sha256=xY5JuUET3DHV_VWsdSIbt
|
|
208
208
|
pyegeria/commands/tech/list_tech_templates.py,sha256=FvJ2qAHo7yoCdd9LnZtvWjd3DQEvD0P5wfz5-D5qjmw,14153
|
209
209
|
pyegeria/commands/tech/list_valid_metadata_values.py,sha256=Mv4eSHCR_pR0llWRrpMIzNKA6_QEr8qccAv4NQv4dg0,6340
|
210
210
|
pyegeria/commands/tech/table_tech_templates.py,sha256=kv9VWhZ6pEN-1vEjo6IprliwFTjumjdVV3IWQB2HzI4,9503
|
211
|
-
pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Subject Onboarding.html,sha256=
|
212
|
-
pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Treatment Validation.html,sha256=
|
213
|
-
pyegeria/commands/tech/work/mermaid_graphs/Employee Expense Payment.html,sha256=
|
214
|
-
pyegeria/commands/tech/work/mermaid_graphs/New Drug Product Information Distribution.html,sha256=
|
215
|
-
pyegeria/commands/tech/work/mermaid_graphs/New Employee Onboarding.html,sha256=
|
216
|
-
pyegeria/commands/tech/work/mermaid_graphs/Personalized Treatment Ordering.html,sha256=
|
217
|
-
pyegeria/commands/tech/work/mermaid_graphs/Physical Inventory Tracking.html,sha256=
|
218
|
-
pyegeria/commands/tech/work/mermaid_graphs/Sustainability Reporting.html,sha256=
|
219
|
-
pyegeria/commands/tech/work/mermaid_graphs/{{displayName}}.html,sha256=
|
211
|
+
pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Subject Onboarding.html,sha256=16mToSOApkMKXs5mEfsNXRM2A-24oOaU9LnufP1Z6yk,6072
|
212
|
+
pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Treatment Validation.html,sha256=PVxW_d_w0f-QmAbLqAyY5NDu9kQECFnbQNZVw00do_A,11715
|
213
|
+
pyegeria/commands/tech/work/mermaid_graphs/Employee Expense Payment.html,sha256=9qNTzdZvDzk0vkYQIBthlwt8qO5nOElolXbcqi94wgk,5240
|
214
|
+
pyegeria/commands/tech/work/mermaid_graphs/New Drug Product Information Distribution.html,sha256=vDAS_UNqPIUKl4ow0csi-t7m7oXqZQHGcIcBgJB9g38,6375
|
215
|
+
pyegeria/commands/tech/work/mermaid_graphs/New Employee Onboarding.html,sha256=QH4KJhtQxHlzabgGwGQpDNlSfSbTANm-FMYcGz0MPLg,6141
|
216
|
+
pyegeria/commands/tech/work/mermaid_graphs/Personalized Treatment Ordering.html,sha256=MBG_SglrzeNXPqRXmgPVaptVIEn4VdIX_myNFMd9Hlg,6550
|
217
|
+
pyegeria/commands/tech/work/mermaid_graphs/Physical Inventory Tracking.html,sha256=_0PgeTxnLpqHsD5lv-gzzYs1Qf_VktTgGhqKebMH8-c,9484
|
218
|
+
pyegeria/commands/tech/work/mermaid_graphs/Sustainability Reporting.html,sha256=HqfjagnJziZT-e1jBWP2_4ceodtdq1MbNe-OYeOIEjU,10718
|
219
|
+
pyegeria/commands/tech/work/mermaid_graphs/{{displayName}}.html,sha256=byK9OrB-elPwlF0QstNC7uzeI0vpv92Dxbnx_1N2xkc,4336
|
220
220
|
pyegeria/commands/tech/x_list_related_elements.py,sha256=viUFq_G52CvLO_RJsgN8fkLeIF89Tb8Gvl-nNfeDPSI,5871
|
221
221
|
pyegeria/core_omag_server_config.py,sha256=ej0oNpGelSTTm2oERS86LpgT9O9E5CZFbUm2Iek8f1E,97764
|
222
222
|
pyegeria/create_tech_guid_lists.py,sha256=mI__-i9U01emyqQMdPK2miealwQNiZfB23iiFGmrH0g,4640
|
@@ -229,7 +229,7 @@ pyegeria/feedback_manager_omvs.py,sha256=B66e3ZCaC_dirb0mcb2Nz3PYh2ZKsoMAYNOb3eu
|
|
229
229
|
pyegeria/full_omag_server_config.py,sha256=k3fUfopAFAE3OKkFR7zZPiki_FYj6j2xQ4oD2SVaefQ,47350
|
230
230
|
pyegeria/glossary_browser_omvs.py,sha256=NcitYaZJqwVODBO5zBtWpXPNUJJ3DKzEbRaOFSAyUlg,93554
|
231
231
|
pyegeria/glossary_manager_omvs.py,sha256=tBjoHrrHJLasXoeQSpW-KpF3vEQdN_GR3jfcceTjt_c,132444
|
232
|
-
pyegeria/mermaid_utilities.py,sha256=
|
232
|
+
pyegeria/mermaid_utilities.py,sha256=n12wLznJ9yQdyfKyRHaQORF8nX1SQt3hZR4WNU0h7dM,17525
|
233
233
|
pyegeria/metadata_explorer_omvs.py,sha256=XBg6q-JXOA8UYsT85nlpBVe4EQ6jxwj70MvE7tkVvH0,86905
|
234
234
|
pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,34666
|
235
235
|
pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
|
@@ -242,8 +242,8 @@ pyegeria/template_manager_omvs.py,sha256=Sw5xsQAhy7a48xFCg59mg9_nqyhawoS9v4WyF-P
|
|
242
242
|
pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
|
243
243
|
pyegeria/valid_metadata_omvs.py,sha256=cCt5CCLv6BdzCu90n68r_PkG_PEQJjrtwCxio7K6yko,65034
|
244
244
|
pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
|
245
|
-
pyegeria-5.3.3.13.
|
246
|
-
pyegeria-5.3.3.13.
|
247
|
-
pyegeria-5.3.3.13.
|
248
|
-
pyegeria-5.3.3.13.
|
249
|
-
pyegeria-5.3.3.13.
|
245
|
+
pyegeria-5.3.3.13.dev3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
246
|
+
pyegeria-5.3.3.13.dev3.dist-info/METADATA,sha256=347eZXBRgtTN5q54HUSeg2D9bDoAigGlOuj-oePlYik,2741
|
247
|
+
pyegeria-5.3.3.13.dev3.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
248
|
+
pyegeria-5.3.3.13.dev3.dist-info/entry_points.txt,sha256=cLnCR81Pm2c35hDDg7BOlQ9Mtvx5wofuvwXHnL1bGis,5956
|
249
|
+
pyegeria-5.3.3.13.dev3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|