Skip to content

Commit f56e349

Browse files
[TASKSCLOUD-511] - Deployed new 21.2 version.
1 parent ed9df9a commit f56e349

File tree

7 files changed

+42
-13
lines changed

7 files changed

+42
-13
lines changed

asposetaskscloud/api_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777

7878
self.pool = ThreadPool()
7979
self.rest_client = rest.RESTClientObject(configuration)
80-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '20.11'}
80+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '21.2'}
8181
if header_name is not None:
8282
self.default_headers[header_name] = header_value
8383
self.cookie = cookie
8484
# Set default User-Agent.
85-
self.user_agent = 'python sdk 20.11'
85+
self.user_agent = 'python sdk 21.2'
8686

8787
def __del__(self):
8888
self.pool.close()

asposetaskscloud/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,5 +264,5 @@ def to_debug_report(self):
264264
"OS: {env}\n"\
265265
"Python Version: {pyversion}\n"\
266266
"Version of the API: 3.0\n"\
267-
"SDK Package Version: 20.11.0".\
267+
"SDK Package Version: 21.2.0".\
268268
format(env=sys.platform, pyversion=sys.version)

asposetaskscloud/models/task.py

+29-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ class Task(object):
153153
'baselines': 'list[TaskBaseline]',
154154
'extended_attributes': 'list[ExtendedAttribute]',
155155
'outline_codes': 'list[OutlineCode]',
156-
'warning': 'bool'
156+
'warning': 'bool',
157+
'activity_id': 'str'
157158
}
158159

159160
attribute_map = {
@@ -269,10 +270,11 @@ class Task(object):
269270
'baselines': 'baselines',
270271
'extended_attributes': 'extendedAttributes',
271272
'outline_codes': 'outlineCodes',
272-
'warning': 'warning'
273+
'warning': 'warning',
274+
'activity_id': 'activityId'
273275
}
274276

275-
def __init__(self, uid=None, id=None, name=None, duration_text=None, duration=None, start=None, finish=None, start_text=None, finish_text=None, percent_complete=None, percent_work_complete=None, is_active=True, actual_cost=None, actual_duration=None, actual_finish=None, actual_overtime_cost=None, actual_overtime_work=None, actual_work_protected=None, actual_overtime_work_protected=None, actual_start=None, budget_work=None, budget_cost=None, constraint_date=None, constraint_type=None, contact=None, cost=None, cv=None, deadline=None, duration_variance=None, early_finish=None, early_start=None, is_effort_driven=None, is_external_task=None, external_task_project=None, external_id=None, finish_slack=None, finish_variance=None, fixed_cost=None, fixed_cost_accrual=None, free_slack=None, guid=None, hide_bar=None, ignore_resource_calendar=None, late_finish=None, late_start=None, is_level_assignments=True, can_leveling_split=True, leveling_delay=None, is_marked=None, is_milestone=None, is_critical=None, is_subproject=None, is_subproject_read_only=None, subproject_name=None, is_summary=None, subtasks_uids=None, outline_level=None, is_over_allocated=None, is_estimated=None, overtime_cost=None, overtime_work=None, physical_percent_complete=None, pre_leveled_finish=None, pre_leveled_start=None, is_recurring=None, regular_work=None, remaining_cost=None, remaining_duration=None, remaining_overtime_cost=None, remaining_overtime_work=None, remaining_work=None, resume=None, is_resume_valid=None, stop=None, is_rollup=None, start_slack=None, start_variance=None, calendar_uid=-1, is_manual=None, manual_start=None, manual_finish=None, manual_duration=None, total_slack=None, type=None, wbs=None, priority=None, work=None, work_variance=None, notes_text=None, notes_rtf=None, acwp=None, bcws=None, bcwp=None, leveling_delay_format=None, predecessors=None, successors=None, ignore_warnings=False, is_expanded=None, display_on_timeline=None, display_as_summary=None, hyperlink=None, hyperlink_address=None, hyperlink_sub_address=None, earned_value_method=None, is_published=True, status_manager=None, commitment_start=None, commitment_finish=None, commitment_type=None, baselines=None, extended_attributes=None, outline_codes=None, warning=False): # noqa: E501
277+
def __init__(self, uid=None, id=None, name=None, duration_text=None, duration=None, start=None, finish=None, start_text=None, finish_text=None, percent_complete=None, percent_work_complete=None, is_active=True, actual_cost=None, actual_duration=None, actual_finish=None, actual_overtime_cost=None, actual_overtime_work=None, actual_work_protected=None, actual_overtime_work_protected=None, actual_start=None, budget_work=None, budget_cost=None, constraint_date=None, constraint_type=None, contact=None, cost=None, cv=None, deadline=None, duration_variance=None, early_finish=None, early_start=None, is_effort_driven=None, is_external_task=None, external_task_project=None, external_id=None, finish_slack=None, finish_variance=None, fixed_cost=None, fixed_cost_accrual=None, free_slack=None, guid=None, hide_bar=None, ignore_resource_calendar=None, late_finish=None, late_start=None, is_level_assignments=True, can_leveling_split=True, leveling_delay=None, is_marked=None, is_milestone=None, is_critical=None, is_subproject=None, is_subproject_read_only=None, subproject_name=None, is_summary=None, subtasks_uids=None, outline_level=None, is_over_allocated=None, is_estimated=None, overtime_cost=None, overtime_work=None, physical_percent_complete=None, pre_leveled_finish=None, pre_leveled_start=None, is_recurring=None, regular_work=None, remaining_cost=None, remaining_duration=None, remaining_overtime_cost=None, remaining_overtime_work=None, remaining_work=None, resume=None, is_resume_valid=None, stop=None, is_rollup=None, start_slack=None, start_variance=None, calendar_uid=-1, is_manual=None, manual_start=None, manual_finish=None, manual_duration=None, total_slack=None, type=None, wbs=None, priority=None, work=None, work_variance=None, notes_text=None, notes_rtf=None, acwp=None, bcws=None, bcwp=None, leveling_delay_format=None, predecessors=None, successors=None, ignore_warnings=False, is_expanded=None, display_on_timeline=None, display_as_summary=None, hyperlink=None, hyperlink_address=None, hyperlink_sub_address=None, earned_value_method=None, is_published=True, status_manager=None, commitment_start=None, commitment_finish=None, commitment_type=None, baselines=None, extended_attributes=None, outline_codes=None, warning=False, activity_id=None): # noqa: E501
276278
"""Task - a model defined in Swagger""" # noqa: E501
277279

