pyegeria 5.4.0.25__py3-none-any.whl → 5.4.0.27__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 (52) hide show
  1. commands/cat/debug_log +868 -7794
  2. commands/cat/debug_log.2025-08-18_11-34-38_088636.zip +0 -0
  3. commands/cat/list_collections.py +1 -1
  4. commands/cat/list_format_set.py +6 -8
  5. commands/cli/egeria.py +2 -2
  6. commands/cli/egeria_cat.py +3 -2
  7. commands/ops/load_archive.py +2 -2
  8. md_processing/data/commands.json +7 -7
  9. md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +7 -7
  10. md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +36 -31
  11. md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:22-dr_egeria_intro_part1.md +312 -0
  12. md_processing/dr_egeria_outbox/friday/processed-2025-08-22 21:23-dr_egeria_intro_part1.md +265 -0
  13. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:06-dr_egeria_intro_part1.md +230 -0
  14. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:30-dr_egeria_intro_part1.md +296 -0
  15. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 15:31-dr_egeria_intro_part1.md +253 -0
  16. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:08-dr_egeria_intro_part2.md +343 -0
  17. md_processing/dr_egeria_outbox/friday/processed-2025-08-23 16:12-dr_egeria_intro_part2.md +343 -0
  18. md_processing/md_commands/glossary_commands.py +888 -951
  19. md_processing/md_commands/product_manager_commands.py +8 -270
  20. md_processing/md_commands/project_commands.py +1 -1
  21. md_processing/md_processing_utils/common_md_proc_utils.py +138 -64
  22. md_processing/md_processing_utils/common_md_utils.py +2 -1
  23. pyegeria/__init__.py +5 -302
  24. pyegeria/_client_new.py +5 -4
  25. pyegeria/_output_formats.py +23 -3
  26. pyegeria/collection_manager.py +31 -28
  27. pyegeria/{load_config.py → config.py} +7 -2
  28. pyegeria/data_designer.py +154 -194
  29. pyegeria/egeria_cat_client.py +48 -30
  30. pyegeria/egeria_client.py +74 -75
  31. pyegeria/egeria_config_client.py +37 -7
  32. pyegeria/egeria_my_client.py +45 -10
  33. pyegeria/egeria_tech_client.py +69 -58
  34. pyegeria/glossary_manager.py +494 -122
  35. pyegeria/governance_officer.py +2 -2
  36. pyegeria/logging_configuration.py +1 -4
  37. pyegeria/models.py +1 -1
  38. pyegeria/project_manager.py +381 -741
  39. pyegeria/solution_architect_omvs.py +1 -1
  40. pyegeria/utils.py +1 -3
  41. {pyegeria-5.4.0.25.dist-info → pyegeria-5.4.0.27.dist-info}/METADATA +1 -1
  42. {pyegeria-5.4.0.25.dist-info → pyegeria-5.4.0.27.dist-info}/RECORD +45 -44
  43. commands/cat/debug_log.2025-08-15_09-14-07_444802.zip +0 -0
  44. commands/cat/debug_log.2025-08-16_10-21-59_388912.zip +0 -0
  45. commands/cat/debug_log.2025-08-17_11-34-27_981852.zip +0 -0
  46. md_processing/md_processing_utils/solution_architect_log.log +0 -0
  47. pyegeria/collection_manager_omvs.py +0 -6541
  48. pyegeria/glossary_browser.py +0 -1259
  49. pyegeria/project_manager_omvs.py +0 -1933
  50. {pyegeria-5.4.0.25.dist-info → pyegeria-5.4.0.27.dist-info}/LICENSE +0 -0
  51. {pyegeria-5.4.0.25.dist-info → pyegeria-5.4.0.27.dist-info}/WHEEL +0 -0
  52. {pyegeria-5.4.0.25.dist-info → pyegeria-5.4.0.27.dist-info}/entry_points.txt +0 -0
@@ -8,33 +8,19 @@ Copyright Contributors to the ODPi Egeria project.
8
8
  """
9
9
 
10
10
  import asyncio
11
- import inspect
12
- from datetime import datetime
13
- from typing import Optional, Annotated, Literal, Union
14
11
 
15
- from loguru import logger
16
- from pydantic import ValidationError, Field, HttpUrl
17
-
18
- from pyegeria._exceptions_new import PyegeriaInvalidParameterException
19
- from pyegeria._globals import NO_ELEMENTS_FOUND, NO_GUID_RETURNED, NO_MEMBERS_FOUND
20
- from pyegeria._output_formats import select_output_format_set, get_output_format_type_match
12
+ from pyegeria._client_new import Client2
21
13
  from pyegeria.load_config import get_app_config
22
14
  from pyegeria.models import (SearchStringRequestBody, FilterRequestBody, GetRequestBody, NewElementRequestBody,
23
- ReferenceableProperties, InitialClassifications, TemplateRequestBody,
24
- UpdateElementRequestBody, UpdateStatusRequestBody, NewRelationshipRequestBody,
25
- DeleteRequestBody, UpdateRelationshipRequestBody, ResultsRequestBody,
26
- get_defined_field_values, PyegeriaModel)
27
- from pyegeria.output_formatter import (generate_output,
28
- _extract_referenceable_properties, populate_columns_from_properties,
29
- get_required_relationships)
30
- from pyegeria._client_new import Client2
15
+ TemplateRequestBody)
31
16
  from pyegeria.utils import body_slimmer, dynamic_catch
32
17
 
33
-
34
18
  app_settings = get_app_config()
35
19
  EGERIA_LOCAL_QUALIFIER = app_settings.User_Profile.egeria_local_qualifier
36
20
  from pyegeria._globals import NO_ELEMENTS_FOUND, NO_PROJECTS_FOUND
37
21
 
22
+ PROJECT_TYPES = ["Project", "Campaign", "StudyProject", "Task", "PersonalProject"]
23
+
38
24
  class ProjectManager(Client2):
39
25
  """
40
26
  Create and manage projects. Projects may be organized in a hierarchy.
@@ -54,33 +40,36 @@ class ProjectManager(Client2):
54
40
  """
55
41
 
56
42
  def __init__(
57
- self,
58
- view_server: str,
59
- platform_url: str,
60
- user_id: str,
61
- user_pwd: str = None,
62
- token: str = None,
63
- ):
43
+ self,
44
+ view_server: str,
45
+ platform_url: str,
46
+ user_id: str,
47
+ user_pwd: str = None,
48
+ token: str = None,
49
+ ):
64
50
  self.view_server = view_server
65
51
  self.platform_url = platform_url
66
52
  self.user_id = user_id
67
53
  self.user_pwd = user_pwd
68
54
  self.project_command_base: str = (
69
- f"/api/open-metadata/project-manager/metadata-elements"
55
+ f"/api/open-metadata/project-manager/projects"
70
56
  )
71
- Client.__init__(self, view_server, platform_url, user_id, user_pwd, token)
57
+ Client2.__init__(self, view_server, platform_url, user_id, user_pwd, token)
58
+
72
59
 
60
+ def _generate_project_output(self):
61
+ pass
73
62
  #
74
63
  # Retrieving Projects= Information - https://egeria-project.org/concepts/project
75
64
  #
76
65
  async def _async_get_linked_projects(
77
- self,
78
- parent_guid: str,
79
- project_status: str = None,
80
- effective_time: str = None,
81
- start_from: int = 0,
82
- page_size: int = None,
83
- ) -> list | str:
66
+ self,
67
+ parent_guid: str,
68
+ project_status: str = None,
69
+ effective_time: str = None,
70
+ start_from: int = 0,
71
+ page_size: int = None,
72
+ ) -> list | str:
84
73
  """Returns the list of projects that are linked off of the supplied element. Any relationship will do.
