Skip to content

Commit c5cb1fd

Browse files
committed
mods incorporating changes to support Rally WSAPI v2.0
1 parent 62c3a68 commit c5cb1fd

65 files changed

Lines changed: 3964 additions & 1367 deletions

Some content is hidden

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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2010-2012, Rally Software Development Corp. Boulder, Colorado USA
1+
Copyright © 2010-2014, Rally Software Development Corp. Boulder, Colorado USA
22
All rights reserved.
33

44
License for pyral (a Python toolkit for the Rally REST API)

MANIFEST

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ examples/wkspcounts.py
2323
examples/builddefs.py
2424
examples/creattach.py
2525
examples/get_attachments.py
26+
examples/get_schema.py
27+
examples/add_tcrs.py

MANIFEST.in

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ pyral/entity.py
1111
pyral/hydrate.py
1212
pyral/rallyresp.py
1313
pyral/restapi.py
14-
examples/getitem.py
14+
examples/typedef.py
15+
examples/get_schema.py
1516
examples/periscope.py
17+
examples/getitem.py
1618
examples/showdefects.py
19+
examples/statecounts.py
20+
examples/wkspcounts.py
1721
examples/crtask.py
1822
examples/uptask.py
23+
examples/repoitems.py
24+
examples/builddefs.py
25+
examples/creattach.py
26+
examples/get_attachments.py
27+
examples/add_tcrs.py

README.rst

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pyral - A Python toolkit for the Rally REST API
22
===============================================
33

44

5-
The `pyral <http://github.com/Rallydev/pyral>`_ package enables you to push, pull
5+
The `pyral <http://github.com/RallyTools/RallyRestToolkitForPython>`_ package enables you to push, pull
66
and otherwise wrangle the data in your Rally subscription using the popular
77
and productive Python language.
88
The ``pyral`` package provides a smooth and easy to use veneer on top
@@ -24,13 +24,17 @@ Files are available at the `download page`_ .
2424

2525
.. _download page: http://pypi.python.org/pypi/pyral
2626

27-
The git repository is available at http://github.com/Rallydev/pyral
27+
The git repository is available at https://github.com/RallyTools/RallyRestToolkitForPython
2828

2929

3030
Installation
3131
````````````
3232

