Skip to content

Commit 94a19f8

Browse files
committed
upped version to 0.9.1
1 parent 29b5b7e commit 94a19f8

File tree

10 files changed

+170
-68
lines changed

10 files changed

+170
-68
lines changed
431 Bytes
Binary file not shown.

doc/build/html/_sources/interface.txt

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ or you may elect to not specify the '.cfg' suffix.
124124
Rally
125125
=====
126126

127-
The Rally class is the central focus of the **pyral** package. Instantation of this class
127+
The Rally class is the central focus of the **pyral** package. Instantiation of this class
128128
with appropriate and valid target/credential information then provides a means of
129129
interacting with the Rally server.
130130

@@ -144,7 +144,7 @@ Rally
144144
Controls whether a warning is issued if no project is specified
145145
and the default project for the user is not in the workspace specified.
146146
Under those conditions, the project is changed to the first project
147-
(alphabetic ordering) in the list of projects for specified workspace.
147+
(alphabetic ordering) in the list of projects for the specified workspace.
148148

149149
.. py:class:: Rally (server, user, password, version=1.29, workspace=None, project=None, warn=True)
150150

@@ -189,8 +189,8 @@ Core REST methods and CRUD aliases
189189

190190
keyword arguments:
191191
- fetch = True/False or "List,Of,Attributes,We,Are,Interested,In"
192-
- query = 'FieldName = "some value"' or ['fld1 = 10', 'fld2 != "Shamu"', etc.]
193-
- instance = True/False (defalts to False)
192+
- query = 'FieldName = "some value"' or ['EstimatedHours = 10', 'MiddleName != "Shamu"', etc.]
193+
- instance = True/False (defaults to False)
194194
- pagesize = n (defaults to 200)
195195
- start = n (defaults to 1)
196196
- limit = n (defaults to no limit)
@@ -202,7 +202,7 @@ Core REST methods and CRUD aliases
202202
Returns a RallyRESTResponse object that has errors and warnings attributes that
203203
should be checked before any further operations on the object are attempted.
204204
The Response object supports the iteration protocol so that the results of the
205-
get can be iterated over via either ``for rec in response:`` or ``response.next()``.
205+
``get`` can be iterated over via either ``for rec in response:`` or ``response.next()``.
206206

207207
If the instance keyword value is True, then an instance of a Rally entity
208208
will be returned instead of a RallyRESTResponse. This can be useful when
@@ -234,13 +234,16 @@ Core REST methods and CRUD aliases
234234
.. method:: post (entityName, itemData, workspace=None, project=None)
235235

236236
This method allows for updating a single Rally entity record with the data
237-
contained in the itemData dict. The itemData dict may *not* attempt to change
238-
the ObjectID value of the entity as the value for the ObjectID is used to identify
237+
contained in the itemData dict. The itemData dict *must* include a
238+
key-value pair for either the ObjectID or when applicable, the FormattedID,
239+
that will uniquely identify the entity to be updated.
240+
The itemData dict may *not* attempt to change the ObjectID value of the
241+
entity as the value for the ObjectID is used to identify
239242
the Rally entity to update. An attempt to update an entity record for
240-
which the operational credentials do not include the privileges to update will
241-
result in a RallyRESTException being generated.
243+
which the operational credentials do not include the privileges to update
244+
will result in a RallyRESTException being generated.
242245

243-
Returns a representation of the item as an instance of a class named for the entity.
246+
Returns a representation of the updated item as an instance of a class named for the entity.
244247

245248
.. method:: update
246249

@@ -308,15 +311,17 @@ pyral.Rally instance convenience methods
308311
in the currently active context.
309312

310313

311-
.. method:: getProjects(workspace='default')
314+
.. method:: getProjects(workspace=None)
312315

313316
Return a list of Project instances that are available for the workspace context
314-
identified by the workspace keyword argument.
317+
identified by the workspace keyword argument. If no workspace keyword argument
318+
is supplied (or is supplied as None), then the workspace context is that
319+
of the currently selected workspace.
315320

316321

317322
.. method:: getUserInfo(oid=None, username=None, name=None)
318323

319-
A convenience method to collect specific user related information.
324+
A convenience method to collect the information associated with a specific user.
320325

321326
Caller must provide at least one keyword arg and non-None / non-empty value
322327
to identify the user target on which to obtain information.
@@ -329,10 +334,11 @@ pyral.Rally instance convenience methods
329334
Returns either a single instance of a User entity when the oid keyword argument
330335
matches a User in the system, or a list of User entity items when the username
331336
or name keywords are given and are matched by at least one User in the system.
332-
Returns None if no match for keyword argument is found in the system.
337+
Returns None if there is no match in the Rally subscription/workspace for
338+
the keyword argument used to identify the user target.
333339

334340

335-
.. method:: getAllUsers()
341+
.. method:: getAllUsers(workspace=None)
336342