85
74
  The request body is optional, but if supplied acts as a filter on project status. Async version.
86
75
 
@@ -122,7 +111,7 @@ class ProjectManager(Client2):
122
111
  body = {
123
112
  "filter": project_status,
124
113
  "effectiveTime": effective_time,
125
- }
114
+ }
126
115
  body_s = body_slimmer(body)
127
116
  url = (
128
117
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/"
@@ -133,13 +122,13 @@ class ProjectManager(Client2):
133
122
  return resp.json().get("elements", "No linked projects found")
134
123
 
135
124
  def get_linked_projects(
136
- self,
137
- parent_guid: str,
138
- project_status: str = None,
139
- effective_time: str = None,
140
- start_from: int = 0,
141
- page_size: int = None,
142
- ) -> list | str:
125
+ self,
126
+ parent_guid: str,
127
+ project_status: str = None,
128
+ effective_time: str = None,
129
+ start_from: int = 0,
130
+ page_size: int = None,
131
+ ) -> list | str:
143
132
  """Returns the list of projects that are linked off of the supplied element. Any relationship will do.
144
133
  The request body is optional, but if supplied acts as a filter on project status.
145
134
 
@@ -182,17 +171,17 @@ class ProjectManager(Client2):
182
171
  effective_time,
183
172
  start_from,
184
173
  page_size,
174
+ )
185
175
  )
186
- )
187
176
  return resp
188
177
 
189
178
  async def _async_get_classified_projects(
190
- self,
191
- project_classification: str,
192
- effective_time: str = None,
193
- start_from: int = 0,
194
- page_size: int = None,
195
- ) -> list | str:
179
+ self,
180
+ project_classification: str,
181
+ effective_time: str = None,
182
+ start_from: int = 0,
183
+ page_size: int = None,
184
+ ) -> list | str:
196
185
  """Returns the list of projects with a particular classification. The name of the classification is
197
186
  supplied in the request body. Examples of these classifications include StudyProject, PersonalProject,
198
187
  Campaign or Task. There is also GlossaryProject and GovernanceProject. Async version.
@@ -233,7 +222,7 @@ class ProjectManager(Client2):
233
222
  body = {
234
223
  "filter": project_classification,
235
224
  "effectiveTime": effective_time,
236
- }
225
+ }
237
226
  body_s = body_slimmer(body)
238
227
  url = (
239
228
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/"
@@ -244,12 +233,12 @@ class ProjectManager(Client2):
244
233
  return resp.json()
245
234
 
246
235
  def get_classified_projects(
247
- self,
248
- project_classification: str,
249
- effective_time: str = None,
250
- start_from: int = 0,
251
- page_size: int = None,
252
- ) -> list | str:
236
+ self,
237
+ project_classification: str,
238
+ effective_time: str = None,
239
+ start_from: int = 0,
240
+ page_size: int = None,
241
+ ) -> list | str:
253
242
  """Returns the list of projects with a particular classification. The name of the classification is
254
243
  supplied in the request body. Examples of these classifications include StudyProject, PersonalProject,
255
244
  Campaign or Task. There is also GlossaryProject and GovernanceProject.
@@ -290,18 +279,18 @@ class ProjectManager(Client2):
290
279
  effective_time,
291
280
  start_from,
292
281
  page_size,
282
+ )
293
283
  )
294
- )
295
284
  return resp
296
285
 
297
286
  async def _async_get_project_team(
298
- self,
299
- project_guid: str,
300
- team_role: str = None,
301
- effective_time: str = None,
302
- start_from: int = 0,
303
- page_size: int = None,
304
- ) -> list | str:
287
+ self,
288
+ project_guid: str,
289
+ team_role: str = None,
290
+ effective_time: str = None,
291
+ start_from: int = 0,
292
+ page_size: int = None,
293
+ ) -> list | str:
305
294
  """Returns the list of actors that are linked off of the project. This includes the project managers.
306
295
  The optional request body allows a teamRole to be specified as a filter. To filter out the project managers,
307
296
  specify ProjectManagement as the team role. See https://egeria-project.org/concepts/project for details.
@@ -355,13 +344,13 @@ class ProjectManager(Client2):
355
344
  return result
356
345
 
357
346
  def get_project_team(
358
- self,
359
- project_guid: str,
360
- team_role: str = None,
361
- effective_time: str = None,
362
- start_from: int = 0,
363
- page_size: int = None,
364
- ) -> list | str:
347
+ self,
348
+ project_guid: str,
349
+ team_role: str = None,
350
+ effective_time: str = None,
351
+ start_from: int = 0,
352
+ page_size: int = None,
353
+ ) -> list | str:
365
354
  """Returns the list of actors that are linked off of the project. This includes the project managers.
366
355
  The optional request body allows a teamRole to be specified as a filter. To filter out the project managers,
367
356
  specify ProjectManagement as the team role. See https://egeria-project.org/concepts/project for details.
@@ -406,20 +395,22 @@ class ProjectManager(Client2):
406
395
  effective_time,
407
396
  start_from,
408
397
  page_size,
398
+ )
409
399
  )
410
- )
411
400
  return resp
412
401
 
402
+ @dynamic_catch
413
403
  async def _async_find_projects(
414
- self,
415
- search_string: str,
416
- effective_time: str = None,
417
- starts_with: bool = False,
418
- ends_with: bool = False,
419
- ignore_case: bool = False,
420
- start_from: int = 0,
421
- page_size: int = None,
422
- ) -> list | str:
404
+ self,
405
+ search_string: str, classification_names: list[str] = None, metadata_element_types: list[str] = None,
406
+ starts_with: bool = False,
407
+ ends_with: bool = False,
408
+ ignore_case: bool = False,
409
+ start_from: int = 0,
410
+ page_size: int = 0,
411
+ output_format: str = "json", output_format_set: str | dict = None,
412
+ body: dict | SearchStringRequestBody = None
413
+ ) -> list | str:
423
414
  """Returns the list of projects matching the search string.
424
415
  The search string is located in the request body and is interpreted as a plain string.
425
416
  The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
@@ -461,41 +452,36 @@ class ProjectManager(Client2):
461
452
 