3333
Obtain the requests_ package and install it according to that package's directions.
34+
As of requests-2.0.0, there is support for HTTPS over HTTP proxy via the CONNECT request.
35+
Use of requests-2.x or better is recommended for use with pyral.
36+
The requests_ package can be found via the Python Package Index site (http://pypi/python.org/index).
37+
3438

3539
Unpack the ``pyral`` distribution file (zip or tar.gz) and then install the pyral_ package.
3640

@@ -51,11 +55,11 @@ relevant packages.
5155
::
5256

5357
$ python
54-
Python 2.6.5 [other Python interpreter info elided ...]
58+
Python 2.7.5 [other Python interpreter info elided ...]
5559
>> import requests
5660
>> import pyral
5761
>> pyral.__version__
58-
(0, 9, 1)
62+
(1, 0, 0)
5963

6064

6165

@@ -224,7 +228,6 @@ create an instance of the Rally class.
224228
PASSWORD password for the Rally subscription UserName
225229
WORKSPACE Rally Workspace
226230
PROJECT Rally Project
227-
VERSION Rally REST Web Services API version
228231
====================================== =========================================
229232

230233
The item names in config files **are** case sensitive.
@@ -242,39 +245,77 @@ The item names in config files **are** case sensitive.
242245
--rallyPassword=<bar> password associated with the Rally UserName
243246
--rallyWorkspace=<bar> Workspace in Rally you want to interact with
244247
--rallyProject=<bar> Project in Rally you want to interact with
245-
--rallyVersion=<bar> Rally REST Web Services API version
246248
====================================== =========================================
247249

248250

249251
Prerequisites
250252
-------------
251253

252-
* Python 2.6 or 2.7
253-
* The most excellent requests_ package, 0.8.2 or better
254-
Developed using requests 0.9.3.
255-
There are reports where requests > 0.9.3 resulted in connection problems (as in not being able to connect) that may be related to SSL.
256-
If you are using requests >- 0.9.3, you must also have certifi-0.0.8 (available on PyPI)
254+
* Python 2.6 or 2.7 (2.7 is preferred)
255+
* The requests_ package, 2.0.0 or better (2.0.0 finally includes support for https proxy)
256+
257257
.. _requests: http://github.com/kennethreitz/requests
258258

259259
Versions
260260
--------
261-
* 0.9.1 - Upped default WSAPI version in config.py to 1.30
262-
All entities that are subclasses of WorkspaceDomainObject now have a details method
263-
that show the attribute values in an easy to read multiline format.
264-
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.
265-
Introduced convenience methods dealing with attachments.
266-
Corrected resource URL construction for the major ops (GET, PUT, POST, DEL)
267-
when project=None specified (useful for Workspace spanning activities).
261+
262+
* 1.0.0 -
263+
Default WSAPI version in config is v2.0. This version is not compatible
264+
with Rally WSAPI version 1.x.
265+
Adjusted the RallyUrlBuilder (via RallyQueryFormatter) to be more resilient
266+
with respect to many more "special" characters (non-alphanumeric).
267+
Retrieving the meta data uses the v2.0 schema endpoint.
268+
No longer support a version keyword argument when obtaining a Rally instance.
269+
270+
* 0.9.4 -
271+
Adjusted Rally __init__ to accommodate using requests 0.x, 1.x, 2.x versions.
272+
Factored out query building and fixed constructing multi condition queries.
273+
Added internal convenience method to handle a list of refs to turn them into a
274+
list of single key (_ref) hashes.
275+
Added UserIterationCapacity to known entities.
276+
Upped default WSAPI version in config to 1.43
277+
Support using of https_proxy / HTTPS_PROXY environment variables.
278+
Refactored getAllUsers to include UserProfile information with fewer queries.
279+
280+
* 0.9.3 -
281+
Fixed Pinger class to use correct ping options on Linux and Windows
282+
Updated exception catching and exception raising to Python 2.6/2.7 syntax.
283+
284+
* 0.9.2 -
285+
Fixed getProject to take optional project name argument.
286+
Added HTTP header item in config.py to set Content-TYpe to 'application/json'.
287+
Added recognition of verify_ssl_cert=True/False as keyword argment to
288+
Rally constructor. Explicit specification results in passing a
289+
verify=True/False to the underlying requests package. This can be
290+
useful when dealing with an expired SSL certificate.
291+
Upped default WSAPI version in config.py to 1.37 to support dyna-types
292+
(specifically PortfolioItem and sub-types)..
293+
Modified addAttachment to conform with non-backward compatible change in Rally WSAPI
294+
involving how an attachment is related to an artifact.
295+
Fixed defect in calculating an Attachment file size (use pre-encoded rather than post-encoded size).
296+
297+
This release is intended as the final beta before a 1.0 release.
298+
299+
* 0.9.1 -
300+
Upped default WSAPI version in config.py to 1.30
301+
All entities that are subclasses of WorkspaceDomainObject now have a details method
302+
that show the attribute values in an easy to read multiline format.
303+
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.
304+
Introduced convenience methods dealing with attachments.
305+
Corrected resource URL construction for the major ops (GET, PUT, POST, DEL)
306+
when project=None specified (useful for Workspace spanning activities).
268307

269308
* 0.8.12 - Fixed premature exercise of iterator in initial response
270309

271-
* 0.8.11 - Fixed inappropriate error message when initial connect attempt timed out.
272-
Message had stated that the target server did not speak the Rally WSAPI.
273-
Improved context handling with respect to workspace and project settings.
310+
* 0.8.11 -
311+
Fixed inappropriate error message when initial connect attempt timed out.
312+
Message had stated that the target server did not speak the Rally WSAPI.
313+
Improved context handling with respect to workspace and project settings.
274314

275-
* 0.8.10 - Attempted to bolster proxy handling.
276-
Limited success as there is an outstanding issue in
277-
requests (urllib3) not implementing CONNECT for https over http.
315+
* 0.8.10 -
316+
Attempted to bolster proxy handling.
317+
Limited success as there is an outstanding issue in equests (urllib3) not
318+
implementing CONNECT for https over http.
278319

279320
* 0.8.9 - initial attempt at providing proxy support
280321

@@ -284,21 +325,15 @@ Versions
284325

285326
TODO
286327
----
328+
* Python 3.3+ support
287329

288-
* Python 3.2 + support
289-
290-
* Create (better) documentation
291-
292-
* Expand the repertoire of example scripts
293-
294-
* Refactor the source code to make use decorators in pyral.restapi,
295-
dynamically construct the Rally schema hierarchy economically.
330+
* Dynamically construct the Rally schema hierarchy economically.
296331

297332

298333
License
299334
-------
300335

301-
BSD3-style license. Copyright (c) 2010-2012 Rally Software Development.
336+
BSD3-style license. Copyright (c) 2010-2014 Rally Software Development.
302337

303338
See the LICENSE file provided with the source distribution for full details.
304339

README.short

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ that may be references or collections via the familiar dot '.' notation.
1717
Requirements
1818
------------
1919

20-
The pyral package requires the use of Kenneth Reitz's requests package.
21-
The pyral package was developed and tested using requests-0.9.3.
20+
The pyral package requires the use of Kenneth Reitz's requests package using version 2.0.0 or better.
21+
As of requests version 2.0.0, there is support for HTTPS over HTTP proxy via the CONNECT request.
2222
The requests package can be found via the Python Package Index site (http://pypi/python.org/index).
2323

2424

@@ -28,7 +28,7 @@ Installation
2828
Once requests has been installed, run the setup.py program supplied with
2929
this distribution as::
3030

31-
python setup.py install.
31+
python setup.py install
3232

3333
Validation
3434
----------

build_dist.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/opt/local/bin/python2.6
1+
#!/usr/bin/env python
22

33
#############################################################################
44
#
@@ -11,7 +11,7 @@
1111
import zipfile
1212

1313
PACKAGE_NAME = "pyral"
14-
VERSION = "0.9.1"
14+
VERSION = "1.0.0"
1515

1616
AUX_FILES = ['MANIFEST.in',
1717
'LICENSE',
@@ -28,11 +28,13 @@
2828
'uptask.py',
2929
'statecounts.py',
3030
'repoitems.py',
31-
'typedefs.py',
31+
'get_schema.py',
32+
'typedef.py',
3233
'wkspcounts.py',
3334
'builddefs.py',
3435
'creattach.py',
3536
'get_attachments.py',
37+
'add_tcrs.py'
3638
]
3739
DOC_FILES = ['doc/Makefile',
3840
'doc/source/conf.py',
@@ -53,10 +55,12 @@
5355
#
5456
# The TEST_FILES are **NOT** placed into the distribution packages
5557
#
56-
TEST_FILES = ['test/test_conn.py',
58+
TEST_FILES = ['test/rally_targets.py',
59+
'test/test_conn.py',
5760
'test/test_context.py',
5861
'test/test_convenience.py',
5962
'test/test_inflation.py',
63+
'test/test_field_access.py',
6064
'test/test_query.py',
6165
'test/test_wksprj_setting.py',
6266
'test/test_attachments.py',

dists/pyral-1.0.0.tar.gz

159 KB
Binary file not shown.

dists/pyral-1.0.0.zip

189 KB
Binary file not shown.
-1.66 KB
Binary file not shown.

doc/build/doctrees/index.doctree

-1.05 KB
Binary file not shown.

0 commit comments

Comments
 (0)