pyegeria 5.3.2__py3-none-any.whl → 5.3.3.1__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.
Files changed (29) hide show
  1. pyegeria/.DS_Store +0 -0
  2. pyegeria/classification_manager_omvs.py +4 -4
  3. pyegeria/commands/.DS_Store +0 -0
  4. pyegeria/commands/cli/egeria.py +203 -68
  5. pyegeria/commands/cli/egeria_tech.py +251 -141
  6. pyegeria/commands/doc/.DS_Store +0 -0
  7. pyegeria/commands/doc/Visual Command Reference/.DS_Store +0 -0
  8. pyegeria/commands/doc/Visual Command Reference/cat/.DS_Store +0 -0
  9. pyegeria/commands/doc/Visual Command Reference/cat/show/.DS_Store +0 -0
  10. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/.DS_Store +0 -0
  11. pyegeria/commands/doc/glossary/.DS_Store +0 -0
  12. pyegeria/commands/doc/glossary/images/.DS_Store +0 -0
  13. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/.DS_Store +0 -0
  14. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/.DS_Store +0 -0
  15. pyegeria/commands/tech/{list_elements.py → list_all_om_type_elements.py} +2 -2
  16. pyegeria/commands/tech/{list_elements_x.py → list_all_om_type_elements_x.py} +2 -2
  17. pyegeria/commands/tech/{list_related_elements.py → list_all_related_elements.py} +1 -1
  18. pyegeria/commands/tech/list_elements_by_classification_by_property_value.py +186 -0
  19. pyegeria/commands/tech/list_elements_by_property_value.py +175 -0
  20. pyegeria/commands/tech/list_elements_by_property_value_x.py +196 -0
  21. pyegeria/commands/tech/list_elements_for_classification.py +1 -1
  22. pyegeria/commands/tech/list_related_elements_with_prop_value.py +207 -0
  23. pyegeria/commands/tech/x_list_related_elements.py +1 -1
  24. pyegeria/valid_metadata_omvs.py +1 -1
  25. {pyegeria-5.3.2.dist-info → pyegeria-5.3.3.1.dist-info}/METADATA +1 -1
  26. {pyegeria-5.3.2.dist-info → pyegeria-5.3.3.1.dist-info}/RECORD +29 -14
  27. {pyegeria-5.3.2.dist-info → pyegeria-5.3.3.1.dist-info}/entry_points.txt +7 -2
  28. {pyegeria-5.3.2.dist-info → pyegeria-5.3.3.1.dist-info}/LICENSE +0 -0
  29. {pyegeria-5.3.2.dist-info → pyegeria-5.3.3.1.dist-info}/WHEEL +0 -0
@@ -20,45 +20,29 @@ from pyegeria.commands.cli.ops_config import Config
20
20
  from pyegeria.commands.tech.get_guid_info import display_guid
21
21
  from pyegeria.commands.tech.get_tech_details import tech_details_viewer
22
22
  from pyegeria.commands.tech.list_asset_types import display_asset_types
23
- from pyegeria.commands.tech.list_elements_x import list_elements_x
24
23
  from pyegeria.commands.tech.list_registered_services import display_registered_svcs
25
24
  from pyegeria.commands.tech.list_relationship_types import display_relationship_types
26
25
  from pyegeria.commands.tech.list_tech_templates import display_templates_spec
27
26
  from pyegeria.commands.tech.list_valid_metadata_values import display_metadata_values
28
- from pyegeria.commands.tech.get_tech_type_template import template_viewer
29
27
  from pyegeria.commands.tech.list_anchored_elements import display_anchored_elements
30
- from pyegeria.commands.tech.list_elements import list_elements
28
+ from pyegeria.commands.tech.list_all_om_type_elements import list_elements
29
+ from pyegeria.commands.tech.list_all_om_type_elements_x import list_elements_x
30
+ from pyegeria.commands.tech.list_elements_by_classification_by_property_value import find_elements_by_classification_by_prop_value
31
+ from pyegeria.commands.tech.list_elements_by_property_value import find_elements_by_prop_value
32
+ from pyegeria.commands.tech.list_elements_by_property_value_x import find_elements_by_prop_value_x
33
+ from pyegeria.commands.tech.list_related_elements_with_prop_value import list_related_elements_with_prop_value
31
34
 
