Skip to content

Commit 6938341

Browse files
committed
Prep for 2.3.6 release: optimize setup (exclude tests packages)
1 parent b84b512 commit 6938341

File tree

16 files changed

+44
-27
lines changed

16 files changed

+44
-27
lines changed

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include LICENSE
22
include README.md
3+
recursive-exclude tests *

office365/base_item.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from office365.directory.identities.identity_set import IdentitySet
22
from office365.entity import Entity
3-
from office365.onedrive.listitems.itemReference import ItemReference
3+
from office365.onedrive.listitems.item_reference import ItemReference
44

55

66
class BaseItem(Entity):

office365/excel/tables/workbookTable.py

-12
This file was deleted.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from office365.entity import Entity
2+
3+
4+
class WorkbookTable(Entity):
5+
"""Represents an Excel table."""
6+
pass

office365/excel/workbook.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from office365.entity_collection import EntityCollection
33
from office365.excel.functions.workbookFunctions import WorkbookFunctions
44
from office365.excel.names.workbookNamedItem import WorkbookNamedItem
5-
from office365.excel.tables.workbookTable import WorkbookTableCollection
5+
from office365.excel.tables.workbook_table import WorkbookTable
66
from office365.excel.worksheets.workbookWorksheet import WorkbookWorksheetCollection
77
from office365.runtime.resource_path import ResourcePath
88

@@ -19,7 +19,8 @@ def functions(self):
1919
def tables(self):
2020
"""Represents a collection of tables associated with the workbook. Read-only."""
2121
return self.properties.get('tables',
22-
WorkbookTableCollection(self.context, ResourcePath("tables", self.resource_path)))
22+
EntityCollection(self.context, WorkbookTable,
23+
ResourcePath("tables", self.resource_path)))
2324

2425
@property
2526
def names(self):

office365/onedrive/drives/drive_recipient.py

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33

44
class DriveRecipient(ClientValue):
5+
"""
6+
The DriveRecipient resource represents a person, group, or other recipient to
7+
share with using the invite action.
8+
"""
59

610
def __init__(self):
711
super(DriveRecipient, self).__init__()

office365/onedrive/folders/folder.py

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33

44
class Folder(ClientValue):
5+
"""
6+
The Folder resource groups folder-related data on an item into a single structure.
7+
DriveItems with a non-null folder facet are containers for other DriveItems.
8+
"""
59

610
def __init__(self, childCount=None, view=None):
711
"""

office365/outlook/calendar/calendar.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ class Calendar(Entity):
1717
of a Microsoft 365 group.
1818
"""
1919

20-
def get_schedule(self, schedules, startTime=None, endTime=None, availabilityViewInterval=30):
20+
def get_schedule(self, schedules, start_time=None, end_time=None, availability_view_interval=30):
2121
"""
2222
Get the free/busy availability information for a collection of users, distributions lists, or resources
2323
(rooms or equipment) for a specified time period.
2424
25-
:param datetime.datetime endTime: The date, time, and time zone that the period ends.
26-
:param int availabilityViewInterval: Represents the duration of a time slot in an availabilityView
25+
:param datetime.datetime end_time: The date, time, and time zone that the period ends.
26+
:param int availability_view_interval: Represents the duration of a time slot in an availabilityView
2727
in the response. The default is 30 minutes, minimum is 5, maximum is 1440. Optional.
28-
:param datetime.datetime startTime: The date, time, and time zone that the period starts.
28+
:param datetime.datetime start_time: The date, time, and time zone that the period starts.
2929
:param list[str] schedules: A collection of SMTP addresses of users, distribution lists,
3030
or resources to get availability information for.
3131
"""
3232
payload = {
3333
"schedules": schedules,
34-
"startTime": DateTimeTimeZone.parse(startTime),
35-
"endTime": DateTimeTimeZone.parse(endTime),
36-
"availabilityViewInterval": availabilityViewInterval
34+
"startTime": DateTimeTimeZone.parse(start_time),
35+
"endTime": DateTimeTimeZone.parse(end_time),
36+
"availabilityViewInterval": availability_view_interval
3737
}
3838
result = ClientResult(self.context, ClientValueCollection(ScheduleInformation))
3939
qry = ServiceOperationQuery(self, "getSchedule", None, payload, None, result)

office365/teams/operations/teams_async_operation.py

+11
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22

33

44
class TeamsAsyncOperation(Entity):
5+
"""
6+
A Microsoft Teams async operation is an operation that transcends the lifetime of a single API request.
7+
These operations are long-running or too expensive to complete within the timeframe of their originating request.
8+
9+
When an async operation is initiated, the method returns a 202 Accepted response code.
10+
The response will also contain a Location header, which contains the location of the teamsAsyncOperation.
11+
Periodically check the status of the operation by making a GET request to this location; wait >30 seconds
12+
between checks. When the request completes successfully, the status will be "succeeded" and
13+
the targetResourceLocation will point to the created/modified resource.
14+
15+
"""
516
pass

office365/teams/tabs/teams_tab.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TeamsTab(Entity):
1010
"""
1111

1212
@property
13-
def teamsApp(self):
13+
def teams_app(self):
1414
"""The application that is linked to the tab. This cannot be changed after tab creation."""
1515
return self.properties.get('teamsApp',
1616
TeamsApp(self.context, ResourcePath("teamsApp", self.resource_path)))

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="Office365-REST-Python-Client",
13-
version="2.3.5",
13+
version="2.3.6",
1414
author="Vadim Gremyachev",
1515
author_email="[email protected]",
1616
maintainer="Konrad Gądek, Domenico Di Nicola",
@@ -43,7 +43,9 @@
4343
'Programming Language :: Python :: 3.8',
4444
'Programming Language :: Python :: 3.9'
4545
],
46-
packages=setuptools.find_packages(),
46+
packages=setuptools.find_packages(exclude=['tests', 'tests.*',
47+
'generator', 'generator.*',
48+
'examples', 'examples.*']),
4749
package_data={
4850
'office365': ["runtime/auth/providers/templates/SAML.xml", "runtime/auth/providers/templates/RST2.xml",
4951
"runtime/auth/providers/templates/FederatedSAML.xml"]

tests/calendar_tests/test_calendar.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def test2_get_schedule(self):
2727
end_time = datetime.utcnow()
2828
start_time = end_time - timedelta(days=7)
2929
result = self.client.me.calendar.get_schedule(schedules=[test_user_principal_name],
30-
startTime=start_time,
31-
endTime=end_time).execute_query()
30+
start_time=start_time,
31+
end_time=end_time).execute_query()
3232
self.assertIsNotNone(result.value)
3333

3434
def test3_get_calendar_groups(self):

0 commit comments

Comments
 (0)