462
453
  """
463
454
 
464
- if page_size is None:
465
- page_size = self.page_size
466
- starts_with_s = str(starts_with).lower()
467
- ends_with_s = str(ends_with).lower()
468
- ignore_case_s = str(ignore_case).lower()
469
-
470
- validate_search_string(search_string)
471
-
472
- if search_string == "*":
473
- search_string = None
474
-
475
- body = {
476
- "filter": search_string,
477
- "effective_time": effective_time,
478
- }
479
- body_s = body_slimmer(body)
480
455
  url = (
481
456
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
482
- f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
483
- f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
457
+ f"by-search-string"
484
458
  )
485
459
 
486
- resp = await self._async_make_request("POST", url, body_s)
487
- return resp.json().get("elements", NO_ELEMENTS_FOUND)
460
+ response = await self._async_find_request(url, _type="Project",
461
+ _gen_output=self._generate_project_output,
462
+ search_string=search_string,
463
+ classification_names=classification_names,
464
+ metadata_element_types=metadata_element_types,
465
+ starts_with=starts_with, ends_with=ends_with, ignore_case=ignore_case,
466
+ start_from=start_from, page_size=page_size,
467
+ output_format=output_format, output_format_set=output_format_set,
468
+ body=body)
469
+
470
+ return response
488
471
 
472
+ @dynamic_catch
489
473
  def find_projects(
490
- self,
491
- search_string: str,
492
- effective_time: str = None,
493
- starts_with: bool = False,
494
- ends_with: bool = False,
495
- ignore_case: bool = False,
496
- start_from: int = 0,
497
- page_size: int = None,
498
- ) -> list | str:
474
+ self,
475
+ search_string: str, classification_names: list[str] = None, metadata_element_types: list[str] = None,
476
+ starts_with: bool = False,
477
+ ends_with: bool = False,
478
+ ignore_case: bool = False,
479
+ start_from: int = 0,
480
+ page_size: int = 0,
481
+ output_format: str = "json", output_format_set: str | dict = None,
482
+ body: dict | SearchStringRequestBody = None
483
+ ) -> list | str:
484
+
499
485
  """Returns the list of projects matching the search string.
500
486
  The search string is located in the request body and is interpreted as a plain string.
501
487
  The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
@@ -539,212 +525,192 @@ class ProjectManager(Client2):
539
525
  resp = loop.run_until_complete(
540
526
  self._async_find_projects(
541
527
  search_string,
542
- effective_time,
528
+ classification_names,
529
+ metadata_element_types,
543
530
  starts_with,
544
531
  ends_with,
545
532
  ignore_case,
546
533
  start_from,
547
534
  page_size,
535
+ output_format,
536
+ output_format_set,
537
+ body,
538
+ )
548
539
  )
549
- )
550
540
 
551
541
  return resp
552
542
 
543
+ @dynamic_catch
553
544
  async def _async_get_projects_by_name(
554
- self,
555
- name: str,
556
- effective_time: str = None,
557
- start_from: int = 0,
558
- page_size: int = None,
559
- ) -> list | str:
560
- """Returns the list of projects with a particular name. Async version.
561
-
562
- Parameters
563
- ----------
564
- name: str,
565
- name to use to find matching collections.
566
- effective_time: str, [default=None], optional
567
- Effective time of the query. If not specified will default to any time. ISO 8601 format.
568
-
569
- start_from: int, [default=0], optional
570
- When multiple pages of results are available, the page number to start from.
571
- page_size: int, [default=None]
572
- The number of items to return in a single page. If not specified, the default will be taken from
573
- the class instance.
574
- Returns
575
- -------
576
- List | str
577
-
578
- A list of collections match matching the name. Returns a string if none found.
579
-
580
- Raises
581
- ------
582
-
583
- InvalidParameterException
584
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
585
- PropertyServerException
586
- Raised by the server when an issue arises in processing a valid request
587
- NotAuthorizedException
588
- The principle specified by the user_id does not have authorization for the requested action
589
-
590
- """
591
-
592
- if page_size is None:
593
- page_size = self.page_size
594
-
595
- validate_search_string(name)
596
-
597
- body = {
598
- "filter": name,
599
- "effective_time": effective_time,
600
- }
601
- body_s = body_slimmer(body)
602
- url = (
603
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
604
- f"by-name?startFrom={start_from}&pageSize={page_size}"
605
- )
606
-
607
- resp = await self._async_make_request("POST", url, body_s)
608
- return resp.json().get("elements", NO_PROJECTS_FOUND)
609
-
545
+ self, filter_string: str = None, classification_names: list[str] = None,
546
+ body: dict | FilterRequestBody = None,
547
+ start_from: int = 0, page_size: int = 0,
548
+ output_format: str = 'JSON',
549
+ output_format_set: str | dict = None) -> list | str:
550
+ url = f"{self.project_command_base}/by-name"
551
+
552
+ response = await self._async_get_name_request(url, _type="Projects",
553
+ _gen_output=self._generate_projects_output,
554
+ filter_string=filter_string,
555
+ classification_names=classification_names,
556
+ start_from=start_from, page_size=page_size,
557
+ output_format=output_format, output_format_set=output_format_set,
558
+ body=body)
559
+
560
+ return response
561
+
562
+ @dynamic_catch
610
563
  def get_projects_by_name(
611
- self,
612
- name: str,
613
- effective_time: str = None,
614
- start_from: int = 0,
615
- page_size: int = None,
616
- ) -> list | str:
617
- """Returns the list of projects with a particular name.
618
-
619
- Parameters
620
- ----------
621
- name: str,
622
- name to use to find matching collections.
623
- effective_time: str, [default=None], optional
624
- Effective time of the query. If not specified will default to any time. ISO 8601 format.
625
-
626
- start_from: int, [default=0], optional
627
- When multiple pages of results are available, the page number to start from.
628
- page_size: int, [default=None]
629
- The number of items to return in a single page. If not specified, the default will be taken from
630
- the class instance.
631
- Returns
632
- -------
633
- List | str
564
+ self, filter_string: str = None, classification_names: list[str] = None,
565
+ body: dict | FilterRequestBody = None,
566
+ start_from: int = 0, page_size: int = 0,
567
+ output_format: str = 'JSON',
568
+ output_format_set: str | dict = None) -> list | str:
634
569
 
635
- A list of collections match matching the name. Returns a string if none found.
636
-
637
- Raises
638
- ------
639
-
640
- InvalidParameterException
641
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
642
- PropertyServerException
643
- Raised by the server when an issue arises in processing a valid request
644
- NotAuthorizedException
645
- The principle specified by the user_id does not have authorization for the requested action
646
-
647
- """
648
570
  loop = asyncio.get_event_loop()
649
571
  resp = loop.run_until_complete(
650
572
  self._async_get_projects_by_name(
651
- name, effective_time, start_from, page_size
573
+ filter_string,
574
+ classification_names,
575
+ body,
576
+ start_from,
577
+ page_size,
578
+ output_format,
579
+ output_format_set,
580
+ )
652
581
  )