278280
self._uid = None
@@ -388,6 +390,7 @@ def __init__(self, uid=None, id=None, name=None, duration_text=None, duration=No
388390
self._extended_attributes = None
389391
self._outline_codes = None
390392
self._warning = None
393+
self._activity_id = None
391394
self.discriminator = None
392395

393396
if uid is not None:
@@ -616,6 +619,8 @@ def __init__(self, uid=None, id=None, name=None, duration_text=None, duration=No
616619
self.outline_codes = outline_codes
617620
if warning is not None:
618621
self.warning = warning
622+
if activity_id is not None:
623+
self.activity_id = activity_id
619624

620625
@property
621626
def uid(self):
@@ -3154,6 +3159,27 @@ def warning(self, warning):
31543159
if warning is None:
31553160
raise ValueError("Invalid value for `warning`, must not be `None`") # noqa: E501
31563161
self._warning = warning
3162+
@property
3163+
def activity_id(self):
3164+
"""Gets the activity_id of this Task. # noqa: E501
3165+
3166+
Represents activity id field - a task's unique identifier used by Primavera (only applicable to Primavera projects). # noqa: E501
3167+
3168+
:return: The activity_id of this Task. # noqa: E501
3169+
:rtype: str
3170+
"""
3171+
return self._activity_id
3172+
3173+
@activity_id.setter
3174+
def activity_id(self, activity_id):
3175+
"""Sets the activity_id of this Task.
3176+
3177+
Represents activity id field - a task's unique identifier used by Primavera (only applicable to Primavera projects). # noqa: E501
3178+
3179+
:param activity_id: The activity_id of this Task. # noqa: E501
3180+
:type: str
3181+
"""
3182+
self._activity_id = activity_id
31573183
def to_dict(self):
31583184
"""Returns the model properties as a dict"""
31593185
result = {}

docs/Task.md

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ Name | Type | Description | Notes
116116
**extended_attributes** | [**list[ExtendedAttribute]**](ExtendedAttribute.md) | Task extended attributes. | [optional]
117117
**outline_codes** | [**list[OutlineCode]**](OutlineCode.md) | Task outline codes. | [optional]
118118
**warning** | **bool** | Represents the flag which indicates that task has schedule discrepancies. | [default to False]
119+
**activity_id** | **str** | Represents activity id field - a task's unique identifier used by Primavera (only applicable to Primavera projects). | [optional]
119120

120121
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
121122

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools import setup, find_packages # noqa: H301
55

66
NAME = "aspose-tasks-cloud"
7-
VERSION = "20.11.0"
7+
VERSION = "21.2.0"
88
# To install the library, run the following
99
#
1010
# python setup.py install

test/test_resources.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,16 @@ def test_put_resource(self):
111111
self.assertEqual(resource.cost, put_result.resource.cost)
112112

113113
def test_delete_resource(self):
114-
filename = 'Home_move_plan.mpp'
114+
filename = 'Plan_with_resource.mpp'
115115
self.upload_file(filename)
116-
delete_request = DeleteResourceRequest(filename, 0)
117-
delete_result = self.tasks_api.delete_resource(delete_request)
118-
self.assertIsNotNone(delete_result)
119-
self.assertIsInstance(delete_result, AsposeResponse)
120116
get_request = GetResourcesRequest(filename)
121117
get_result = self.tasks_api.get_resources(get_request)
122118
self.assertIsNotNone(get_result)
123119
self.assertIsInstance(get_result, ResourceItemsResponse)
124-
self.assertEqual(0, len(get_result.resources.resource_item))
120+
resource_count_before_delete = len(get_result.resources.resource_item)
121+
delete_request = DeleteResourceRequest(filename, 1)
122+
delete_result = self.tasks_api.delete_resource(delete_request)
123+
self.assertIsNotNone(delete_result)
124+
self.assertIsInstance(delete_result, AsposeResponse)
125+
get_result = self.tasks_api.get_resources(get_request)
126+
self.assertGreater(resource_count_before_delete, len(get_result.resources.resource_item))

testData/Plan_with_resource.mpp

423 KB
Binary file not shown.

0 commit comments

Comments
 (0)