32
35
  from pyegeria.commands.tech.get_element_info import display_elements
33
36
  from pyegeria.commands.tech.list_related_specification import (
34
37
  display_related_specification,
35
38
  )
36
- from pyegeria.commands.tech.list_related_elements import list_related_elements
39
+ from pyegeria.commands.tech.list_all_related_elements import list_related_elements
37
40
  from pyegeria.commands.tech.list_elements_for_classification import (
38
41
  list_classified_elements,
39
42
  )
40
43
  from pyegeria.commands.tech.list_gov_action_processes import display_gov_processes
41
44
  from pyegeria.commands.tech.get_tech_type_template import template_viewer
42
45
 
43
- # from pyegeria import ServerOps
44
-
45
-
46
- # class Config(object):
47
- # def __init__(self, server: str = None, url: str = None, userid:str = None, password:str = None,
48
- # timeout:int = 30, paging: bool = False):
49
- # self.server = server
50
- # self.url = url
51
- # self.userid = userid
52
- # self.password = password
53
- # self.timeout = timeout
54
- # self.paging = paging
55
- #
56
- #
57
- # pass_config = click.make_pass_decorator(Config)
58
-
59
-
60
- # @tui
61
- # @tui('menu', 'menu', 'A textual command line interface')
62
46
  @tui()
63
47
  @click.version_option("0.0.1", prog_name="egeria_ops")
64
48
  @click.group()
@@ -229,39 +213,21 @@ def show_guid_info(ctx, guid):
229
213
  display_guid(guid, c.server, c.url, c.userid, c.password, c.jupyter, c.width)
230
214
 
231
215
 
232
- @show_elements.command("related-specifications")
233
- @click.pass_context
234
- @click.argument("element-guid")
235
- def show_related_specifications(ctx, element_guid):
236
- """List specifications related to the given Element"""
237
- c = ctx.obj
238
- display_related_specification(
239
- element_guid,
240
- c.view_server,
241
- c.view_server_url,
242
- c.userid,
243
- c.password,
244
- c.jupyter,
245
- c.width,
246
- )
247
-
248
-
249
- @show_elements.command("anchored-elements")
216
+ @show_elements.command("anchored_elements")
250
217
  @click.pass_context
251
218
  @click.option(
252
- "--search-string",
253
- default="SoftwareCapability",
219
+ "--property_value",
220
+ default="DeployedDatabaseSchema",
254
221
  help="value we are searching for",
255
222
  )
256
223
  @click.option(
257
224
  "--prop-list",
258
- default="anchorDomainName",
225
+ default="anchorTypeName",
259
226
  help="List of properties we are searching",
260
227
  )
261
228
  def list_anchored_elements(ctx, search_string: str, prop_list: str):
262
- """List elements with the specified properties"""
229
+ """List anchored elements with the specified properties"""
263
230
  c = ctx.obj
264
- # put guards around this to make it a list?
265
231
  if type(prop_list) is str:
266
232
  property_names = prop_list.split(",")
267
233
  elif type(prop_list) is list:
@@ -270,10 +236,9 @@ def list_anchored_elements(ctx, search_string: str, prop_list: str):
270
236
  property_names = []
271
237
  print(f"\nError --> Invalid property list - must be a string or list")
272
238
  sys.exit(4)
273
-
274
239
  display_anchored_elements(
275
240
  search_string,
276
- property_names,
241
+ [prop_list],
277
242
  c.view_server,
278
243
  c.view_server_url,
279
244
  c.userid,
@@ -283,6 +248,208 @@ def list_anchored_elements(ctx, search_string: str, prop_list: str):
283
248
  c.width,
284
249
  )
285
250
 