653
- )
654
-
655
582
  return resp
656
583
 
657
- async def _async_get_project_by_guid(
658
- self,
659
- project_guid: str,
660
- effective_time: str = None,
661
- ) -> dict | str:
584
+ @dynamic_catch
585
+ async def _async_get_project_by_guid(self, project_guid: str, element_type: str = None,
586
+ body: dict | GetRequestBody = None,
587
+ output_format: str = 'JSON',
588
+ output_format_set: str | dict = None) -> dict | str:
662
589
  """Return the properties of a specific project. Async version.
663
590
 
664
- Parameters
665
- ----------
666
- project_guid: str,
667
- unique identifier of the project.
668
- effective_time: str, [default=None], optional
669
- Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
670
-
671
-
672
- Returns
673
- -------
674
- dict | str
675
-
676
- A JSON dict representing the specified project. Returns a string if none found.
677
-
678
- Raises
679
- ------
680
-
681
- InvalidParameterException
682
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
683
- PropertyServerException
684
- Raised by the server when an issue arises in processing a valid request
685
- NotAuthorizedException
686
- The principle specified by the user_id does not have authorization for the requested action
591
+ Parameters
592
+ ----------
593
+ project_guid: str,
594
+ unique identifier of the collection.
595
+ element_type: str, default = None, optional
596
+ type of collection - Collection, DataSpec, Agreement, etc.
597
+ body: dict | GetRequestBody, optional, default = None
598
+ full request body.
599
+ output_format: str, default = "JSON"
600
+ - one of "DICT", "MERMAID" or "JSON"
601
+ output_format_set: str | dict, optional, default = None
602
+ The desired output columns/fields to include.
603
+
604
+ Returns
605
+ -------
606
+ dict | str
607
+
608
+ A JSON dict representing the specified collection. Returns a string if none found.
609
+
610
+ Raises
611
+ ------
612
+
613
+ InvalidParameterException
614
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
615
+ PropertyServerException
616
+ Raised by the server when an issue arises in processing a valid request
617
+ NotAuthorizedException
618
+ The principle specified by the user_id does not have authorization for the requested action
619
+
620
+ Notes
621
+ ----
622
+ Body sample:
623
+ {
624
+ "class": "GetRequestBody",
625
+ "asOfTime": "{{$isoTimestamp}}",
626
+ "effectiveTime": "{{$isoTimestamp}}",
627
+ "forLineage": false,
628
+ "forDuplicateProcessing": false
629
+ }
630
+ """
687
631
 
688
- """
632
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
633
+ f"{project_guid}")
634
+ type = element_type if element_type else "Collection"
689
635
 
690
- validate_guid(project_guid)
691
- body = {
692
- "effective_time": effective_time,
693
- }
694
- url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}"
636
+ response = await self._async_get_guid_request(url, _type=type,
637
+ _gen_output=self._generate_collection_output,
638
+ output_format=output_format, output_format_set=output_format_set,
639
+ body=body)
695
640
 
696
- resp = await self._async_make_request("GET", url, body)
697
- return resp.json().get('element',NO_ELEMENTS_FOUND)
641
+ return response
698
642
 
699
- def get_project_by_guid(self, project_guid: str, effective_time: str = None) -> dict | str:
643
+ @dynamic_catch
644
+ def get_project_by_guid(self, project_guid: str, element_type: str = None,
645
+ body: dict | GetRequestBody = None,
646
+ output_format: str = 'JSON',
647
+ output_format_set: str | dict = None) -> dict | str:
700
648
  """Return the properties of a specific project.
701
649
 
702
- Parameters
703
- ----------
704
- project_guid: str,
705
- unique identifier of the project.
706
- effective_time: str, [default=None], optional
707
- Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
708
-
709
-
710
- Returns
711
- -------
712
- dict | str
713
-
714
- A JSON dict representing the specified project. Returns a string if none found.
715
-
716
- Raises
717
- ------
718
-
719
- InvalidParameterException
720
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
721
- PropertyServerException
722
- Raised by the server when an issue arises in processing a valid request
723
- NotAuthorizedException
724
- The principle specified by the user_id does not have authorization for the requested action
725
-
726
- """
650
+ Parameters
651
+ ----------
652
+ project_guid: str,
653
+ unique identifier of the collection.
654
+ element_type: str, default = None, optional
655
+ type of collection - Collection, DataSpec, Agreement, etc.
656
+ body: dict | GetRequestBody, optional, default = None
657
+ full request body.
658
+ output_format: str, default = "JSON"
659
+ - one of "DICT", "MERMAID" or "JSON"
660
+ output_format_set: str | dict, optional, default = None
661
+ The desired output columns/fields to include.
662
+
663
+ Returns
664
+ -------
665
+ dict | str
666
+
667
+ A JSON dict representing the specified collection. Returns a string if none found.
668
+
669
+ Raises
670
+ ------
671
+
672
+ InvalidParameterException
673
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
674
+ PropertyServerException
675
+ Raised by the server when an issue arises in processing a valid request
676
+ NotAuthorizedException
677
+ The principle specified by the user_id does not have authorization for the requested action
678
+
679
+ Notes
680
+ ----
681
+ Body sample:
682
+ {
683
+ "class": "GetRequestBody",
684
+ "asOfTime": "{{$isoTimestamp}}",
685
+ "effectiveTime": "{{$isoTimestamp}}",
686
+ "forLineage": false,
687
+ "forDuplicateProcessing": false
688
+ }
689
+ """
727
690
  loop = asyncio.get_event_loop()
728
691
  resp = loop.run_until_complete(
729
- self._async_get_project_by_guid(project_guid, effective_time)
730
- )
692
+ self._async_get_project_by_guid(project_guid, element_type, body, output_format, output_format_set )
693
+ )
731
694
 
732
695
  return resp
733
696
 
697
+ @dynamic_catch
734
698
  async def _async_get_project_graph(
735
- self,
736
- project_guid: str,
737
- effective_time: str = None,
738
- ) -> dict | str:
699
+ self,
700
+ project_guid: str,
701
+ element_type: str = None,
702
+ body: dict | GetRequestBody = None,
703
+ output_format: str = 'JSON',
704
+ output_format_set: str | dict = None,
705
+ ) -> dict | str:
739
706
  """Return the mermaid graph of a specific project. Async version.
740
707
 
741
708
  Parameters
742
709
  ----------
743
710
  project_guid: str,
744
711
  unique identifier of the project.
745
- effective_time: str, [default=None], optional
746
- Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
747
-
712
+ body: dict | GetRequestBody, optional, default = None
713
+ full request body.
748
714
 
749
715
  Returns
750
716
  -------
@@ -763,25 +729,34 @@ class ProjectManager(Client2):
763
729
 
764
730
  """
765
731
 