337343
This method offers a convenient one-stop means of obtaining usable information
338344
about all users in the named workspace.
@@ -347,11 +353,45 @@ pyral.Rally instance convenience methods
347353
Given an entityName and and attributeName (assumed to be valid for the entityName)
348354
issue a request to obtain a list of allowed values for the attribute.
349355

356+
.. method:: addAttachment(artifact, filename, mime_type='text/plain')
357+
358+
Given an artifact (actual or FormattedID for an artifact), validate that
359+
it exists and then attempt to add an Attachment with the name and
360+
contents of filename into Rally and associate that Attachment with the
361+
Artifact.
362+
363+
.. method:: addAttachments(artifact, attachments)
364+
365+
Given an artifact (either actual or FormattedID) and a list of dicts with
366+
each dict having keys and values for name (or Name), mime_type (or MimeType) and
367+
content_type (or ContentType), add an Attachment corresponding to each dict in
368+
the attachments list and associate it with the referenced Artifact.
369+
370+
.. method:: getAttachment(artifact, filename)
371+
372+
Given a real artifact instance or the FormattedID of an existing artifact,
373+
obtain the attachment named by filename. If there is such an attachment,
374+
return an Attachment instance with hydration for Name, Size, ContentType, Content,
375+
CreationDate and the User that supplied the attachment.
376+
If no such attachment is present, return None
377+
378+
.. method:: getAttachmentNames(artifact)
379+
380+
Given a real artifact instance that is hydrated for at least the Attachments attribute,
381+
return the names (filenames) of the Attachments associated with the artifact.
382+
383+
.. method:: getAttachments(artifact)
384+
385+
Given a real artifact instance, return a list of Attachment records.
386+
Each Attachment record will look like a Rally WSAPI Attachment with
387+
the additional Content attribute that will contain the decoded AttachmentContent.
388+
389+
350390

351391
RallyRESTResponse
352392
=================
353393

354-
A RallyRESTResponse instance is returned from a call to get (find) and several of the
394+
A RallyRESTResponse instance is returned from a call to ``get`` (find) and several of the
355395
convenience methods. A instance has the following useful state attributes:
356396

357397
- resource = partial URL identifying the resource for the HTTP Request

doc/build/html/_sources/overview.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Rally supports a REST API that enables you to retrieve representations of
77
entities in Rally, create entities in Rally, update existing entities in Rally and
88
with proper permissions, delete entities in Rally.
99

10-
Once you have the *pyral* package installed, all you need is a valid subscription
10+
Once you have the **pyral** package installed, all you need is a valid subscription
1111
to Rally, working credentials and the name of
1212
the workspace and project you want to interact with and you're on your way!
1313

@@ -59,9 +59,9 @@ Rally Entities and Artifacts
5959

6060
In the Rally vernacular, a logical entity is called a *type*. Some examples of Rally
6161
*types* are UserStory, Defect, Release, UserProfile. There is a subset of
62-
*types* that are usually what a user of pyral will be interested in called *artifacts*.
62+
*types* that are usually what a user of **pyral** will be interested in called *artifacts*.
6363
An *artifact* is either a UserStory, Defect, Task, DefectSuite, TestSet or TestCaseResult.
64-
The Python toolkit for the Rally REST API (pyral) is primarily oriented towards operations with artifacts.
64+
The Python toolkit for the Rally REST API (**pyral**) is primarily oriented towards operations with artifacts.
6565
But, it is not limited to those as it is very possible view/operate on other Rally
6666
entities such as Workspace, Project, UserProfile, Release, Iteration, TestFolder, Tag and
6767
others.
@@ -79,7 +79,7 @@ Rally Introspection
7979
===================
8080

8181
The Python toolkit for the Rally REST API makes it easy to obtain the names of Rally types (entities)
82-
and the attributes associated with each type. You can also use pyral capabilities
82+
and the attributes associated with each type. You can also use **pyral** capabilities
8383
to obtain the list of allowed values for Rally type attributes that have a pre-allocated
8484
list of values.
8585

doc/build/html/genindex.html

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<head>
88
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
99

