Skip to content

Commit 934b2a7

Browse files
authored
Merge pull request #61 from Microsoft/dev
version 0.1.4 includes fixes to float serialization issue
2 parents 62fab03 + 2242cb7 commit 934b2a7

File tree

65 files changed

+158
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+158
-147
lines changed

vsts/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from setuptools import setup, find_packages
77

88
NAME = "vsts"
9-
VERSION = "0.1.3"
9+
VERSION = "0.1.4"
1010

1111
# To install the library, run the following
1212
#

vsts/vsts/_file_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def load(self):
3333
try:
3434
if os.path.isfile(self.file_name):
3535
if self.max_age > 0 and os.stat(self.file_name).st_mtime + self.max_age < time.clock():
36-
logging.info('Cache file expired: %s', file=self.file_name)
36+
logging.debug('Cache file expired: %s', file=self.file_name)
3737
os.remove(self.file_name)
3838
else:
39-
logging.info('Loading cache file: %s', self.file_name)
39+
logging.debug('Loading cache file: %s', self.file_name)
4040
self.data = get_file_json(self.file_name, throw_on_empty=False) or {}
4141
else:
42-
logging.info('Cache file does not exist: %s', self.file_name)
42+
logging.debug('Cache file does not exist: %s', self.file_name)
4343
except Exception as ex:
4444
logging.exception(ex)
4545
# file is missing or corrupt so attempt to delete it

vsts/vsts/contributions/v4_0/models/extension_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ExtensionManifest(Model):
2929
:param licensing: How this extension behaves with respect to licensing
3030
:type licensing: :class:`ExtensionLicensing <contributions.v4_0.models.ExtensionLicensing>`
3131
:param manifest_version: Version of the extension manifest format/content
32-
:type manifest_version: number
32+
:type manifest_version: float
3333
:param scopes: List of all oauth scopes required by this extension
3434
:type scopes: list of str
3535
:param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
@@ -45,7 +45,7 @@ class ExtensionManifest(Model):
4545
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
4646
'language': {'key': 'language', 'type': 'str'},
4747
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
48-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
48+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
4949
'scopes': {'key': 'scopes', 'type': '[str]'},
5050
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}
5151
}

vsts/vsts/contributions/v4_0/models/installed_extension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class InstalledExtension(ExtensionManifest):
2929
:param licensing: How this extension behaves with respect to licensing
3030
:type licensing: :class:`ExtensionLicensing <contributions.v4_0.models.ExtensionLicensing>`
3131
:param manifest_version: Version of the extension manifest format/content
32-
:type manifest_version: number
32+
:type manifest_version: float
3333
:param scopes: List of all oauth scopes required by this extension
3434
:type scopes: list of str
3535
:param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
@@ -65,7 +65,7 @@ class InstalledExtension(ExtensionManifest):
6565
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
6666
'language': {'key': 'language', 'type': 'str'},
6767
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
68-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
68+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
6969
'scopes': {'key': 'scopes', 'type': '[str]'},
7070
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'},
7171
'extension_id': {'key': 'extensionId', 'type': 'str'},

vsts/vsts/contributions/v4_0/models/resolved_data_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ class ResolvedDataProvider(Model):
1313
"""ResolvedDataProvider.
1414
1515
:param duration: The total time the data provider took to resolve its data (in milliseconds)
16-
:type duration: number
16+
:type duration: int
1717
:param error:
1818
:type error: str
1919
:param id:
2020
:type id: str
2121
"""
2222

2323
_attribute_map = {
24-
'duration': {'key': 'duration', 'type': 'number'},
24+
'duration': {'key': 'duration', 'type': 'int'},
2525
'error': {'key': 'error', 'type': 'str'},
2626
'id': {'key': 'id', 'type': 'str'}
2727
}

vsts/vsts/contributions/v4_1/models/extension_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ExtensionManifest(Model):
3131
:param licensing: How this extension behaves with respect to licensing
3232
:type licensing: :class:`ExtensionLicensing <contributions.v4_1.models.ExtensionLicensing>`
3333
:param manifest_version: Version of the extension manifest format/content
34-
:type manifest_version: number
34+
:type manifest_version: float
3535
:param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution.
3636
:type restricted_to: list of str
3737
:param scopes: List of all oauth scopes required by this extension
@@ -50,7 +50,7 @@ class ExtensionManifest(Model):
5050
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
5151
'language': {'key': 'language', 'type': 'str'},
5252
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
53-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
53+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
5454
'restricted_to': {'key': 'restrictedTo', 'type': '[str]'},
5555
'scopes': {'key': 'scopes', 'type': '[str]'},
5656
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}