766
- validate_guid(project_guid)
767
- body = {
768
- "effective_time": effective_time,
769
- }
770
- url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/{project_guid}/graph"
771
732
 
772
- resp = await self._async_make_request("GET", url, body)
773
- return resp.json().get('element',NO_ELEMENTS_FOUND)
733
+ url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/pr"
734
+ f"ojects/{project_guid}/graph")
774
735
 
775
- def get_project_graph(self, project_guid: str, effective_time: str = None) -> dict | str:
776
- """Return the mermaid graph of a specific project.
736
+ response = await self._async_get_guid_request(url, _type=element_type,
737
+ _gen_output=self._generate_project_output,
738
+ output_format=output_format, output_format_set=output_format_set,
739
+ body=body)
740
+
741
+ return response
742
+
743
+ @dynamic_catch
744
+ def get_project_graph(
745
+ self,
746
+ project_guid: str,
747
+ element_type: str = None,
748
+ body: dict | GetRequestBody = None,
749
+ output_format: str = 'JSON',
750
+ output_format_set: str | dict = None,
751
+ ) -> dict | str:
752
+ """Return the mermaid graph of a specific project. Async version.
777
753
 
778
754
  Parameters
779
755
  ----------
780
756
  project_guid: str,
781
757
  unique identifier of the project.
782
- effective_time: str, [default=None], optional
783
- Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
784
-
758
+ body: dict | GetRequestBody, optional, default = None
759
+ full request body.
785
760
 
786
761
  Returns
787
762
  -------
@@ -801,31 +776,27 @@ class ProjectManager(Client2):
801
776
  """
802
777
  loop = asyncio.get_event_loop()
803
778
  resp = loop.run_until_complete(
804
- self._async_get_project_graph(project_guid, effective_time)
805
- )
779
+ self._async_get_project_graph(project_guid, element_type, body, output_format, output_format_set)
780
+ )
806
781
 
807
782
  return resp
808
783
 
809
-
810
784
  #
811
785
  # Create project methods
812
786
  #
813
- async def _async_create_project_w_body(
814
- self,
815
- body: dict,
816
- classification: str = None,
817
- ) -> str:
787
+ @dynamic_catch
788
+ async def _async_create_project(
789
+ self,
790
+ body: dict | NewElementRequestBody,
791
+ ) -> str:
818
792
  """Create project: https://egeria-project.org/concepts/project Async version.
819
793
 
820
794
  Parameters
821
795
  ----------.
822
796
  body: dict
823
- A dict representing the details of the project to create.
824
- classification: str, optional
825
- An optional project classification. See https://egeria-project.org/types/1/0130-Projects for values.
826
- view_server: str, optional, defaults to None
827
- The name of the server to configure. If not provided, the server name associated with the
828
- instance is used.
797
+ A dict representing the details of the project to create. To create different kinds of projects,
798
+ set the initial_classifications in the body to be, for instance, "PersonalProject" or "Campaign".
799
+
829
800
 
830
801
  Returns
831
802
  -------
@@ -844,11 +815,17 @@ class ProjectManager(Client2):
844
815
 
845
816
  Body structure like:
846
817
  {
818
+ "class": "NewElementRequestBody",
847
819
  "anchorGUID" : "anchor GUID, if set then isOwnAnchor=false",
848
820
  "isOwnAnchor" : False,
849
821
  "parentGUID" : "parent GUID, if set, set all parameters beginning 'parent'",
850
822
  "parentRelationshipTypeName" : "open metadata type name",
851
823
  "parentAtEnd1": True,
824
+ "initialClassifications" : {
825
+ "Folder" : {
826
+ "class": "FolderProperties"
827
+ }
828
+ },
852
829
  "projectProperties": {
853
830
  "class" : "ProjectProperties",
854
831
  "qualifiedName": "Must provide a unique name here",
@@ -865,33 +842,22 @@ class ProjectManager(Client2):
865
842
 
866
843
  """
867
844
 
868
- if classification is None:
869
- url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects"
870
- else:
871
- url = (
872
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects?"
873
- f"classificationName={classification}"
874
- )
875
- body_s = body_slimmer(body)
876
- resp = await self._async_make_request("POST", url, body_s)
877
- return resp.json().get("guid", "No GUID returned")
878
845
 
879
- def create_project_w_body(
880
- self,
881
- body: dict,
882
- classification: str = None,
883
- ) -> str:
846
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects"
847
+
848
+ return await self._async_create_element_body_request(body, ["ProjectProperties"], body)
849
+
850
+ @dynamic_catch
851
+ def create_project(
852
+ self,
853
+ body: dict | NewElementRequestBody,
854
+ ) -> str:
884
855
  """Create project: https://egeria-project.org/concepts/project
885
856
 
886
857
  Parameters
887
858
  ----------.
888
859
  body: dict
889
860
  A dict representing the details of the project to create.
890
- classification: str, optional
891
- An optional project classification. See https://egeria-project.org/types/1/0130-Projects for values.
892
- view_server: str, optional, defaults to None
893
- The name of the server to configure. If not provided, the server name associated with the instance
894
- is used.
895
861
 
896
862
  Returns
897
863
  -------
@@ -932,344 +898,15 @@ class ProjectManager(Client2):
932
898
  """
933
899
  loop = asyncio.get_event_loop()
934
900
  resp = loop.run_until_complete(
935
- self._async_create_project_w_body(body, classification)
936
- )
937
- return resp
938
-
939
- async def _async_create_project(
940
- self,
941
- anchor_guid: str,
942
- parent_guid: str,
943
- parent_relationship_type_name: str,
944
- parent_at_end1: bool,
945
- display_name: str,
946
- description: str,
947
- classification_name: str = None,
948
- identifier: str = None,
949
- is_own_anchor: bool = False,
950
- project_status: str = None,
951
- project_phase: str = None,
952
- project_health: str = None,
953
- start_date: str = None,
954
- planned_end_date: str = None,
955
- ) -> str:
956
- """Create Project: https://egeria-project.org/concepts/project Async version.
957
-
958
- Parameters
959
- ----------
960
- classification_name: str, optional
961
- Type of project to create; "PersonalProject", "Campaign", etc. If not provided, project will not
962
- be classified.
963
- anchor_guid: str
964
- The unique identifier of the element that should be the anchor for the new element. Set to null if no
965
- anchor, or if this collection is to be its own anchor.
966
- parent_guid: str
967
- The optional unique identifier for an element that should be connected to the newly created element.
968
- If this property is specified, parentRelationshipTypeName must also be specified
969
- parent_relationship_type_name: str
970
- The name of the relationship, if any, that should be established between the new element and the parent
971
- element. Examples could be "ResourceList".
972
- parent_at_end1: bool
973
- Identifies which end any parent entity sits on the relationship.
974
- display_name: str
975
- The display name of the element. Will also be used as the basis of the qualified_name.
976
- description: str
977
- A description of the collection.
978
- identifier: str
979
- A project identifier.
980
- is_own_anchor: bool, optional, defaults to False
981
- Indicates if the collection should be classified as its own anchor or not.
982
- project_status: str, optional
983
- The project status
984
- project_phase: str, optional
985
- Project phase as defined in valid values
986
- project_health: str, optional
987
- Project health as defined in valid values
988
- start_date: str, optional, defaults to None
989
- Start date of the project in ISO 8601 string format.
990
- planned_end_date: str, optional, defaults to None
991
- Planned completion date in ISO 8601 string format.
992
-
993
-
994
- Returns
995
- -------
996
- str - the guid of the created project
997
-
998
- Raises
999
- ------
1000
- InvalidParameterException
1001
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1002
- PropertyServerException
1003
- Raised by the server when an issue arises in processing a valid request
1004
- NotAuthorizedException
1005
- The principle specified by the user_id does not have authorization for the requested action
1006
-
1007
- """
1008
-
1009
- if parent_guid is None:
1010
- is_own_anchor = False
1011
-
1012
- if classification_name is None:
1013
- url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects"
1014
- else:
1015
- url = (
1016
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects?"
1017
- f"classificationName={classification_name}"
901
+ self._async_create_project(body)
1018
902
  )
1019
-
1020
- body = {
1021
- "anchorGUID": anchor_guid,
1022
- "isOwnAnchor": str(is_own_anchor).lower(),
1023
- "parentGUID": parent_guid,
1024
- "parentRelationshipTypeName": parent_relationship_type_name,
1025
- "parentAtEnd1": str(parent_at_end1).lower(),
1026
- "projectProperties": {
1027
- "class": "ProjectProperties",
1028
- "qualifiedName": f"{classification_name}-{display_name}-{time.asctime()}",
1029
- "identifier": identifier,
1030
- "name": display_name,
1031
- "description": description,
1032
- "projectStatus": project_status,
1033
- "projectPhase": project_phase,
1034
- "projectHealth": project_health,
1035
- "startDate": start_date,
1036
- "plannedEndDate": planned_end_date,
1037
- },
1038
- }
1039
- body_s = body_slimmer(body)
1040
- resp = await self._async_make_request("POST", url, body_s)
1041
- return resp.json().get("guid", "No GUID returned")
1042
-
1043
- def create_project(
1044
- self,
1045
- anchor_guid: str,
1046
- parent_guid: str,
1047
- parent_relationship_type_name: str,
1048
- parent_at_end1: bool,
1049
- display_name: str,
1050
- description: str,
1051
- classification_name: str,
1052
- identifier: str = None,
1053
- is_own_anchor: bool = False,
1054
- project_status: str = None,
1055
- project_phase: str = None,
1056
- project_health: str = None,
1057
- start_date: str = None,
1058
- planned_end_date: str = None,
1059
- ) -> str:
1060
- """Create Project: https://egeria-project.org/concepts/project
1061
-
1062
- Parameters
1063
- ----------
1064
- classification_name: str
1065
- Type of project to create; "PersonalProject", "Campaign", etc. If not provided, the project will not
1066
- have a project classification.
1067
- anchor_guid: str
1068
- The unique identifier of the element that should be the anchor for the new element. Set to null if no
1069
- anchor, or if this collection is to be its own anchor.
1070
- parent_guid: str
1071
- The optional unique identifier for an element that should be connected to the newly created element.
1072
- If this property is specified, parentRelationshipTypeName must also be specified
1073
- parent_relationship_type_name: str
1074
- The name of the relationship, if any, that should be established between the new element and the parent
1075
- element. Examples could be "ResourceList".
1076
- parent_at_end1: bool
1077
- Identifies which end any parent entity sits on the relationship.
1078
- display_name: str
1079
- The display name of the element. Will also be used as the basis of the qualified_name.
1080
- description: str
1081
- A description of the collection.
1082
- identifier: str
1083
- A project identifier.
1084
- is_own_anchor: bool, optional, defaults to False
1085
- Indicates if the collection should be classified as its own anchor or not.
1086
- project_status: str, optional
1087
- The project status
1088
- project_phase: str, optional
1089
- Project phase as defined in valid values
1090
- project_health: str, optional
1091
- Project health as defined in valid values
1092
- start_date: str, optional, defaults to None
1093
- Start date of the project in ISO 8601 string format.
1094
- planned_end_date: str, optional, defaults to None
1095
- Planned completion date in ISO 8601 string format.
1096
-
1097
-
1098
- Returns
1099
- -------
1100
- str - the guid of the created project
1101
-
1102
- Raises
1103
- ------
1104
- InvalidParameterException
1105
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1106
- PropertyServerException
1107
- Raised by the server when an issue arises in processing a valid request
1108
- NotAuthorizedException
1109
- The principle specified by the user_id does not have authorization for the requested action
1110
-
1111
- """
1112
- loop = asyncio.get_event_loop()
1113
- resp = loop.run_until_complete(
1114
- self._async_create_project(
1115
- anchor_guid,
1116
- parent_guid,
1117
- parent_relationship_type_name,
1118
- parent_at_end1,
1119
- display_name,
1120
- description,
1121
- classification_name,
1122
- identifier,
1123
- is_own_anchor,
1124
- project_status,
1125
- project_phase,
1126
- project_health,
1127
- start_date,
1128
- planned_end_date,
1129
- )
1130
- )
1131
- return resp
1132
-
1133
- async def _async_create_project_task(
1134
- self,
1135
- project_guid: str,
1136
- display_name: str,
1137
- identifier: str = None,
1138
- description: str = None,
1139
- project_status: str = None,
1140
- project_phase: str = None,
1141
- project_health: str = None,
1142
- start_date: str = None,
1143
- planned_end_date: str = None,
1144
- ) -> str:
1145
- """Create a new project with the Task classification and link it to a project. Async version.
1146
-
1147
- Parameters
1148
- ----------
1149
- project_guid: str
1150
- The unique identifier of the project to create the task for (the parent).
1151
- display_name: str
1152
- The display name of the element. Will also be used as the basis of the qualified_name.
1153
- identifier: str
1154
- A project identifier.
1155
- description: str
1156
- A description of the collection.
1157
- project_status: str, optional, defaults to "OTHER"
1158
- The project status
1159
- project_phase: str, optional
1160
- Project phase as defined in valid values
1161
- project_health: str, optional
1162
- Project health as defined in valid values
1163
- start_date: str, optional, defaults to None
1164
- Start date of the project in ISO 8601 string format.
1165
- planned_end_date: str, optional, defaults to None
1166
- Planned completion date in ISO 8601 string format.
1167
-
1168
- Returns
1169
- -------
1170
- str - the guid of the created project task
1171
-
1172
- Raises
1173
- ------
1174
- InvalidParameterException
1175
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1176
- PropertyServerException
1177
- Raised by the server when an issue arises in processing a valid request
1178
- NotAuthorizedException
1179
- The principle specified by the user_id does not have authorization for the requested action
1180
-
1181
- """
1182
-
1183
- url = (
1184
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
1185
- f"{project_guid}/task"
1186
- )
1187
-
1188
- body = {
1189
- "class": "ProjectProperties",
1190
- "qualifiedName": f"task-{display_name}-{time.asctime()}",
1191
- "identifier": identifier,
1192
- "name": display_name,
1193
- "description": description,
1194
- "projectStatus": project_status,
1195
- "projectPhase": project_phase,
1196
- "projectHealth": project_health,
1197
- "startDate": start_date,
1198
- "plannedEndDate": planned_end_date,
1199
- }
1200
- body_s = body_slimmer(body)
1201
- resp = await self._async_make_request("POST", url, body_s)
1202
- return resp.json().get("guid", "No GUID Returned")
1203
-
1204
- def create_project_task(
1205
- self,
1206
- project_guid: str,
1207
- display_name: str,
1208
- identifier: str = None,
1209
- description: str = None,
1210
- project_status: str = None,
1211
- project_phase: str = None,
1212
- project_health: str = None,
1213
- start_date: str = None,
1214
- planned_end_date: str = None,
1215
- ) -> str:
1216
- """Create a new project with the Task classification and link it to a project.
1217
-
1218
- Parameters
1219
- ----------
1220
- project_guid: str
1221
- The unique identifier of the project to create the task for.The parent.
1222
- display_name: str
1223
- The display name of the element. Will also be used as the basis of the qualified_name.
1224
- identifier: str
1225
- A project identifier.
1226
- description: str
1227
- A description of the collection.
1228
- project_status: str, optional, defaults to "OTHER"
1229
- The project status
1230
- project_phase: str, optional
1231
- Project phase as defined in valid values
1232
- project_health: str, optional
1233
- Project health as defined in valid values
1234
- start_date: str, optional, defaults to None
1235
- Start date of the project in ISO 8601 string format.
1236
- planned_end_date: str, optional, defaults to None
1237
- Planned completion date in ISO 8601 string format.
1238
-
1239
- Returns
1240
- -------
1241
- str - the guid of the created project task
1242
-
1243
- Raises
1244
- ------
1245
- InvalidParameterException
1246
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1247
- PropertyServerException
1248
- Raised by the server when an issue arises in processing a valid request
1249
- NotAuthorizedException
1250
- The principle specified by the user_id does not have authorization for the requested action
1251
-
1252
- """
1253
- loop = asyncio.get_event_loop()
1254
- resp = loop.run_until_complete(
1255
- self._async_create_project_task(
1256
- project_guid,
1257
- display_name,
1258
- identifier,
1259
- description,
1260
- project_status,
1261
- project_phase,
1262
- project_health,
1263
- start_date,
1264
- planned_end_date,
1265
- )
1266
- )
1267
903
  return resp
1268
904
 
905
+ @dynamic_catch
1269
906
  async def _async_create_project_from_template(
1270
- self,
1271
- body: dict,
1272
- ) -> str:
907
+ self,
908
+ body: dict | TemplateRequestBody,
909
+ ) -> str:
1273
910
  """Create a new metadata element to represent a project using an existing metadata element as a template.
1274
911
  The template defines additional classifications and relationships that should be added to the new project.
1275
912
  Async version.
@@ -1326,14 +963,13 @@ class ProjectManager(Client2):
1326
963
  """
1327
964
 
1328
965
  url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/from-template"
1329
- body_s = body_slimmer(body)
1330
- resp = await self._async_make_request("POST", url, body_s)
1331
- return resp.json().get("guid", "No GUID Returned")
966
+ return await self._async_create_element_from_template(url, body)
1332
967
 
968
+ @dynamic_catch
1333
969
  def create_project_from_template(
1334
- self,
1335
- body: dict,
1336
- ) -> str:
970
+ self,
971
+ body: dict,
972
+ ) -> str:
1337
973
  """Create a new metadata element to represent a project using an existing metadata element as a template.
1338
974
  The template defines additional classifications and relationships that should be added to the new project.
1339
975
 
@@ -1389,20 +1025,24 @@ class ProjectManager(Client2):
1389
1025
  resp = loop.run_until_complete(self._async_create_project_from_template(body))
1390
1026
  return resp
1391
1027
 
1028
+ #
1029
+ #
1030
+ #
1031
+
1392
1032
  async def _async_update_project(
1393
- self,
1394
- project_guid: str,
1395
- qualified_name: str = None,
1396
- identifier: str = None,
1397
- display_name: str = None,
1398
- description: str = None,
1399
- project_status: str = None,
1400
- project_phase: str = None,
1401
- project_health: str = None,
1402
- start_date: str = None,
1403
- planned_end_date: str = None,
1404
- replace_all_props: bool = False,
1405
- ) -> None:
1033
+ self,
1034
+ project_guid: str,
1035
+ qualified_name: str = None,
1036
+ identifier: str = None,
1037
+ display_name: str = None,
1038
+ description: str = None,
1039
+ project_status: str = None,
1040
+ project_phase: str = None,
1041
+ project_health: str = None,
1042
+ start_date: str = None,
1043
+ planned_end_date: str = None,
1044
+ replace_all_props: bool = False,
1045
+ ) -> None:
1406
1046
  """Update the properties of a project. Async Version.
1407
1047
 
1408
1048
  Parameters
@@ -1461,25 +1101,25 @@ class ProjectManager(Client2):
1461
1101
  "projectHealth": project_health,
1462
1102
  "startDate": start_date,
1463
1103
  "plannedEndDate": planned_end_date,
1464
- }
1104
+ }
1465
1105
  body_s = body_slimmer(body)
1466
1106
  await self._async_make_request("POST", url, body_s)
1467
1107
  return
1468
1108
 
1469
1109
  def update_project(
1470
- self,
1471
- project_guid: str,
1472
- qualified_name: str = None,
1473
- identifier: str = None,
1474
- display_name: str = None,
1475
- description: str = None,
1476
- project_status: str = None,
1477
- project_phase: str = None,
1478
- project_health: str = None,
1479
- start_date: str = None,
1480
- planned_end_date: str = None,
1481
- replace_all_props: bool = False,
1482
- ) -> None:
1110
+ self,
1111
+ project_guid: str,
1112
+ qualified_name: str = None,
1113
+ identifier: str = None,
1114
+ display_name: str = None,
1115
+ description: str = None,
1116
+ project_status: str = None,
1117
+ project_phase: str = None,
1118
+ project_health: str = None,
1119
+ start_date: str = None,
1120
+ planned_end_date: str = None,
1121
+ replace_all_props: bool = False,
1122
+ ) -> None:
1483
1123
  """Update the properties of a project.
1484
1124
 
1485
1125
  Parameters
@@ -1534,14 +1174,14 @@ class ProjectManager(Client2):
1534
1174
  start_date,
1535
1175
  planned_end_date,
1536
1176
  replace_all_props,
1177
+ )
1537
1178
  )
