From 42de263c54260ee97a042a64ad4ecba2079f4fe8 Mon Sep 17 00:00:00 2001 From: Kip Lehman Date: Tue, 6 Dec 2016 11:33:18 -0700 Subject: [PATCH 1/3] fix getAllowedValues to proces custom fields, allow pyral.Entity instances as payload values in a list for COLLECTION attributes for put/post --- README.rst | 104 ++------------------------ README.short | 2 +- VERSIONS | 17 +++++ build_dist.py | 2 +- doc/build/doctrees/environment.pickle | Bin 14664 -> 14664 bytes doc/build/html/.buildinfo | 2 +- doc/build/html/genindex.html | 8 +- doc/build/html/index.html | 8 +- doc/build/html/interface.html | 8 +- doc/build/html/objects.inv | Bin 530 -> 530 bytes doc/build/html/overview.html | 8 +- doc/build/html/search.html | 8 +- doc/source/conf.py | 4 +- examples/allowedValues.py | 6 +- examples/typedef.py | 3 +- pyral/__init__.py | 2 +- pyral/config.py | 2 +- pyral/context.py | 2 +- pyral/entity.py | 2 +- pyral/hydrate.py | 2 +- pyral/query_builder.py | 2 +- pyral/rallyresp.py | 2 +- pyral/restapi.py | 30 ++++++-- setup.py | 2 +- test/test_convenience.py | 10 ++- 25 files changed, 95 insertions(+), 141 deletions(-) diff --git a/README.rst b/README.rst index 3885f5a..00825f7 100644 --- a/README.rst +++ b/README.rst @@ -39,7 +39,7 @@ Obtain the requests_ package and install it according to that package's directio As of requests-2.0.0, there is support for HTTPS over HTTP proxy via the CONNECT request. Use of requests-2.x or better is recommended for use with pyral. The requests_ package can be found via the Python Package Index site (http://pypi/python.org/index). -The most recent release of pyral (1.2.2) has been tested using requests 2.8.1. +The most recent release of pyral (1.2.3) has been tested using requests 2.8.1. Obtain and install the six_ module (available from PyPI at https://pypi.python.org/pypi/six) @@ -67,7 +67,7 @@ relevant packages. >> import requests >> import pyral >> pyral.__version__ - (1, 2, 2) + (1, 2, 3) @@ -274,6 +274,11 @@ Prerequisites Versions -------- + **1.2.3** + Fixed restapi.py Rally.getAllowedValues method to accommodate custom fields + Allow attribute payload for put and post to have a list of pyral.Entity instances + as values for an attribute that is of type COLLECTION. + **1.2.2** Allow for disambiguating Project amongst name duplications by means of using fully qualified path. Incorporated suggestion on preserving case name of custom PortfolioItem sub-item. @@ -300,100 +305,7 @@ Versions Added examples/updtag.py script. - 1.1.1 - Modified entity.py to allow it to pass back PortfolioItem sub type instances. - Modified rallyresp.py defect referencing non-existing req_type instance var by changing - reference to request_type. - Modified restapi.py to use user, dropped auth_user. - Modified restapi.py to be more defensive when user has no associated UserProfile. - Modified context.py to account for use of Cygwin in Pinger code. - Modified restapi.py to handle encoding of attachment content to match Rally expectations. - Modified restapi.py/entity.py to handle querying of SchedulableArtifact instances. - Modified restapi.py to handle querying and hydrating of PortfolioItem instances more completely. - Modified restapi.py/entity.py to provide rudimentary support for querying of RecycleBin entries. - Modified restapi.py and added search_utils.py to provide a search method for pyral Rally instances. - Modified rallyresp.py to better handle some boundary conditions when response body item counts - differ from what is stated in the TotalResultCount. - Modified context.py to account for scenario where user's default workspace has no projects. - Modified restapi.py/getProject to return correct project. - - 1.1.0 - Introduction of support to use Rally API Key and rallyWorkset (supercedes rallySettings). - Two relatively minor defects fixed dealing with internalizing environment - vars for initialization and in retrieving Rally entity attribute allowed values. - - 1.0.1 - Patch to address defect with Rally WSAPI v2.0 projects collection endpoint - providing conflicting information. - - 1.0.0 - Default WSAPI version in config is v2.0. This version is not compatible - with Rally WSAPI version 1.x. - Adjusted the RallyUrlBuilder (via RallyQueryFormatter) to be more resilient - with respect to many more "special" characters (non-alphanumeric). - Retrieving the meta data uses the v2.0 schema endpoint. - No longer support a version keyword argument when obtaining a Rally instance. - - 0.9.4 - Adjusted Rally __init__ to accommodate using requests 0.x, 1.x, 2.x versions. - Factored out query building and fixed constructing multi condition queries. - Added internal convenience method to handle a list of refs to turn them into a - list of single key (_ref) hashes. - Added UserIterationCapacity to known entities. - Upped default WSAPI version in config to 1.43. - Support using of https_proxy / HTTPS_PROXY environment variables. - Refactored getAllUsers to include UserProfile information with fewer queries. - - 0.9.3 - Fixed Pinger class to use correct ping options on Linux and Windows. - Updated exception catching and exception raising to Python 2.6/2.7 syntax. - - 0.9.2 - Fixed getProject to take optional project name argument. - Added HTTP header item in config.py to set Content-Type to 'application/json'. - Added recognition of verify_ssl_cert=True/False as keyword argment to - Rally constructor. Explicit specification results in passing a - verify=True/False to the underlying requests package. This can be - useful when dealing with an expired SSL certificate. - Upped default WSAPI version in config.py to 1.37 to support dyna-types - (specifically PortfolioItem and sub-types). - Modified addAttachment to conform with non-backward compatible change in Rally WSAPI - involving how an attachment is related to an artifact. - Fixed defect in calculating an Attachment file size (use pre-encoded rather than post-encoded size). - - This release is intended as the final beta before a 1.0 release. - - 0.9.1 - Upped default WSAPI version in config.py to 1.30 - All entities that are subclasses of WorkspaceDomainObject now have a details method - that show the attribute values in an easy to read multiline format. - Dropped attempted discrimination of server value to determine if it is a name or an IPv4 address. - No longer look for http_proxy in environment, only https_proxy. - Introduced convenience methods dealing with attachments. - Corrected resource URL construction for the major ops (GET, PUT, POST, DEL) - when project=None specified (useful for Workspace spanning activities). - - 0.8.12 - Fixed premature exercise of iterator in initial response - - 0.8.11 - Fixed inappropriate error message when initial connect attempt timed out. - Message had stated that the target server did not speak the Rally WSAPI. - Improved context handling with respect to workspace and project settings. - - 0.8.10 - Attempted to bolster proxy handling. - Limited success as there is an outstanding issue in requests (urllib3) not - implementing CONNECT for https over http. - - 0.8.9 - initial attempt at providing proxy support - - 0.8.8 - added warn=True/False to Rally instantiation - - 0.8.7 - Initial release on developer.rallydev.com + see the VERSIONS file for information pertaining to older releases TODO diff --git a/README.short b/README.short index c91b1fb..55c3f91 100644 --- a/README.short +++ b/README.short @@ -20,7 +20,7 @@ Requirements The pyral package requires the use of Kenneth Reitz's requests package using version 2.0.0 or better. As of requests version 2.0.0, there is support for HTTPS over HTTP proxy via the CONNECT request. The requests package can be found via the Python Package Index site (http://pypi/python.org/index). -The most recent release of pyral (1.2.2) has been tested with requests 2.8.1. +The most recent release of pyral (1.2.3) has been tested with requests 2.8.1. The six module is also required. diff --git a/VERSIONS b/VERSIONS index 8ca0f5b..7c978ee 100644 --- a/VERSIONS +++ b/VERSIONS @@ -87,3 +87,20 @@ allow instantiation option to work with only one workspace for better performance for Subscriptions with large number of Workspaces fix addAttachment handling to allow binary files and increase size limit to 50MB. +1.2.1 - Oct 2016 + Added mention that the six package is required. + Fixed context setup for proper handling when a user has no default workspace/project settings. + Corrected handling of allowedValues for attributes when the single allowedValue is a boolean value. + Added an allowedValues.py example script. + +1.2.2 - Nov 2016 + Allow for disambiguating Project amongst name duplications by means of using fully qualified path. + Incorporated suggestion on preserving case name of custom PortfolioItem sub-item. + Fixed discrepancy of docs versus code on default pagesize, now is actually 200 everywhere. + Fix location of download package in GitHub repo. + +1.2.3 - Dec 2016 + Fixed restapi.py Rally.getAllowedValues method to accommodate custom fields + Allow attribute payload for put and post to have a list of pyral.Entity instances + as values for an attribute that is of type COLLECTION. + diff --git a/build_dist.py b/build_dist.py index 8859b56..920a962 100644 --- a/build_dist.py +++ b/build_dist.py @@ -13,7 +13,7 @@ import re PACKAGE_NAME = "pyral" -VERSION = "1.2.2" +VERSION = "1.2.3" AUX_FILES = ['MANIFEST.in', 'PKG-INFO', diff --git a/doc/build/doctrees/environment.pickle b/doc/build/doctrees/environment.pickle index e2430940cca526489703df477287ef589fbc8372..fec5b1e858014d6244febaddd9f640870228d5d4 100644 GIT binary patch delta 48 zcmX?6bfRd(IbKHN&F6V@HDm<$&pj4*BE#6-@fwi1Q-(Lg2Esh`J9Kk|*#{;76yO!n delta 48 zcmX?6bfRd(IbKGi&F6V@HDtKYmEHJJo?-0ncn!!rdqgh72Ex4S`FC@K*#{;7CW02H diff --git a/doc/build/html/.buildinfo b/doc/build/html/.buildinfo index d34e39f..a2943f8 100644 --- a/doc/build/html/.buildinfo +++ b/doc/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 1c8ead5262c9c247959f836aa7c0efdf +config: a147a201745a9167d1fff18974372aba tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/doc/build/html/genindex.html b/doc/build/html/genindex.html index 4ff9a1f..403affe 100644 --- a/doc/build/html/genindex.html +++ b/doc/build/html/genindex.html @@ -9,7 +9,7 @@ - Index — pyral 1.2.2 documentation + Index — pyral 1.2.3 documentation @@ -34,7 +34,7 @@ - + @@ -63,7 +63,7 @@
- 1.2.2 + 1.2.3
@@ -437,7 +437,7 @@

U

@@ -62,7 +62,7 @@
- 1.2.2 + 1.2.3
@@ -188,7 +188,7 @@