vsts/vsts/contributions/v4_1/models/installed_extension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class InstalledExtension(ExtensionManifest):
3131
:param licensing: How this extension behaves with respect to licensing
3232
:type licensing: :class:`ExtensionLicensing <contributions.v4_1.models.ExtensionLicensing>`
3333
:param manifest_version: Version of the extension manifest format/content
34-
:type manifest_version: number
34+
:type manifest_version: float
3535
:param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution.
3636
:type restricted_to: list of str
3737
:param scopes: List of all oauth scopes required by this extension
@@ -70,7 +70,7 @@ class InstalledExtension(ExtensionManifest):
7070
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
7171
'language': {'key': 'language', 'type': 'str'},
7272
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
73-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
73+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
7474
'restricted_to': {'key': 'restrictedTo', 'type': '[str]'},
7575
'scopes': {'key': 'scopes', 'type': '[str]'},
7676
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'},

vsts/vsts/contributions/v4_1/models/resolved_data_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ class ResolvedDataProvider(Model):
1313
"""ResolvedDataProvider.
1414
1515
:param duration: The total time the data provider took to resolve its data (in milliseconds)
16-
:type duration: number
16+
:type duration: int
1717
:param error:
1818
:type error: str
1919
:param id:
2020
:type id: str
2121
"""
2222

2323
_attribute_map = {
24-
'duration': {'key': 'duration', 'type': 'number'},
24+
'duration': {'key': 'duration', 'type': 'int'},
2525
'error': {'key': 'error', 'type': 'str'},
2626
'id': {'key': 'id', 'type': 'str'}
2727
}

vsts/vsts/core/v4_0/models/public_key.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class PublicKey(Model):
1313
"""PublicKey.
1414
1515
:param exponent: Gets or sets the exponent for the public key.
16-
:type exponent: list of number
16+
:type exponent: list of int
1717
:param modulus: Gets or sets the modulus for the public key.
18-
:type modulus: list of number
18+
:type modulus: list of int
1919
"""
2020

2121
_attribute_map = {
22-
'exponent': {'key': 'exponent', 'type': '[number]'},
23-
'modulus': {'key': 'modulus', 'type': '[number]'}
22+
'exponent': {'key': 'exponent', 'type': '[int]'},
23+
'modulus': {'key': 'modulus', 'type': '[int]'}
2424
}
2525

2626
def __init__(self, exponent=None, modulus=None):

vsts/vsts/core/v4_1/models/public_key.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class PublicKey(Model):
1313
"""PublicKey.
1414
1515
:param exponent: Gets or sets the exponent for the public key.
16-
:type exponent: list of number
16+
:type exponent: list of int
1717
:param modulus: Gets or sets the modulus for the public key.
18-
:type modulus: list of number
18+
:type modulus: list of int
1919
"""
2020

2121
_attribute_map = {
22-
'exponent': {'key': 'exponent', 'type': '[number]'},
23-
'modulus': {'key': 'modulus', 'type': '[number]'}
22+
'exponent': {'key': 'exponent', 'type': '[int]'},
23+
'modulus': {'key': 'modulus', 'type': '[int]'}
2424
}
2525

2626
def __init__(self, exponent=None, modulus=None):

vsts/vsts/extension_management/v4_0/models/extension_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ExtensionManifest(Model):
2929
:param licensing: How this extension behaves with respect to licensing
3030
:type licensing: :class:`ExtensionLicensing <extension-management.v4_0.models.ExtensionLicensing>`
3131
:param manifest_version: Version of the extension manifest format/content
32-
:type manifest_version: number
32+
:type manifest_version: float
3333
:param scopes: List of all oauth scopes required by this extension
3434
:type scopes: list of str
3535
:param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
@@ -45,7 +45,7 @@ class ExtensionManifest(Model):
4545
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
4646
'language': {'key': 'language', 'type': 'str'},
4747
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
48-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
48+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
4949
'scopes': {'key': 'scopes', 'type': '[str]'},
5050
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}
5151
}