1538
- )
1539
1179
  return
1540
1180
 
1541
1181
  async def _async_delete_project(
1542
- self,
1543
- project_guid: str, cascade: bool = False
1544
- ) -> None:
1182
+ self,
1183
+ project_guid: str, cascade: bool = False
1184
+ ) -> None:
1545
1185
  """Delete a project. It is detected from all parent elements. Async version
1546
1186
 
1547
1187
  Parameters
@@ -1577,9 +1217,9 @@ class ProjectManager(Client2):
1577
1217
  return
1578
1218
 
1579
1219
  def delete_project(
1580
- self,
1581
- project_guid: str, cascade: bool = False
1582
- ) -> None:
1220
+ self,
1221
+ project_guid: str, cascade: bool = False
1222
+ ) -> None:
1583
1223
  """Delete a project. It is detected from all parent elements.
1584
1224
 
1585
1225
  Parameters
@@ -1612,13 +1252,13 @@ class ProjectManager(Client2):
1612
1252
  return
1613
1253
 
1614
1254
  async def _async_add_to_project_team(
1615
- self,
1616
- project_guid: str,
1617
- actor_guid: str,
1618
- team_role: str = None,
1619
- effective_from: str = None,
1620
- effective_to: str = None,
1621
- ) -> None:
1255
+ self,
1256
+ project_guid: str,
1257
+ actor_guid: str,
1258
+ team_role: str = None,
1259
+ effective_from: str = None,
1260
+ effective_to: str = None,
1261
+ ) -> None:
1622
1262
  """Add an actor to a project. The request body is optional. If supplied, it contains the name of the role that
1623
1263
  the actor plays in the project. Async version.
1624
1264
 
@@ -1660,7 +1300,7 @@ class ProjectManager(Client2):
1660
1300
  "teamRole": team_role,
1661
1301
  "effectiveFrom": effective_from,
1662
1302
  "effectiveTo": effective_to,
1663
- }
1303
+ }
1664
1304
  body_s = body_slimmer(body)
1665
1305
  if body_s is None:
1666
1306
  await self._async_make_request("POST", url)
@@ -1669,13 +1309,13 @@ class ProjectManager(Client2):
1669
1309
  return
1670
1310
 
1671
1311
  def add_to_project_team(
1672
- self,
1673
- project_guid: str,
1674
- actor_guid: str,
1675
- team_role: str = None,
1676
- effective_from: str = None,
1677
- effective_to: str = None,
1678
- ) -> None:
1312
+ self,
1313
+ project_guid: str,
1314
+ actor_guid: str,
1315
+ team_role: str = None,
1316
+ effective_from: str = None,
1317
+ effective_to: str = None,
1318
+ ) -> None:
1679
1319
  """Add an actor to a project. The request body is optional. If supplied, it contains the name of the role that
