pyegeria 5.3.6.2.4__py3-none-any.whl → 5.3.6.3__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 +3 -0
- pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/freddie_intro.md +64 -16
- pyegeria/commands/cat/{freddie_jupyter.py → dr_egeria_jupyter.py} +8 -16
- pyegeria/commands/cat/{freddie_md.py → dr_egeria_md.py} +29 -32
- pyegeria/commands/cat/glossary_actions.py +59 -1
- pyegeria/commands/cat/list_categories.py +185 -0
- pyegeria/commands/cat/list_glossaries.py +26 -33
- pyegeria/commands/cat/list_terms.py +47 -47
- pyegeria/commands/cli/egeria.py +51 -61
- pyegeria/commands/cli/egeria_cat.py +53 -31
- pyegeria/create_tech_guid_lists.py +2 -5
- pyegeria/glossary_browser_omvs.py +257 -105
- pyegeria/glossary_manager_omvs.py +148 -1591
- pyegeria/md_processing_utils.py +816 -0
- {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/METADATA +1 -1
- {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/RECORD +21 -29
- {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/entry_points.txt +5 -0
- pyegeria/commands/cat/freddie_jup.py +0 -124
- pyegeria/commands/cat/freddie_utils.py +0 -590
- pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-19-29-Report.md +0 -69
- pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-20-30-Update-Form.md +0 -78
- pyegeria/commands/cat/glossary_creation_experiment.ipynb +0 -235
- pyegeria/test_j.html +0 -0
- pyegeria/test_m.html +0 -213
- pyegeria/test_m1.html +0 -273
- pyegeria/test_mer.ipynb +0 -596
- pyegeria/test_w.html +0 -213
- /pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/glossary_creation_experiment.ipynb +0 -0
- /pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/glossary_exp.md +0 -0
- {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/WHEEL +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
|
2
|
-
pyegeria/__init__.py,sha256=
|
2
|
+
pyegeria/__init__.py,sha256=08v01IyeVZ-YlRZU0qGPAGDhNsdEscX1IHvPcsAYZrE,30187
|
3
3
|
pyegeria/_client.py,sha256=aeyB27WFxswxcIj_Ky88F2Q4S5zn7ofmux65aen5mW0,31130
|
4
4
|
pyegeria/_deprecated_gov_engine.py,sha256=dWNcwVsE5__dF2u4QiIyQrssozzzOjBbLld8MdpmVCQ,17264
|
5
5
|
pyegeria/_exceptions.py,sha256=1SrnV194V4_YJNnNAU0myTHQ3dhLn4GF2B2gZcj1u90,18153
|
@@ -13,40 +13,36 @@ pyegeria/commands/README.md,sha256=hJdOWhZ5eCfwTkY4Tx6De6Y1XVo7cbaddQEvjqppvls,2
|
|
13
13
|
pyegeria/commands/__init__.py,sha256=R2o66ctVicTZ8B5VSPtc7EDRKNiNclzFbYX0o2Zg2dQ,1120
|
14
14
|
pyegeria/commands/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiqRY,967
|
15
15
|
pyegeria/commands/cat/__init__.py,sha256=5OCy4m_yZsnSxdy_gvkCyP_OkjvuWKimqUGHYCJc_qA,450
|
16
|
+
pyegeria/commands/cat/dr_egeria_inbox/freddie_intro.md,sha256=xiikqqouWFBTCCBgZh7SXTaIy61i7fTWN9J2zbvZ2Ao,6548
|
17
|
+
pyegeria/commands/cat/dr_egeria_inbox/glossary_creation_experiment.ipynb,sha256=dbzNu90fCKNohOWVSRBOB1GLyd95x8Qw51I5AkaPtso,11552
|
18
|
+
pyegeria/commands/cat/dr_egeria_inbox/glossary_exp.md,sha256=KsUeTzDe5QkrTmIfIAXR74qZ29oSfRW-NAEn0RYIRqM,2534
|
19
|
+
pyegeria/commands/cat/dr_egeria_jupyter.py,sha256=4LcmD5CrtazLgUK_LCjgOnwtxZqTBB6lrMR8tsugl94,6036
|
20
|
+
pyegeria/commands/cat/dr_egeria_md.py,sha256=9x4Iadk252Njr0VN_oiG4UOAVpEkeIYSXeGLg-JLKFs,7274
|
16
21
|
pyegeria/commands/cat/exp_list_glossaries.py,sha256=dC6Bnfm3YSMTKPP146qeslIFRiZnGu5b7iDYE07p4iU,5817
|
17
|
-
pyegeria/commands/cat/freddie_jup.py,sha256=zSuV8kiAGvOVBPnaln-dIY2T03hWQN2HeoLhkodayAo,5686
|
18
|
-
pyegeria/commands/cat/freddie_jupyter.py,sha256=3-Z_pzOQUiBIBHtpQTrQhKyM3DmKHmyvsTpEcoju-y0,6195
|
19
|
-
pyegeria/commands/cat/freddie_md.py,sha256=vueJ7OahPt5t4OW8eT9JbE7n5kEoU1bLHlnvEStmo8o,7087
|
20
|
-
pyegeria/commands/cat/freddie_utils.py,sha256=r7e1EaUouwAY4sc4VjIr6xtknkhq4wz-UncyWW04IBk,26742
|
21
|
-
pyegeria/commands/cat/freddies-inbox/freddie_intro.md,sha256=2HGuA2xsRpwqxDtG59iD4hDdCkyHcqE-OhXCT1KgeW8,6512
|
22
|
-
pyegeria/commands/cat/freddies-inbox/glossary_creation_experiment.ipynb,sha256=dbzNu90fCKNohOWVSRBOB1GLyd95x8Qw51I5AkaPtso,11552
|
23
|
-
pyegeria/commands/cat/freddies-inbox/glossary_exp.md,sha256=KsUeTzDe5QkrTmIfIAXR74qZ29oSfRW-NAEn0RYIRqM,2534
|
24
|
-
pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-19-29-Report.md,sha256=nvwc4CxfCylURRZHhHrYthEYhGkiV6huOTct0tV7xRE,1981
|
25
|
-
pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-20-30-Update-Form.md,sha256=FKBOoF4VQCta8IzjuPPsJ12THr7_dUszFAmsD48MrIY,2046
|
26
22
|
pyegeria/commands/cat/get_asset_graph.py,sha256=xnXJfpDTVH1TJ2TwE3dtjaXU36Di6-N6JAyhothzz2o,12461
|
27
23
|
pyegeria/commands/cat/get_collection.py,sha256=KbSFoGZeK30_bMCa0BpIuCwBF5ywCX0g4hgDPnI0lEo,5356
|
28
24
|
pyegeria/commands/cat/get_project_dependencies.py,sha256=wDK_lAfR6p4VxYRV6MZE9XgU3OfIRcWKKYn0Xf64w6o,5986
|
29
25
|
pyegeria/commands/cat/get_project_structure.py,sha256=4Jo3F9f7auTnTt_xElsrQ4eA8k8xMge0C5xE-Rjkjcw,5974
|
30
26
|
pyegeria/commands/cat/get_tech_type_elements.py,sha256=IznytHXwDOFriGM6mypV9wuEeM-vT2s66cUzf-IROog,6147
|
31
|
-
pyegeria/commands/cat/glossary_actions.py,sha256=
|
32
|
-
pyegeria/commands/cat/glossary_creation_experiment.ipynb,sha256=iyXV1dlabCAoUViMVFzOPGBpgs2DA-2d5QWWCfubXWk,6689
|
27
|
+
pyegeria/commands/cat/glossary_actions.py,sha256=q3MusBFCrIqQW6feGrrOv1MAmzIZ68Kl99IVc2393og,19427
|
33
28
|
pyegeria/commands/cat/list_assets.py,sha256=CdJ2coKvvQv2VwJO0Sp9Eg9Fu_uvpC21tgjrdtT9Yz4,6315
|
29
|
+
pyegeria/commands/cat/list_categories.py,sha256=VYZwQC9vezyGFm5dowD-aVszSKlS2MYo7d1KftdbycU,7595
|
34
30
|
pyegeria/commands/cat/list_cert_types.py,sha256=HmrTks0SSYgSMsYz3LqfX5kwDQ6D9KMcynoR_xlWtnE,7137
|
35
31
|
pyegeria/commands/cat/list_collections.py,sha256=kCxl5OuBAGtctHNVmttOe4aJ6r37cGdCFnK1i7A90ls,5996
|
36
32
|
pyegeria/commands/cat/list_deployed_catalogs.py,sha256=VdN6R9kRVWX-fGIgubOigvMVPzhF-hKQepHHlS-w-D8,8258
|
37
33
|
pyegeria/commands/cat/list_deployed_database_schemas.py,sha256=1Qicke1R2_7Xi3Qf5sp8KJ3_reAIt0z1iaz2sG8Z0Qs,9458
|
38
34
|
pyegeria/commands/cat/list_deployed_databases.py,sha256=ryrBW1CxJRfOeLP978qQwxb5oImqhIsHghtcpWeBIrw,7587
|
39
35
|
pyegeria/commands/cat/list_deployed_servers.py,sha256=_xR7EaaCsxIjTphxmoCZlARoja_vQqZ881pFiEuhw-8,5719
|
40
|
-
pyegeria/commands/cat/list_glossaries.py,sha256=
|
36
|
+
pyegeria/commands/cat/list_glossaries.py,sha256=jlhe840GxadFVM2qIcVm7-YwZ-8EBN-aCqDGIXlsdBw,7296
|
41
37
|
pyegeria/commands/cat/list_projects.py,sha256=NzWTuepTGUEyxK-eWvuUxtBgCtNWubVwmz2eqm2UN1c,7997
|
42
38
|
pyegeria/commands/cat/list_tech_type_elements.py,sha256=-9omj5en9dSP1xMSljYVHyfXsuhuE1bO2IFj_bZPhAs,6873
|
43
39
|
pyegeria/commands/cat/list_tech_types.py,sha256=uqZcXHCzAznhEG6WWeM5j-spwUh8ycygFqpVDeXOG-0,4653
|
44
|
-
pyegeria/commands/cat/list_terms.py,sha256=
|
40
|
+
pyegeria/commands/cat/list_terms.py,sha256=D0tCD2f8j-UgnV4Bgisj9a11CCEOneNsRT7_3cyDnH4,12098
|
45
41
|
pyegeria/commands/cat/list_todos.py,sha256=NitCw0uyVVjmN1hxb1W-I4FbOsa8wQxW2ICyOElHyc8,6556
|
46
42
|
pyegeria/commands/cat/list_user_ids.py,sha256=X5Q-YNEp38saPYDuy9VwdQC5Qpa4HyC3WvAdbyp_P6M,5108
|
47
43
|
pyegeria/commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
48
|
-
pyegeria/commands/cli/egeria.py,sha256=
|
49
|
-
pyegeria/commands/cli/egeria_cat.py,sha256=
|
44
|
+
pyegeria/commands/cli/egeria.py,sha256=gT_gNVXCrd5_sR9KLoJ56CCW5T0d8cYuNBTGAJ9UVfk,52640
|
45
|
+
pyegeria/commands/cli/egeria_cat.py,sha256=_1qA7PS3fMH22j9BTGqFLnqVOTMRewP8-6jIPBvjuCI,18237
|
50
46
|
pyegeria/commands/cli/egeria_login_tui.py,sha256=W5ouG3nlN7z2Waa-wzYFS7yyoGfOrK-lNB0FMt2JdOk,9492
|
51
47
|
pyegeria/commands/cli/egeria_my.py,sha256=0KTH7OIeKyp16ZeN7zK5uhadbPfAQsq38GMzJNWYG8g,6386
|
52
48
|
pyegeria/commands/cli/egeria_ops.py,sha256=8W4t2jFGn22OOOtyUAapQH8yyOl1wo09CVNTojRQKvo,12817
|
@@ -221,7 +217,7 @@ pyegeria/commands/tech/list_valid_metadata_values.py,sha256=_zgOdq2N6s7GjLd8iEc5
|
|
221
217
|
pyegeria/commands/tech/table_tech_templates.py,sha256=jI1c9YKa3KirArMNXeCRKeaiVdwQSN-ztPqkag6jdZs,9500
|
222
218
|
pyegeria/commands/tech/x_list_related_elements.py,sha256=ynaw792VnbMZ9IXBi5mmG7xBfC0kn0esKiFTsjvLGzc,5900
|
223
219
|
pyegeria/core_omag_server_config.py,sha256=pNQpocICkZx8sRsTw5DPUe-TFyxlIo1U88qqgci_f7I,97764
|
224
|
-
pyegeria/create_tech_guid_lists.py,sha256=
|
220
|
+
pyegeria/create_tech_guid_lists.py,sha256=hf5q8Xrdsz-bqeIW3yTORZ1XB6_BrKzLDWWwC_bNG2g,4811
|
225
221
|
pyegeria/egeria_cat_client.py,sha256=d8dQNPLzL4efi99OJfH1T-Rt1N0k9Rf9LX8LpuhiFls,2179
|
226
222
|
pyegeria/egeria_client.py,sha256=RxD-iU2SiUcWG-c3I2M4dSDGBgE9oCK40edJ4kKfm3w,4135
|
227
223
|
pyegeria/egeria_config_client.py,sha256=3TZUeXSl1f7SQ2WWYTbgOu1Cu1YqApilErAgjZLzbWY,1391
|
@@ -229,9 +225,10 @@ pyegeria/egeria_my_client.py,sha256=eOKLk2zdI6FHZnhAimfR_0yNdBjpUgD41dJZcJODcqE,
|
|
229
225
|
pyegeria/egeria_tech_client.py,sha256=uycgYfCpb4jzFfaQ7I5JxbZ5PKsWdaWxLOJjbw6C2Zk,3817
|
230
226
|
pyegeria/feedback_manager_omvs.py,sha256=0xBs0p54vmdfVYYgQ8pOanLC4fxfgTk1Z61Y6D1U7_I,152978
|
231
227
|
pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kKyjvpDA,47464
|
232
|
-
pyegeria/glossary_browser_omvs.py,sha256=
|
233
|
-
pyegeria/glossary_manager_omvs.py,sha256=
|
228
|
+
pyegeria/glossary_browser_omvs.py,sha256=EA8yP7U0l8nJQi10GFEnzNecElqCy9VVBsKCGL6N4pM,108297
|
229
|
+
pyegeria/glossary_manager_omvs.py,sha256=73dTj-o6qBiQx02oe1ixpk-BTy_KrSFPTDDkf0R_bgI,70287
|
234
230
|
pyegeria/m_test.py,sha256=M5-M2ZczsAJLXWfSeqTTADHdx6Ku-y4PbQ4M21JthAE,7778
|
231
|
+
pyegeria/md_processing_utils.py,sha256=ZanhxWd9wkr0OwUSfjUqXJ40wk7ewfaMXri96g-X4zA,38736
|
235
232
|
pyegeria/mermaid_utilities.py,sha256=sQqdFUWdNpHu9d3Tk9UVe80M-5bOzses0XcFYX5FF-E,54254
|
236
233
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
237
234
|
pyegeria/my_profile_omvs.py,sha256=d0oJYCJG7pS9BINPuGciVa00ac0jwPHNANXDCLginEc,34720
|
@@ -242,16 +239,11 @@ pyegeria/runtime_manager_omvs.py,sha256=Z5wY9ignNjil8O6yjihZftxkGoh9A4PQDcXhoIsO
|
|
242
239
|
pyegeria/server_operations.py,sha256=5k0KVz3u8qRLwtz16zT3J86LZY3pkUrMDcps8srmq1A,16831
|
243
240
|
pyegeria/solution_architect_omvs.py,sha256=x6CfPTyn1l2DFYVEFP0t_rT9uVjoFr596hBBeuVaMRg,22093
|
244
241
|
pyegeria/template_manager_omvs.py,sha256=PfJ9dOfmBvf59DgRdZ9Dl1Kl_UYqjF-JncXVnbCqLZU,42408
|
245
|
-
pyegeria/test_j.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
246
|
-
pyegeria/test_m.html,sha256=q9HCstV2Ar-QiAqswte6hQ8EJuKqr5s99MUuXSxs7a8,11461
|
247
|
-
pyegeria/test_m1.html,sha256=XS_1IAtfG4ZlZk45QTkrFWWpjQMVlO21ScDMX2Frl3g,14086
|
248
|
-
pyegeria/test_mer.ipynb,sha256=G7hpHn07IXnt_VKvnTDvljwwHB7RfC0etOMyZKt1icQ,30809
|
249
|
-
pyegeria/test_w.html,sha256=q9HCstV2Ar-QiAqswte6hQ8EJuKqr5s99MUuXSxs7a8,11461
|
250
242
|
pyegeria/utils.py,sha256=GCt1C0bp0Xng1ahzbZhzV9qQwH7Dj93IaCt2dvWb-sg,5417
|
251
243
|
pyegeria/valid_metadata_omvs.py,sha256=Xq9DqBQvBFFJzaFIRKcVZ2k4gJvSh9yeXs_j-O3vn1w,65050
|
252
244
|
pyegeria/x_action_author_omvs.py,sha256=RcqSzahUKCtvb_3u_wyintAlc9WFkC_2v0E12TZs8lQ,6433
|
253
|
-
pyegeria-5.3.6.
|
254
|
-
pyegeria-5.3.6.
|
255
|
-
pyegeria-5.3.6.
|
256
|
-
pyegeria-5.3.6.
|
257
|
-
pyegeria-5.3.6.
|
245
|
+
pyegeria-5.3.6.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
246
|
+
pyegeria-5.3.6.3.dist-info/METADATA,sha256=Bkhxmvi9XtEUypSiTRWVemi1BIXdo6paMT7-PRe0B30,2743
|
247
|
+
pyegeria-5.3.6.3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
248
|
+
pyegeria-5.3.6.3.dist-info/entry_points.txt,sha256=eAvQ_vkejlF3JzMzEc5VD93ymLA_hSFV0HM8fntG-d8,6791
|
249
|
+
pyegeria-5.3.6.3.dist-info/RECORD,,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
[console_scripts]
|
2
|
+
add_term_to_category=pyegeria.commands.cat.glossary_actions:add_term_to_category
|
2
3
|
change_todo_status=pyegeria.commands.my.todo_actions:change_todo_status
|
3
4
|
create_category=pyegeria.commands.cat.glossary_actions:create_category
|
4
5
|
create_glossary=pyegeria.commands.cat.glossary_actions:create_glossary
|
@@ -8,6 +9,8 @@ delete_category=pyegeria.commands.cat.glossary_actions:delete_category
|
|
8
9
|
delete_glossary=pyegeria.commands.cat.glossary_actions:delete_glossary
|
9
10
|
delete_term=pyegeria.commands.cat.glossary_actions:delete_term
|
10
11
|
delete_todo=pyegeria.commands.my.todo_actions:delete_todo
|
12
|
+
dr_egeria_jupyter=pyegeria.commands.cat.dr_egeria_jupyter:process_jupyter_notebook
|
13
|
+
dr_egeria_md=pyegeria.commands.cat.dr_egeria_md:process_markdown_file
|
11
14
|
egeria_login=pyegeria.commands.cli.egeria_login_tui:login
|
12
15
|
export_terms_to_csv_file=pyegeria.commands.cat.glossary_actions:export_terms_csv
|
13
16
|
get_asset_graph=pyegeria.commands.cat.get_asset_graph:main
|
@@ -30,6 +33,7 @@ list_archives=pyegeria.commands.ops.list_archives:main
|
|
30
33
|
list_asset_types=pyegeria.commands.tech.list_asset_types:main
|
31
34
|
list_assets=pyegeria.commands.cat.list_assets:main
|
32
35
|
list_catalog_targets=pyegeria.commands.ops.list_catalog_targets:main
|
36
|
+
list_categories=pyegeria.commands.cat.list_categories:main
|
33
37
|
list_cert_types=pyegeria.commands.cat.list_cert_types:main
|
34
38
|
list_collections=pyegeria.commands.cat.list_collections:main
|
35
39
|
list_deployed_catalogs=pyegeria.commands.cat.list_deployed_catalogs:main
|
@@ -86,6 +90,7 @@ monitor_server_status=pyegeria.commands.ops.monitor_server_status:main
|
|
86
90
|
reassign_todo=pyegeria.commands.my.todo_actions:reassign_todo
|
87
91
|
refresh_gov_eng_config=pyegeria.commands.ops.gov_server_actions:refresh_gov_eng_config
|
88
92
|
refresh_integration_daemon=pyegeria.commands.ops.refresh_integration_daemon:main
|
93
|
+
remove_term_from_category=pyegeria.commands.cat.glossary_actions:remove_term_from_category
|
89
94
|
restart_integration_daemon=pyegeria.commands.ops.restart_integration_daemon:main
|
90
95
|
start_daemon=pyegeria.commands.ops.engine_actions:start_daemon
|
91
96
|
stop_daemon=pyegeria.commands.ops.engine_actions:stop_daemon
|
@@ -1,124 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
This is an ongoing experiment in parsing and playing with Freddie docs
|
3
|
-
"""
|
4
|
-
import json
|
5
|
-
import marko
|
6
|
-
from jupyter_notebook_parser import JupyterNotebookParser
|
7
|
-
import nbformat
|
8
|
-
import os
|
9
|
-
import re
|
10
|
-
from pyegeria import EgeriaTech
|
11
|
-
from rich import box, print
|
12
|
-
from rich.console import Console
|
13
|
-
from rich.markdown import Markdown
|
14
|
-
from rich.prompt import Prompt
|
15
|
-
from rich.table import Table
|
16
|
-
from freddie_utils import (extract_command, process_glossary_upsert_command, process_term_upsert_command,
|
17
|
-
get_current_datetime_string)
|
18
|
-
|
19
|
-
import click
|
20
|
-
from pyegeria import EgeriaTech, body_slimmer, NO_GLOSSARIES_FOUND, NO_TERMS_FOUND, NO_ELEMENTS_FOUND
|
21
|
-
from pyegeria._exceptions import (
|
22
|
-
InvalidParameterException,
|
23
|
-
PropertyServerException,
|
24
|
-
print_exception_response,
|
25
|
-
)
|
26
|
-
import datetime
|
27
|
-
|
28
|
-
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
29
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
30
|
-
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
31
|
-
EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
|
32
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
33
|
-
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
34
|
-
)
|
35
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
|
36
|
-
EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
|
37
|
-
"EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
|
38
|
-
)
|
39
|
-
EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
40
|
-
EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
41
|
-
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
42
|
-
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
43
|
-
EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 220)
|
44
|
-
EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
|
45
|
-
EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
|
46
|
-
EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
|
47
|
-
EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "/Users/dwolfson/localGit/egeria-v5-3/egeria-workspaces")
|
48
|
-
EGERIA_FREDDIE_INBOX_PATH = os.environ.get("EGERIA_FREDDIE_INBOX_PATH", "exchange/loading-bay/freddies-inbox")
|
49
|
-
EGERIA_FREDDIE_OUTBOX_PATH = os.environ.get("EGERIA_FREDDIE_OUTBOX_PATH", "exchange/distribution-hub/freddies-outbox")
|
50
|
-
commands = ["Create Glossary", "Create Term", "Create Governance Definition", "Update Term"]
|
51
|
-
console = Console(width=int(EGERIA_WIDTH))
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
@click.command("process-jupyter")
|
56
|
-
@click.option("--file-path", help="File path to notebook",
|
57
|
-
default="glossary_creation_experiment.ipynb")
|
58
|
-
@click.option("--directive", default="display-only", help="How to process the file")
|
59
|
-
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
|
60
|
-
@click.option(
|
61
|
-
"--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
62
|
-
)
|
63
|
-
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
64
|
-
@click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
65
|
-
def process_jupyter_notebook(
|
66
|
-
file_path: str,
|
67
|
-
directive: str,
|
68
|
-
server: str,
|
69
|
-
url: str,
|
70
|
-
userid: str,
|
71
|
-
user_pass: str,
|
72
|
-
):
|
73
|
-
client = EgeriaTech(server, url, user_id=userid)
|
74
|
-
token = client.create_egeria_bearer_token(userid, user_pass)
|
75
|
-
#
|
76
|
-
# parsed_notebook = JupyterNotebookParser(file_path)
|
77
|
-
#
|
78
|
-
# cell_sources = parsed_notebook.get_markdown_cell_sources()
|
79
|
-
try:
|
80
|
-
updated = False
|
81
|
-
full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_FREDDIE_INBOX_PATH, file_path)
|
82
|
-
click.echo(f"Processing notebook: {full_file_path}")
|
83
|
-
with open(full_file_path, 'r') as f:
|
84
|
-
nb = nbformat.read(f, as_version=4)
|
85
|
-
for cell in nb.cells:
|
86
|
-
if cell.cell_type == 'markdown':
|
87
|
-
if cell.source.strip().startswith('#'):
|
88
|
-
potential_command = extract_command(cell.source)
|
89
|
-
if potential_command in commands:
|
90
|
-
if potential_command in ["Create Glossary", "Update Glossary"]:
|
91
|
-
result = process_glossary_upsert_command(client, cell.source, directive)
|
92
|
-
if result:
|
93
|
-
if directive == "process":
|
94
|
-
updated = True
|
95
|
-
cell.source = result
|
96
|
-
else:
|
97
|
-
continue
|
98
|
-
if potential_command in ["Create Term", "Update Term"]:
|
99
|
-
result = process_term_upsert_command(client, cell.source, directive)
|
100
|
-
if result:
|
101
|
-
if directive == "process":
|
102
|
-
updated = True
|
103
|
-
cell.source = result
|
104
|
-
else:
|
105
|
-
continue
|
106
|
-
|
107
|
-
if updated:
|
108
|
-
path, filename = os.path.split(file_path) # Get both parts
|
109
|
-
new_filename = f"processed-{get_current_datetime_string()}-{filename}" # Create the new filename
|
110
|
-
new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_FREDDIE_OUTBOX_PATH, new_filename) # Construct the new path
|
111
|
-
os.makedirs(os.path.dirname(new_file_path), exist_ok=True)
|
112
|
-
|
113
|
-
|
114
|
-
with open(new_file_path, 'w') as f2:
|
115
|
-
nbformat.write(nb, f2)
|
116
|
-
click.echo(f"\n==>Notebook written to {new_file_path}")
|
117
|
-
|
118
|
-
except Exception as e:
|
119
|
-
print_exception_response(e)
|
120
|
-
return
|
121
|
-
|
122
|
-
|
123
|
-
if __name__ == "__main__":
|
124
|
-
process_jupyter_notebook()
|