vsts/vsts/extension_management/v4_0/models/extension_statistic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class ExtensionStatistic(Model):
1515
:param statistic_name:
1616
:type statistic_name: str
1717
:param value:
18-
:type value: number
18+
:type value: float
1919
"""
2020

2121
_attribute_map = {
2222
'statistic_name': {'key': 'statisticName', 'type': 'str'},
23-
'value': {'key': 'value', 'type': 'number'}
23+
'value': {'key': 'value', 'type': 'float'}
2424
}
2525

2626
def __init__(self, statistic_name=None, value=None):

vsts/vsts/extension_management/v4_0/models/installed_extension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class InstalledExtension(ExtensionManifest):
2929
:param licensing: How this extension behaves with respect to licensing
3030
:type licensing: :class:`ExtensionLicensing <extension-management.v4_0.models.ExtensionLicensing>`
3131
:param manifest_version: Version of the extension manifest format/content
32-
:type manifest_version: number
32+
:type manifest_version: float
3333
:param scopes: List of all oauth scopes required by this extension
3434
:type scopes: list of str
3535
:param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
@@ -65,7 +65,7 @@ class InstalledExtension(ExtensionManifest):
6565
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
6666
'language': {'key': 'language', 'type': 'str'},
6767
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
68-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
68+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
6969
'scopes': {'key': 'scopes', 'type': '[str]'},
7070
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'},
7171
'extension_id': {'key': 'extensionId', 'type': 'str'},

vsts/vsts/extension_management/v4_1/models/extension_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ExtensionManifest(Model):
3131
:param licensing: How this extension behaves with respect to licensing
3232
:type licensing: :class:`ExtensionLicensing <extension-management.v4_1.models.ExtensionLicensing>`
3333
:param manifest_version: Version of the extension manifest format/content
34-
:type manifest_version: number
34+
:type manifest_version: float
3535
:param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution.
3636
:type restricted_to: list of str
3737
:param scopes: List of all oauth scopes required by this extension
@@ -50,7 +50,7 @@ class ExtensionManifest(Model):
5050
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
5151
'language': {'key': 'language', 'type': 'str'},
5252
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
53-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
53+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
5454
'restricted_to': {'key': 'restrictedTo', 'type': '[str]'},
5555
'scopes': {'key': 'scopes', 'type': '[str]'},
5656
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}

vsts/vsts/extension_management/v4_1/models/extension_statistic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class ExtensionStatistic(Model):
1515
:param statistic_name:
1616
:type statistic_name: str
1717
:param value:
18-
:type value: number
18+
:type value: float
1919
"""
2020

2121
_attribute_map = {
2222
'statistic_name': {'key': 'statisticName', 'type': 'str'},
23-
'value': {'key': 'value', 'type': 'number'}
23+
'value': {'key': 'value', 'type': 'float'}
2424
}
2525

2626
def __init__(self, statistic_name=None, value=None):

vsts/vsts/extension_management/v4_1/models/installed_extension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class InstalledExtension(ExtensionManifest):
3131
:param licensing: How this extension behaves with respect to licensing
3232
:type licensing: :class:`ExtensionLicensing <extension-management.v4_1.models.ExtensionLicensing>`
3333
:param manifest_version: Version of the extension manifest format/content
34-
:type manifest_version: number
34+
:type manifest_version: float
3535
:param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution.
3636
:type restricted_to: list of str
3737
:param scopes: List of all oauth scopes required by this extension
@@ -70,7 +70,7 @@ class InstalledExtension(ExtensionManifest):
7070
'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'},
7171
'language': {'key': 'language', 'type': 'str'},
7272
'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'},
73-
'manifest_version': {'key': 'manifestVersion', 'type': 'number'},
73+
'manifest_version': {'key': 'manifestVersion', 'type': 'float'},
7474
'restricted_to': {'key': 'restrictedTo', 'type': '[str]'},
7575
'scopes': {'key': 'scopes', 'type': '[str]'},
7676
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'},

vsts/vsts/file_container/v4_0/models/file_container_item.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class FileContainerItem(Model):
1515
:param container_id: Container Id.
1616
:type container_id: long
1717
:param content_id:
18-
:type content_id: list of number
18+
:type content_id: list of int
1919
:param content_location: Download Url for the content of this item.
2020
:type content_location: str
2121
:param created_by: Creator.
@@ -27,7 +27,7 @@ class FileContainerItem(Model):
2727
:param file_encoding: Encoding of the file. Zero if not a file.
2828
:type file_encoding: int
2929
:param file_hash: Hash value of the file. Null if not a file.
30-
:type file_hash: list of number
30+
:type file_hash: list of int
3131
:param file_id: Id of the file content.
3232
:type file_id: int
3333
:param file_length: Length of the file. Zero if not of a file.
@@ -52,13 +52,13 @@ class FileContainerItem(Model):
5252