1680
1320
  the actor plays in the project.
1681
1321
 
@@ -1715,15 +1355,15 @@ class ProjectManager(Client2):
1715
1355
  team_role,
1716
1356
  effective_from,
1717
1357
  effective_to,
1358
+ )
1718
1359
  )
1719
- )
1720
1360
  return
1721
1361
 
1722
1362
  async def _async_remove_from_project_team(
1723
- self,
1724
- project_guid: str,
1725
- actor_guid: str,
1726
- ) -> None:
1363
+ self,
1364
+ project_guid: str,
1365
+ actor_guid: str,
1366
+ ) -> None:
1727
1367
  """Remove an actor from a project. Async version.
1728
1368
 
1729
1369
  Parameters
@@ -1759,10 +1399,10 @@ class ProjectManager(Client2):
1759
1399
  return
1760
1400
 
1761
1401
  def remove_from_project_team(
1762
- self,
1763
- project_guid: str,
1764
- actor_guid: str,
1765
- ) -> None:
1402
+ self,
1403
+ project_guid: str,
1404
+ actor_guid: str,
1405
+ ) -> None:
1766
1406
  """Remove an actor from a project.
1767
1407
 
1768
1408
  Parameters
@@ -1790,14 +1430,14 @@ class ProjectManager(Client2):
1790
1430
  loop = asyncio.get_event_loop()
1791
1431
  loop.run_until_complete(
1792
1432
  self._async_remove_from_project_team(project_guid, actor_guid)
1793
- )
1433
+ )
1794
1434
  return
1795
1435
 
1796
1436
  async def _async_setup_project_management_role(
1797
- self,
1798
- project_guid: str,
1799
- project_role_guid: str,
1800
- ) -> None:
1437
+ self,
1438
+ project_guid: str,
1439
+ project_role_guid: str,
1440
+ ) -> None:
1801
1441
  """Create a ProjectManagement relationship between a project and a person role to show that anyone appointed to
1802
1442
  the role is a member of the project. Async version.
1803
1443
 
@@ -1835,10 +1475,10 @@ class ProjectManager(Client2):
1835
1475
  return
1836
1476
 
1837
1477
  def setup_project_management_role(
1838
- self,
1839
- project_guid: str,
1840
- project_role_guid: str,
1841
- ) -> None:
1478
+ self,
1479
+ project_guid: str,
1480
+ project_role_guid: str,
1481
+ ) -> None:
1842
1482
  """Create a ProjectManagement relationship between a project and a person role to show that anyone appointed to
1843
1483
  the role is a member of the project. Async version.
1844
1484
 
@@ -1868,14 +1508,14 @@ class ProjectManager(Client2):
1868
1508
  loop = asyncio.get_event_loop()
1869
1509
  loop.run_until_complete(
1870
1510
  self._async_setup_project_management_role(project_guid, project_role_guid)
1871
- )
1511
+ )
1872
1512
  return
1873
1513
 
1874
1514
  async def _async_clear_project_management_role(
1875
- self,
1876
- project_guid: str,
1877
- project_role_guid: str,
1878
- ) -> None:
1515
+ self,
1516
+ project_guid: str,
1517
+ project_role_guid: str,
1518
+ ) -> None:
1879
1519
  """Remove a ProjectManagement relationship between a project and a person role. Async version.
1880
1520
 
1881
1521
  Parameters
@@ -1912,10 +1552,10 @@ class ProjectManager(Client2):
1912
1552
  return
1913
1553
 
1914
1554
  def clear_project_management_role(
1915
- self,
1916
- project_guid: str,
1917
- project_role_guid: str,
1918
- ) -> None:
1555
+ self,
1556
+ project_guid: str,
1557
+ project_role_guid: str,
1558
+ ) -> None:
1919
1559
  """Clear a ProjectManagement relationship between a project and a person role.
1920
1560
 
1921
1561
  Parameters
@@ -1944,7 +1584,7 @@ class ProjectManager(Client2):
1944
1584
  loop = asyncio.get_event_loop()
1945
1585
  loop.run_until_complete(
1946
1586
  self._async_clear_project_management_role(project_guid, project_role_guid)
1947
- )
1587
+ )
1948
1588
  return
1949
1589
 
1950
1590