251
+ @show_elements.command("elements-by-classification")
252
+ @click.option(
253
+ "--om-type",
254
+ default="Referenceable",
255
+ help="Open Metadata type to filter by",
256
+ )
257
+ @click.option(
258
+ "--classification",
259
+ default="GovernanceProject",
260
+ help="Classification to filter byt",
261
+ )
262
+ @click.pass_context
263
+ def show_elements_by_classification(ctx, om_type, classification):
264
+ """Show elements by classification"""
265
+ c = ctx.obj
266
+ list_classified_elements(
267
+ om_type,
268
+ classification,
269
+ c.view_server,
270
+ c.view_server_url,
271
+ c.userid,
272
+ c.password,
273
+ c.jupyter,
274
+ c.width,
275
+ )
276
+
277
+ @show_elements.command("elements-by-classification-by-prop-value")
278
+ @click.option(
279
+ "--classification",
280
+ default="GovernanceProject",
281
+ help="Classification to filter by",
282
+ )
283
+ @click.option(
284
+ "--property_value",
285
+ help="Property value to filter by",
286
+ )
287
+ @click.option(
288
+ "--property_names",
289
+ help="List of properties to search by",
290
+ )
291
+ @click.option(
292
+ "--om-type",
293
+ default="Referenceable",
294
+ help="Open Metadata type to filter by",
295
+ )
296
+ @click.pass_context
297
+ def show_elements_by_classification_by_prop(ctx, classification, property_value, property_names, om_type):
298
+ """Show elements by classification and property value"""
299
+ c = ctx.obj
300
+ find_elements_by_classification_by_prop_value(
301
+ om_type,
302
+ classification,
303
+ property_value,
304
+ [property_names],
305
+ c.view_server,
306
+ c.view_server_url,
307
+ c.userid,
308
+ c.password,
309
+ c.jupyter,
310
+ c.width,
311
+ )
312
+
313
+ @show_elements.command("elements-by-prop-value")
314
+ @click.option(
315
+ "--property_value",
316
+ help="Property value to filter by",
317
+ )
318
+ @click.option(
319
+ "--property_names",
320
+ help="List of properties to search by",
321
+ )
322
+ @click.option(
323
+ "--om-type",
324
+ default="Referenceable",
325
+ help="Open Metadata type to filter by",
326
+ )
327
+ @click.option(
328
+ "--extended",
329
+ is_flag=True,
330
+ default=False,
331
+ help="If True, feedback information is displayed",
332
+ )
333
+ @click.pass_context
334
+ def show_elements_by_classification_by_prop(ctx,property_value, property_names, om_type, extended):
335
+ """Show elements by classification and property value"""
336
+ c = ctx.obj
337
+ if extended:
338
+ find_elements_by_prop_value_x(
339
+ om_type,
340
+ property_value,
341
+ [property_names],
342
+ c.view_server,
343
+ c.view_server_url,
344
+ c.userid,
345
+ c.password,
346
+ c.jupyter,
347
+ c.width,
348
+ )
349
+ else:
350
+ find_elements_by_prop_value(
351
+ om_type,
352
+ property_value,
353
+ [property_names],
354
+ c.view_server,
355
+ c.view_server_url,
356
+ c.userid,
357
+ c.password,
358
+ c.jupyter,
359
+ c.width,
360
+ )
361
+
362
+ @show_elements.command("related-elements")
363
+ @click.option(
364
+ "--element-guid",
365
+ help="GUID of the Element to navigate from.",
366
+ )
367
+ @click.option(
368
+ "--om-type",
369
+ default="Referenceable",
370
+ help="Open metadata type to filter by.",
371
+ )
372
+ @click.option(
373
+ "--rel-type",
374
+ default="Certification",
375
+ help="Relationship type to follow.",
376
+ )
377
+ @click.pass_context
378
+ def show_related_elements(ctx, element_guid, om_type, rel_type):
379
+ """Show all elements related to specified guid"""
380
+ c = ctx.obj
381
+ list_related_elements(
382
+ element_guid,
383
+ om_type,
384
+ rel_type,
385
+ c.view_server,
386
+ c.view_server_url,
387
+ c.userid,
388
+ c.password,
389
+ c.jupyter,
390
+ c.width,
391
+ )
392
+
393
+
394
+ @show_elements.command("related-elements_by_prop")
395
+ @click.option(
396
+ "--element-guid",
397
+ help="GUID of the Element to navigate from.",
398
+ )
399
+ @click.option(
400
+ "--rel-type",
401
+ default="Certification",
402
+ help="Relationship type to follow.",
403
+ )
404
+ @click.option(
405
+ "--property_value",
406
+ help="Property value to filter by",
407
+ )
408
+ @click.option(
409
+ "--property_names",
410
+ help="List of properties to search by",
411
+ )
412
+ @click.option(
413
+ "--om-type",
414
+ default="Referenceable",
415
+ help="Open metadata type to filter by.",
416
+ )
417
+
418
+ @click.pass_context
419
+ def show_related_elements(ctx, element_guid, rel_type, property_value, property_names, om_type):
420
+ """Show elements related to specified guid and property value"""
421
+ c = ctx.obj
422
+ list_related_elements_with_prop_value(
423
+ element_guid,
424
+ rel_type,
425
+ property_value,
426
+ [property_names],
427
+ om_type,
428
+ c.view_server,
429
+ c.view_server_url,
430
+ c.userid,
431
+ c.password,
432
+ c.jupyter,
433
+ c.width,
434
+ )
435
+
436
+
437
+ @show_elements.command("related-specifications")
438
+ @click.pass_context
439
+ @click.argument("element-guid")
440
+ def show_related_specifications(ctx, element_guid):
441
+ """List specifications related to the given Element"""
442
+ c = ctx.obj
443
+ display_related_specification(
444
+ element_guid,
445
+ c.view_server,
446
+ c.view_server_url,
447
+ c.userid,
448
+ c.password,
449
+ c.jupyter,
450
+ c.width,
451
+ )
452
+
286
453
 