10-
<title>Index &mdash; pyral v0.8.11 documentation</title>
10+
<title>Index &mdash; pyral v0.9.1 documentation</title>
1111
<link rel="stylesheet" href="_static/default.css" type="text/css" />
1212
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
1313
<script type="text/javascript">
1414
var DOCUMENTATION_OPTIONS = {
1515
URL_ROOT: '',
16-
VERSION: '0.8.11',
16+
VERSION: '0.9.1',
1717
COLLAPSE_INDEX: false,
1818
FILE_SUFFIX: '.html',
1919
HAS_SOURCE: true
@@ -22,7 +22,7 @@
2222
<script type="text/javascript" src="_static/jquery.js"></script>
2323
<script type="text/javascript" src="_static/underscore.js"></script>
2424
<script type="text/javascript" src="_static/doctools.js"></script>
25-
<link rel="top" title="pyral v0.8.11 documentation" href="index.html" />
25+
<link rel="top" title="pyral v0.9.1 documentation" href="index.html" />
2626
</head>
2727
<body>
2828
<div class="related">
@@ -31,7 +31,7 @@ <h3>Navigation</h3>
3131
<li class="right" style="margin-right: 10px">
3232
<a href="#" title="General Index"
3333
accesskey="I">index</a></li>
34-
<li><a href="index.html">pyral v0.8.11 documentation</a> &raquo;</li>
34+
<li><a href="index.html">pyral v0.9.1 documentation</a> &raquo;</li>
3535
</ul>
3636
</div>
3737

@@ -44,8 +44,18 @@ <h3>Navigation</h3>
4444
<h1 id="index">Index</h1>
4545

4646
<div class="genindex-jumpbox">
47-
<a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#U"><strong>U</strong></a>
47+
<a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#U"><strong>U</strong></a>
4848
</div>
49+
<h2 id="A">A</h2>
50+
<table style="width: 100%" class="indextable genindextable"><tr>
51+
<td style="width: 33%" valign="top"><dl>
52+
<dt><a href="interface.html#addAttachment">addAttachment()</a></dt>
53+
</dl></td>
54+
<td style="width: 33%" valign="top"><dl>
55+
<dt><a href="interface.html#addAttachments">addAttachments()</a></dt>
56+
</dl></td>
57+
</tr></table>
58+
4959
<h2 id="C">C</h2>
5060
<table style="width: 100%" class="indextable genindextable"><tr>
5161
<td style="width: 33%" valign="top"><dl>
@@ -83,9 +93,12 @@ <h2 id="G">G</h2>
8393
<dt><a href="interface.html#get">get()</a></dt>
8494
<dt><a href="interface.html#getAllowedValues">getAllowedValues()</a></dt>
8595
<dt><a href="interface.html#getAllUsers">getAllUsers()</a></dt>
86-
<dt><a href="interface.html#getProject">getProject()</a></dt>
96+
<dt><a href="interface.html#getAttachment">getAttachment()</a></dt>
97+
<dt><a href="interface.html#getAttachmentNames">getAttachmentNames()</a></dt>
98+
<dt><a href="interface.html#getAttachments">getAttachments()</a></dt>
8799
</dl></td>
88100
<td style="width: 33%" valign="top"><dl>
101+
<dt><a href="interface.html#getProject">getProject()</a></dt>
89102
<dt><a href="interface.html#getProjects">getProjects()</a></dt>
90103
<dt><a href="interface.html#getUserInfo">getUserInfo()</a></dt>
91104
<dt><a href="interface.html#getWorkspace">getWorkspace()</a></dt>
@@ -171,7 +184,7 @@ <h3>Navigation</h3>
171184
<li class="right" style="margin-right: 10px">
172185
<a href="#" title="General Index"
173186
>index</a></li>
174-
<li><a href="index.html">pyral v0.8.11 documentation</a> &raquo;</li>
187+
<li><a href="index.html">pyral v0.9.1 documentation</a> &raquo;</li>
175188
</ul>
176189
</div>
177190
<div class="footer">

doc/build/html/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<head>
88
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
99

10-
<title>pyral documentation! &mdash; pyral v0.8.11 documentation</title>
10+
<title>pyral documentation! &mdash; pyral v0.9.1 documentation</title>
1111
<link rel="stylesheet" href="_static/default.css" type="text/css" />
1212
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
1313
<script type="text/javascript">
1414
var DOCUMENTATION_OPTIONS = {
1515
URL_ROOT: '',
16-
VERSION: '0.8.11',
16+
VERSION: '0.9.1',
1717
COLLAPSE_INDEX: false,
1818
FILE_SUFFIX: '.html',
1919
HAS_SOURCE: true
@@ -22,7 +22,7 @@
2222
<script type="text/javascript" src="_static/jquery.js"></script>
2323
<script type="text/javascript" src="_static/underscore.js"></script>
2424
<script type="text/javascript" src="_static/doctools.js"></script>
25-
<link rel="top" title="pyral v0.8.11 documentation" href="#" />
25+
<link rel="top" title="pyral v0.9.1 documentation" href="#" />
2626
<link rel="next" title="Python toolkit for the Rally REST API" href="overview.html" />
2727
</head>
2828
<body>
@@ -35,7 +35,7 @@ <h3>Navigation</h3>
3535
<li class="right" >
3636
<a href="overview.html" title="Python toolkit for the Rally REST API"
3737
accesskey="N">next</a> |</li>
38-
<li><a href="#">pyral v0.8.11 documentation</a> &raquo;</li>
38+
<li><a href="#">pyral v0.9.1 documentation</a> &raquo;</li>
3939
</ul>
4040
</div>
4141

@@ -131,7 +131,7 @@ <h3>Navigation</h3>
131131
<li class="right" >
132132
<a href="overview.html" title="Python toolkit for the Rally REST API"
133133
>next</a> |</li>
134-
<li><a href="#">pyral v0.8.11 documentation</a> &raquo;</li>
134+
<li><a href="#">pyral v0.9.1 documentation</a> &raquo;</li>
135135
</ul>
136136
</div>
137137
<div class="footer">

0 commit comments

Comments
 (0)