5353
_attribute_map = {
5454
'container_id': {'key': 'containerId', 'type': 'long'},
55-
'content_id': {'key': 'contentId', 'type': '[number]'},
55+
'content_id': {'key': 'contentId', 'type': '[int]'},
5656
'content_location': {'key': 'contentLocation', 'type': 'str'},
5757
'created_by': {'key': 'createdBy', 'type': 'str'},
5858
'date_created': {'key': 'dateCreated', 'type': 'iso-8601'},
5959
'date_last_modified': {'key': 'dateLastModified', 'type': 'iso-8601'},
6060
'file_encoding': {'key': 'fileEncoding', 'type': 'int'},
61-
'file_hash': {'key': 'fileHash', 'type': '[number]'},
61+
'file_hash': {'key': 'fileHash', 'type': '[int]'},
6262
'file_id': {'key': 'fileId', 'type': 'int'},
6363
'file_length': {'key': 'fileLength', 'type': 'long'},
6464
'file_type': {'key': 'fileType', 'type': 'int'},

vsts/vsts/file_container/v4_1/models/file_container_item.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class FileContainerItem(Model):
1515
:param container_id: Container Id.
1616
:type container_id: long
1717
:param content_id:
18-
:type content_id: list of number
18+
:type content_id: list of int
1919
:param content_location: Download Url for the content of this item.
2020
:type content_location: str
2121
:param created_by: Creator.
@@ -27,7 +27,7 @@ class FileContainerItem(Model):
2727
:param file_encoding: Encoding of the file. Zero if not a file.
2828
:type file_encoding: int
2929
:param file_hash: Hash value of the file. Null if not a file.
30-
:type file_hash: list of number
30+
:type file_hash: list of int
3131
:param file_id: Id of the file content.
3232
:type file_id: int
3333
:param file_length: Length of the file. Zero if not of a file.
@@ -52,13 +52,13 @@ class FileContainerItem(Model):
5252

5353
_attribute_map = {
5454
'container_id': {'key': 'containerId', 'type': 'long'},
55-
'content_id': {'key': 'contentId', 'type': '[number]'},
55+
'content_id': {'key': 'contentId', 'type': '[int]'},
5656
'content_location': {'key': 'contentLocation', 'type': 'str'},
5757
'created_by': {'key': 'createdBy', 'type': 'str'},
5858
'date_created': {'key': 'dateCreated', 'type': 'iso-8601'},
5959
'date_last_modified': {'key': 'dateLastModified', 'type': 'iso-8601'},
6060
'file_encoding': {'key': 'fileEncoding', 'type': 'int'},
61-
'file_hash': {'key': 'fileHash', 'type': '[number]'},
61+
'file_hash': {'key': 'fileHash', 'type': '[int]'},
6262
'file_id': {'key': 'fileId', 'type': 'int'},
6363
'file_length': {'key': 'fileLength', 'type': 'long'},
6464
'file_type': {'key': 'fileType', 'type': 'int'},

vsts/vsts/gallery/v4_0/models/event_counts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class EventCounts(Model):
1313
"""EventCounts.
1414
1515
:param average_rating: Average rating on the day for extension
16-
:type average_rating: number
16+
:type average_rating: int
1717
:param buy_count: Number of times the extension was bought in hosted scenario (applies only to VSTS extensions)
1818
:type buy_count: int
1919
:param connected_buy_count: Number of times the extension was bought in connected scenario (applies only to VSTS extensions)
@@ -33,7 +33,7 @@ class EventCounts(Model):
3333
"""
3434

3535
_attribute_map = {
36-
'average_rating': {'key': 'averageRating', 'type': 'number'},
36+
'average_rating': {'key': 'averageRating', 'type': 'int'},
3737
'buy_count': {'key': 'buyCount', 'type': 'int'},
3838
'connected_buy_count': {'key': 'connectedBuyCount', 'type': 'int'},
3939
'connected_install_count': {'key': 'connectedInstallCount', 'type': 'int'},

vsts/vsts/gallery/v4_0/models/extension_statistic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class ExtensionStatistic(Model):
1515
:param statistic_name:
1616
:type statistic_name: str
1717
:param value:
18-
:type value: number
18+
:type value: float
1919
"""
2020

2121
_attribute_map = {
2222
'statistic_name': {'key': 'statisticName', 'type': 'str'},
23-
'value': {'key': 'value', 'type': 'number'}
23+
'value': {'key': 'value', 'type': 'float'}
2424
}
2525

2626
def __init__(self, statistic_name=None, value=None):

vsts/vsts/gallery/v4_0/models/rating_count_per_rating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class RatingCountPerRating(Model):
1313
"""RatingCountPerRating.
1414
1515
:param rating: Rating value
16-
:type rating: number
16+
:type rating: int
1717
:param rating_count: Count of total ratings
1818
:type rating_count: long
1919
"""
2020

2121
_attribute_map = {
22-
'rating': {'key': 'rating', 'type': 'number'},
22+
'rating': {'key': 'rating', 'type': 'int'},
2323
'rating_count': {'key': 'ratingCount', 'type': 'long'}
2424
}
2525

0 commit comments

Comments
 (0)