287
454
  @show_tech.command("tech-types")
288
455
  @click.option("--search-string", default="*", help="Tech type to search for")
@@ -391,7 +558,7 @@ def show_registered_services(ctx, services):
391
558
  @show_info.command("relationship-types")
392
559
  @click.option(
393
560
  "--om-type",
394
- default="AssetOwner",
561
+ default="Referenceable",
395
562
  help="Relationship type to get information about",
396
563
  )
397
564
  @click.pass_context
@@ -410,63 +577,6 @@ def show_relationship_types(ctx, rel_type):
410
577
  )
411
578
 
412
579
 
413
- @show_elements.command("elements-by-classification")
414
- @click.option(
415
- "--om-type",
416
- default="Project",
417
- help="Open Metadata type to filter by",
418
- )
419
- @click.option(
420
- "--classification",
421
- default="GovernanceProject",
422
- help="Classification to filter byt",
423
- )
424
- @click.pass_context
425
- def show_elements_by_classification(ctx, om_type, classification):
426
- """Show elements by classification"""
427
- c = ctx.obj
428
- list_classified_elements(
429
- om_type,
430
- classification,
431
- c.view_server,
432
- c.view_server_url,
433
- c.userid,
434
- c.password,
435
- c.jupyter,
436
- c.width,
437
- )
438
-
439
-
440
- @show_elements.command("related-elements")
441
- @click.option(
442
- "--element-guid",
443
- help="GUID of the Element to navigate from.",
444
- )
445
- @click.option(
446
- "--om-type",
447
- default="Project",
448
- help="Open metadata type to filter by.",
449
- )
450
- @click.option(
451
- "--rel-type",
452
- default="Certification",
453
- help="Relationship type to follow.",
454
- )
455
- @click.pass_context
456
- def show_related_elements(ctx, element_guid, om_type, rel_type):
457
- """Show information about related elements"""
458
- c = ctx.obj
459
- list_related_elements(
460
- element_guid,
461
- om_type,
462
- rel_type,
463
- c.view_server,
464
- c.view_server_url,
465
- c.userid,
466
- c.password,
467
- c.jupyter,
468
- c.width,
469
- )
470
580
 
471
581
 
472
582
  @show_tech.command("tech-templates")
@@ -544,44 +654,12 @@ def valid_metadata_values(ctx, property, type_name):
544
654
  )
545
655
 
546
656
 
547
- @show_elements.command("elements")
548
- @click.pass_context
549
- @click.option(
550
- "--extended",
551
- is_flag=True,
552
- default=False,
553
- help="If True, feedback information is displayed",
554
- )
555
- @click.option("--om_type", default="Organization", help="Metadata type to query")
556
- def list_element_info(ctx, om_type, extended):
557
- """Display elements of a specific Open Metadata Type"""
558
- c = ctx.obj
559
- if extended:
560
- list_elements_x(
561
- om_type,
562
- c.view_server,
563
- c.view_server_url,
564
- c.userid,
565
- c.password,
566
- c.jupyter,
567
- c.width,
568
- )
569
- else:
570
- list_elements(
571
- om_type,
572
- c.view_server,
573
- c.view_server_url,
574
- c.userid,
575
- c.password,
576
- c.jupyter,
577
- c.width,
578
- )
579
657
 
