Skip to content

Commit

Permalink
Merge pull request #118 from klehman-rally/master
Browse files Browse the repository at this point in the history
auto multithreading for queries returning large result sets
  • Loading branch information
klehman-rally committed Apr 2, 2017
2 parents b3af7a0 + fb19bfb commit cf3b61f
Show file tree
Hide file tree
Showing 35 changed files with 420 additions and 136 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rallyfire.py
pyral/__init__.py
pyral/config.py
pyral/context.py
pyral/cargotruck.py
pyral/entity.py
pyral/hydrate.py
pyral/rallyresp.py
Expand Down
6 changes: 3 additions & 3 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Metadata-Version: 1.1
Name: pyral
Version: 1.2.4
Version: 1.3.0
Summary: Python toolkit for Rally REST API
Home-page: https://github.com/RallyTools/RallyRestToolkitForPython
Author: Kip Lehman (Rally Software Development)
License: BSD
Download-URL: https://github.com/RallyTools/RallyRestToolkitForPython/raw/master/dists/pyral-1.2.4.zip
Download-URL: https://github.com/RallyTools/RallyRestToolkitForPython/raw/master/dists/pyral-1.3.0.zip
Description: This is the README file for pyral, a package implementing a
Pythonic interface to the Agile Central (formerly Rally) REST API

Expand All @@ -28,7 +28,7 @@ Description: This is the README file for pyral, a package implementing a
The pyral package requires the use of Kenneth Reitz's requests package using version 2.8.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.4) has been tested with requests 2.8.1.
The most recent release of pyral (1.3.0) has been tested with requests 2.12.5.
The six module is also required.


Expand Down
21 changes: 14 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.4) has been tested using requests 2.8.1.
The most recent release of pyral (1.3.0) has been tested using requests 2.12.5.