580
658
 
581
659
  @show_info.command("processes")
582
660
  @click.pass_context
583
661
  def list_element_info(ctx):
584
- """Display the valid metadata values for a property and type"""
662
+ """Display processes"""
585
663
  c = ctx.obj
586
664
  list_elements(
587
665
  "GovernanceActionProcess",
@@ -596,9 +674,9 @@ def list_element_info(ctx):
596
674
 
597
675
  @show_elements.command("get-elements")
598
676
  @click.pass_context
599
- @click.option("--om_type", default="Project", help="Metadata type to query")
677
+ @click.option("--om_type", default="Referenceable", help="Metadata type to query")
600
678
  def get_element_info(ctx, om_type):
601
- """Display the elements for an Open Metadata Type"""
679
+ """Display graph of elements for an Open Metadata Type"""
602
680
  c = ctx.obj
603
681
  display_elements(
604
682
  om_type,
@@ -610,6 +688,38 @@ def get_element_info(ctx, om_type):
610
688
  c.width,
611
689
  )
612
690
 
691
+ @show_elements.command("elements")
692
+ @click.pass_context
693
+ @click.option(
694
+ "--extended",
695
+ is_flag=True,
696
+ default=False,
697
+ help="If True, feedback information is displayed",
698
+ )
699
+ @click.option("--om_type", default="Referenceable", help="Metadata type to query")
700
+ def list_all_om_type_elements(ctx, om_type, extended):
701
+ """Display all elements of a specific Open Metadata Type"""
702
+ c = ctx.obj
703
+ if extended:
704
+ list_elements_x(
705
+ om_type,
706
+ c.view_server,
707
+ c.view_server_url,
708
+ c.userid,
709
+ c.password,
710
+ c.jupyter,
711
+ c.width
712
+ )
713
+ else:
714
+ list_elements(
715
+ om_type,
716
+ c.view_server,
717
+ c.view_server_url,
718
+ c.userid,
719
+ c.password,
720
+ c.jupyter,
721
+ c.width
722
+ )
613
723
 
614
724
  #
615
725
  # Tell
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- """This creates a templates guid file from the core metadata archive"""
1
+ """This lists all elemeents of an oopen metadata type"""
2
2
  from rich.markdown import Markdown
3
3
  from rich.prompt import Prompt
4
4
  import os
@@ -157,7 +157,7 @@ def main():
157
157
 
158
158
  try:
159
159
  om_type = Prompt.ask(
160
- "Enter the Open Metadata Type to find elements of:", default="GlossaryTerm"
160
+ "Enter the Open Metadata Type to find elements of:", default="Referenceable"
161
161
  )
162
162
  list_elements(om_type, server, url, userid, password)
163
163
  except KeyboardInterrupt:
@@ -1,4 +1,4 @@
1
- """This creates a templates guid file from the core metadata archive"""
1
+ """List elements """
2
2
  from rich.markdown import Markdown
3
3
  from rich.prompt import Prompt
4
4
  import os
@@ -180,7 +180,7 @@ def main():
180
180
 
181
181
  try:
182
182
  om_type = Prompt.ask(
183
- "Enter the Open Metadata Type to find elements of:", default="GlossaryTerm"
183
+ "Enter the Open Metadata Type to find elements of:", default="Referenceable"
184
184
  )
185
185
  list_elements_x(om_type, server, url, userid, password)
186
186
  except KeyboardInterrupt:
@@ -187,7 +187,7 @@ def main():
187
187
  try:
188
188
  element_guid = Prompt.ask("Guid of base element").strip()
189
189
  om_type = Prompt.ask(
190
- "Enter the Open Metadata Type to find elements of", default=None
190
+ "Enter the Open Metadata Type to find elements of", default="Referenceable"
191
191
  )
192
192
  relationship_type = Prompt.ask("Enter the relationship type to follow")
193
193