Obtain and install the six_ module (available from PyPI at https://pypi.python.org/pypi/six)

Expand Down Expand Up @@ -67,7 +67,7 @@ relevant packages.
>> import requests
>> import pyral
>> pyral.__version__
(1, 2, 4)
(1, 3, 0)



Expand Down Expand Up @@ -262,17 +262,24 @@ The item names in config files **are** case sensitive.
Prerequisites
-------------

* Python 3.5 (this package not tested with earlier versions of Python 3.x) OR
* Python 2.6 or 2.7 (2.7 is preferred)
* Python 3.5 or 3.6 (this package not tested with earlier versions of Python 3.x) OR
* Python 2.6 or 2.7 (of these two, 2.7 is preferred)
* The requests_ package, 2.0.0 or better (2.0.0 finally includes support for https proxy),
requests 2.8.1 is recommended.
requests 2.12.5 is recommended.
* The six_ package.

.. _requests: http://github.com/kennethreitz/requests
.. _six: https://bitbucket.org/gutworth/six

Versions
--------
**1.3.0**
Introduced automatic multi-threading for Rally.get operation to speed up retrieval of large
result sets. Implemented step two of the Pinger deprecation plan, ping=False is the new default.
Increased default page size to 500. Maximum useful page size limit is 2000 but 1000 seems
to be the sweet spot for multithreading requests.
Fixed Rally.getAllUsers so that non subscription admin accounts can see the user list.
Updated recommendation for version of requests package.

**1.2.4**
Fixed handling of projectScopeUp and projectScopeDown keyword arguments for get operation.
Expand Down Expand Up @@ -339,8 +346,8 @@ Support

The use of this package is on an *as-is* basis and there is no official support offered by CA Technologies.
The author of this module periodically checks the GitHub repository issues for this package in the
interests of providing defect fixes and small feature enhancements as time permits, but is not obligated to
respond or take action.
interests of providing defect fixes and small feature enhancements as time permits, but is not obligated to
respond or take action.
Posts to Stack Overflow (http://stackoverflow.com/questions/ask?tags=rally) are another avenue to engage
others who have some exposure to ``pyral`` and might be able to offer useful information.

Expand Down
2 changes: 1 addition & 1 deletion README.short
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Requirements
The pyral package requires the use of Kenneth Reitz's requests package using version 2.8.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.4) has been tested with requests 2.8.1.
The most recent release of pyral (1.3.0) has been tested with requests 2.12.5.
The six module is also required.


Expand Down
11 changes: 6 additions & 5 deletions build_dist.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import re

PACKAGE_NAME = "pyral"
VERSION = "1.2.4"
VERSION = "1.3.0"

AUX_FILES = ['MANIFEST.in',
'PKG-INFO',
Expand Down Expand Up @@ -70,12 +70,13 @@
'test/test_convenience.py',
'test/test_inflation.py',
'test/test_field_access.py',
'test/test_query.py',
'test/test_search.py',
'test/test_workspaces.py'
'test/test_wksprj_setting.py',
'test/test_query.py',
'test/test_big_query.py',
'test/test_attachments.py',
'test/test_workspaces.py'
'test/test_ranking.py'
'test/test_search.py',
]

################################################################################
Expand Down Expand Up @@ -104,7 +105,7 @@ def main(args):

# got to use Python 2.7 to be able to run python setup.py bdist_wheel
os.system('/usr/local/bin/python setup.py bdist_wheel')
wheel_file = "pyral-%s-py2.py3-none-any.whl" % VERSION
wheel_file = "%s-%s-py2.py3-none-any.whl" % (PACKAGE_NAME, VERSION)
# the wheel_file gets written into the dist subdir by default, no need for a copy...

store_packages('dist', [tarball])
Expand Down
Binary file modified doc/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified doc/build/doctrees/index.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/interface.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/overview.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -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: 04e7a56dd13ad451ac5cbc4d00acee14
config: b07c03f625d2f2c1cd442854955e285b
tags: 645f666f9bcd5a90fca523b33c5a78b7
10 changes: 4 additions & 6 deletions doc/build/html/_sources/interface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Example use::
print " ".join(['|%|' % opt for opt in [server, user, password, apikey, workspace, project]]


% python basic.py --config=current --rallyProject="Livestock Mgmt" --ping=no
% python basic.py --config=current --rallyProject="Livestock Mgmt" --ping=yes

|rally1.rallydev.com| |wiley@acme.com| |*****| |*****| |General Products Umbrella| |Livestock Mgmt|

Expand Down Expand Up @@ -289,16 +289,14 @@ To instantiate a Rally object, you'll need to provide these arguments:
and the default project for the user is not in the workspace specified.
Under those conditions, the project is changed to the first project
(alphabetic ordering) in the list of projects for the specified workspace.
* server_ping (True or False, default in v1.2.0 is True)
* server_ping (True or False, default in v1.3.0 is False)
Specifies whether a ping attempt will be made to confirm network connectivity
to the Rally server prior to making a Rally WSAPI REST request.
Organizations may have disabled the ability to make ICMP requests so the ping
attempt may fail even though there is network connectivity to the Rally server.
For this reason, the use of the ping=True option is discouraged going forward.
The next minor point release of pyral (v1.3.0) will have the default value
for this option inverted to be False.
The the ping operation itself will be dropped in the next major release (2.0.0).
* isolated_workspace (True or False, default in v1.2.0 is False)
* isolated_workspace (True or False, default in v1.2.0 + is False)
Specifies that the Rally instance will only be used for interacting with
a single workspace (either the user's default workspace or the named workspace).
Using isolated_workspace=True provides performance benefits for a subscription
Expand Down Expand Up @@ -330,7 +328,7 @@ To instantiate a Rally object, you'll need to provide these arguments:
You only have to use this syntax to specify a particular Project if you have multiple instances of that Project that have the same name. There is no provision for supporting the scenario where a Project of the same name exists in the same structural location.


.. py:class:: Rally (server, user=None, password=None, apikey=None, workspace=None, project=None, warn=True, server_ping=True)
.. py:class:: Rally (server, user=None, password=None, apikey=None, workspace=None, project=None, warn=True, server_ping=False)

Examples::

Expand Down
8 changes: 4 additions & 4 deletions doc/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Index &mdash; pyral 1.2.4 documentation</title>
<title>Index &mdash; pyral 1.3.0 documentation</title>



Expand All @@ -34,7 +34,7 @@
<link rel="index" title="Index"
href="#"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="pyral 1.2.4 documentation" href="index.html"/>
<link rel="top" title="pyral 1.3.0 documentation" href="index.html"/>


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -63,7 +63,7 @@


<div class="version">
1.2.4
1.3.0
</div>


Expand Down Expand Up @@ -437,7 +437,7 @@ <h2 id="U">U</h2>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.2.4',
VERSION:'1.3.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions doc/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Python toolkit for the Rally REST API &mdash; pyral 1.2.4 documentation</title>
<title>Python toolkit for the Rally REST API &mdash; pyral 1.3.0 documentation</title>



Expand All @@ -33,7 +33,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="pyral 1.2.4 documentation" href="#"/>
<link rel="top" title="pyral 1.3.0 documentation" href="#"/>
<link rel="next" title="Python toolkit for the Rally REST API" href="overview.html"/>


Expand Down Expand Up @@ -63,7 +63,7 @@


<div class="version">
1.2.4
1.3.0
</div>


Expand Down Expand Up @@ -226,7 +226,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.2.4',
VERSION:'1.3.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
18 changes: 8 additions & 10 deletions doc/build/html/interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Primary pyral classes and functions &mdash; pyral 1.2.4 documentation</title>
<title>Primary pyral classes and functions &mdash; pyral 1.3.0 documentation</title>



Expand All @@ -33,7 +33,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="pyral 1.2.4 documentation" href="index.html"/>
<link rel="top" title="pyral 1.3.0 documentation" href="index.html"/>
<link rel="prev" title="Python toolkit for the Rally REST API" href="overview.html"/>


Expand Down Expand Up @@ -63,7 +63,7 @@


<div class="version">
1.2.4
1.3.0
</div>


Expand Down Expand Up @@ -296,7 +296,7 @@ <h1>rallyWorkset<a class="headerlink" href="#rallyworkset" title="Permalink to t
<span class="nb">print</span> <span class="s2">&quot; &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="s1">&#39;|%|&#39;</span> <span class="o">%</span> <span class="n">opt</span> <span class="k">for</span> <span class="n">opt</span> <span class="ow">in</span> <span class="p">[</span><span class="n">server</span><span class="p">,</span> <span class="n">user</span><span class="p">,</span> <span class="n">password</span><span class="p">,</span> <span class="n">apikey</span><span class="p">,</span> <span class="n">workspace</span><span class="p">,</span> <span class="n">project</span><span class="p">]]</span>


<span class="o">%</span> <span class="n">python</span> <span class="n">basic</span><span class="o">.</span><span class="n">py</span> <span class="o">--</span><span class="n">config</span><span class="o">=</span><span class="n">current</span> <span class="o">--</span><span class="n">rallyProject</span><span class="o">=</span><span class="s2">&quot;Livestock Mgmt&quot;</span> <span class="o">--</span><span class="n">ping</span><span class="o">=</span><span class="n">no</span>
<span class="o">%</span> <span class="n">python</span> <span class="n">basic</span><span class="o">.</span><span class="n">py</span> <span class="o">--</span><span class="n">config</span><span class="o">=</span><span class="n">current</span> <span class="o">--</span><span class="n">rallyProject</span><span class="o">=</span><span class="s2">&quot;Livestock Mgmt&quot;</span> <span class="o">--</span><span class="n">ping</span><span class="o">=</span><span class="n">yes</span>

<span class="o">|</span><span class="n">rally1</span><span class="o">.</span><span class="n">rallydev</span><span class="o">.</span><span class="n">com</span><span class="o">|</span> <span class="o">|</span><span class="n">wiley</span><span class="nd">@acme</span><span class="o">.</span><span class="n">com</span><span class="o">|</span> <span class="o">|*****|</span> <span class="o">|*****|</span> <span class="o">|</span><span class="n">General</span> <span class="n">Products</span> <span class="n">Umbrella</span><span class="o">|</span> <span class="o">|</span><span class="n">Livestock</span> <span class="n">Mgmt</span><span class="o">|</span>
</pre></div>
Expand Down Expand Up @@ -476,20 +476,18 @@ <h1>Rally<a class="headerlink" href="#rally" title="Permalink to this headline">
</dl>
</li>
<li><dl class="first docutils">
<dt>server_ping (True or False, default in v1.2.0 is True)</dt>
<dt>server_ping (True or False, default in v1.3.0 is False)</dt>
<dd><p class="first last">Specifies whether a ping attempt will be made to confirm network connectivity
to the Rally server prior to making a Rally WSAPI REST request.
Organizations may have disabled the ability to make ICMP requests so the ping
attempt may fail even though there is network connectivity to the Rally server.
For this reason, the use of the ping=True option is discouraged going forward.
The next minor point release of pyral (v1.3.0) will have the default value
for this option inverted to be False.
The the ping operation itself will be dropped in the next major release (2.0.0).</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>isolated_workspace (True or False, default in v1.2.0 is False)</dt>
<dt>isolated_workspace (True or False, default in v1.2.0 + is False)</dt>
<dd><p class="first last">Specifies that the Rally instance will only be used for interacting with
a single workspace (either the user&#8217;s default workspace or the named workspace).
Using isolated_workspace=True provides performance benefits for a subscription
Expand Down Expand Up @@ -528,7 +526,7 @@ <h1>Rally<a class="headerlink" href="#rally" title="Permalink to this headline">
</div>
<dl class="class">
<dt id="Rally">
<em class="property">class </em><code class="descname">Rally</code><span class="sig-paren">(</span><em>server</em>, <em>user=None</em>, <em>password=None</em>, <em>apikey=None</em>, <em>workspace=None</em>, <em>project=None</em>, <em>warn=True</em>, <em>server_ping=True</em><span class="sig-paren">)</span><a class="headerlink" href="#Rally" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="descname">Rally</code><span class="sig-paren">(</span><em>server</em>, <em>user=None</em>, <em>password=None</em>, <em>apikey=None</em>, <em>workspace=None</em>, <em>project=None</em>, <em>warn=True</em>, <em>server_ping=False</em><span class="sig-paren">)</span><a class="headerlink" href="#Rally" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<p>Examples:</p>
Expand Down Expand Up @@ -1133,7 +1131,7 @@ <h1>Item Attributes<a class="headerlink" href="#item-attributes" title="Permalin
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.2.4',
VERSION:'1.3.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
Binary file modified doc/build/html/objects.inv
Binary file not shown.
8 changes: 4 additions & 4 deletions doc/build/html/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Python toolkit for the Rally REST API &mdash; pyral 1.2.4 documentation</title>
<title>Python toolkit for the Rally REST API &mdash; pyral 1.3.0 documentation</title>



Expand All @@ -33,7 +33,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="pyral 1.2.4 documentation" href="index.html"/>
<link rel="top" title="pyral 1.3.0 documentation" href="index.html"/>
<link rel="next" title="Primary pyral classes and functions" href="interface.html"/>
<link rel="prev" title="Python toolkit for the Rally REST API" href="index.html"/>

Expand Down Expand Up @@ -64,7 +64,7 @@


<div class="version">
1.2.4
1.3.0
</div>


Expand Down Expand Up @@ -326,7 +326,7 @@ <h1>Introduction of Dyna-Types<a class="headerlink" href="#introduction-of-dyna-
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.2.4',
VERSION:'1.3.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
8 changes: 4 additions & 4 deletions doc/build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Search &mdash; pyral 1.2.4 documentation</title>
<title>Search &mdash; pyral 1.3.0 documentation</title>



Expand All @@ -33,7 +33,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="#"/>
<link rel="top" title="pyral 1.2.4 documentation" href="index.html"/>
<link rel="top" title="pyral 1.3.0 documentation" href="index.html"/>


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -62,7 +62,7 @@


<div class="version">
1.2.4
1.3.0
</div>


Expand Down Expand Up @@ -188,7 +188,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.2.4',
VERSION:'1.3.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
Loading

0 comments on commit cf3b61f

Please sign in to comment.