Skip to content

Commit 3125df1

Browse files
committed
Updating version to 1.0.0.0
Adding release notes. removing comments about branch pyxnat requests.
1 parent 07f1801 commit 3125df1

File tree

5 files changed

+45
-40
lines changed

5 files changed

+45
-40
lines changed

CHANGES.rst

+24-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
Latest changes
22
===============
33

4+
Release 1.0.0.0
5+
6+
* New Features
7+
- Convenience methods on interface: get, put, post, delete, head
8+
- Verify option on interface for ssl-cert-verification
9+
10+
* Improvements
11+
- More useful error messages when things go wrong
12+
- streaming file upload
13+
- streaming file download
14+
- Use the requests library instead of httplib2 for REST calls
15+
16+
* Bug fixes:
17+
- Removed custom httplib2 caching.
18+
419
Release 0.9.5.2
5-
* New Features
620

7-
* Improvements
21+
* New Features
822

9-
* Bug fixes:
23+
* Improvements
24+
25+
* Bug fixes:
1026
- Ticket #50 404 error causes connection to be broken until end of object life.
1127
- Tiekct #52 fix zip file downloading.
1228

@@ -30,7 +46,7 @@ Release 0.9.4
3046

3147
* New Features
3248
- add proxy support to interface.
33-
49+
3450
* Impovements
3551

3652
* Bug fixes:
@@ -49,7 +65,7 @@ Release 0.9.0
4965
- interface.array.experiments()
5066
- interface.array.search_experiments()
5167
- interface.array.scans()
52-
68+
5369
- Support for XNAT configuration file format
5470
- Batch function for downloading all files related to a scan or an assessor
5571
- Create element with an XML document
@@ -60,7 +76,7 @@ Release 0.9.0
6076
- Catching authentication errors
6177
- Toggle option for cache warnings
6278
- Description for search templates is displayed
63-
79+
6480
* Bug fixes:
6581
- Config file
6682

@@ -117,7 +133,7 @@ Release 0.7.0
117133

118134
* Bug fix for HTTP sessions management.
119135

120-
* New `last_modified` method for project to get subjects last modified
136+
* New `last_modified` method for project to get subjects last modified
121137
date.
122138

123139
* Resource elements are now fully configurable at creation.
@@ -127,7 +143,7 @@ Release 0.7.0
127143
* Added push and pull zip files at the resource level.
128144

129145
* Added simple schema parsing capabilities.
130-
146+
131147
* Add a global management interface to gather different managers.
132148

133149
* Interface now follows redirections on the server url.

pyxnat/core/interfaces.py

+13-23
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class Interface(object):
6767
installed via pip:
6868
pip install SocksiPy-branch
6969
70-
.. note::
71-
Pyxnat-requests branch completely removes all of the caching
72-
functionality from pyxnat. The cache was causing more hassle than it was worth.
70+
.. note::
71+
All caching functionality has been removed from pyxnat as of 1.0.0.0.
72+
The cache was causing more hassle than it was worth.
7373
7474
"""
7575

@@ -92,15 +92,8 @@ def __init__(self, server=None, user=None, password=None,
9292
password: string | None
9393
The user's password.
9494
If None the user will be prompted for it.
95-
cachedir: string
96-
.. note::
97-
Pyxnat-requests branch completely removes all of the caching
98-
functionality from pyxnat.
99-
100-
Path of the cache directory (for all queries and
101-
downloaded files)
102-
If no path is provided, a platform dependent temp dir is
103-
used.
95+
cachedir: string (Depricated)
96+
10497
config: string
10598
Reads a config file in json to get the connection parameters.
10699
If a config file is specified, it will be used regardless of
@@ -115,7 +108,7 @@ def __init__(self, server=None, user=None, password=None,
115108
specify a username and password for proxy access, prepend them
116109
to the hostname:
117110
http://user:pass@hostname:port
118-
111+
119112
verify: True, False, or path to file containing certificate for your site
120113
Added to the requests Session, as documented here:
121114
http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification
@@ -127,8 +120,8 @@ def __init__(self, server=None, user=None, password=None,
127120
self._interactive = False
128121

129122
self._anonymous = anonymous
130-
131-
self._verify = verify
123+
124+
self._verify = verify
132125

133126
if self._anonymous:
134127

@@ -162,7 +155,7 @@ def __init__(self, server=None, user=None, password=None,
162155
self._server = connection_args['host']
163156
self._user = connection_args['u']
164157
self._pwd = connection_args['p']
165-
158+
166159

167160
if 'proxy' in connection_args:
168161
self.__set_proxy(connection_args['proxy'])
@@ -313,19 +306,19 @@ def _exec(self, uri, method='GET', body=None, headers=None, force_preemptive_aut
313306
headers: dict
314307
Additional headers for the HTTP request.
315308
force_preemptive_auth: boolean
316-
.. note:: Depricated with Pyxnat-requests
309+
.. note:: Depricated as of 1.0.0.0
317310
Indicates whether the request should include an Authorization header with basic auth credentials.
318311
**kwargs: dictionary
319312
Additional parameters to pass directly to the Requests HTTP call.
320313
321314
HTTP:GET
322315
----------
323-
When calling with GET as method, the body parameter can be a key:value dictionary containing
316+
When calling with GET as method, the body parameter can be a key:value dictionary containing
324317
request parameters or a string of parameters. They will be url encoded and appended to the url.
325318
326319
HTTP:POST
327320
----------
328-
When calling with POST as method, the body parameter can be a key:value dictionary containing
321+
When calling with POST as method, the body parameter can be a key:value dictionary containing
329322
request parameters they will be url encoded and appended to the url.
330323
331324
"""
@@ -477,7 +470,7 @@ def load_config(self, location):
477470
self._server = str(config['server'])
478471
self._user = str(config['user'])
479472
self._pwd = str(config['password'])
480-
473+
481474
if 'proxy' in config:
482475
self.__set_proxy(str(config['proxy']))
483476
else:
@@ -543,6 +536,3 @@ def head(self, uri, **kwargs):
543536
uri = join_uri(self._server, uri)
544537
response = self._http.head(uri, **kwargs)
545538
return response
546-
547-
548-

pyxnat/core/resources.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -572,15 +572,15 @@ def _call(self, columns):
572572

573573
request_shape = uri_shape(
574574
'%s/0' % uri.split(self._intf._get_entry_point(), 1)[1])
575-
575+
576576
gather = uri.split('/')[-1] in ['experiments', 'assessors',
577577
'scans', 'reconstructions']
578578

579579
tick = time.gmtime(time.time())[5] % \
580580
self._intf.inspect._tick == 0 and\
581581
self._intf.inspect._auto
582582

583-
583+
584584
columns += ['xsiType']
585585

586586
query_string = '?format=json&columns=%s' % ','.join(columns)
@@ -598,7 +598,7 @@ def _call(self, columns):
598598
print uri + query_string
599599
jtable = self._intf._get_json(uri + query_string)
600600

601-
601+
602602
_type = uri.split('/')[-1]
603603
self._learn_from_table(_type, jtable, None)
604604

@@ -623,7 +623,7 @@ def _learn_from_table(self, _type, jtable, reqcache):
623623
request_knowledge[shape] = xsitype
624624

625625
self._intf._struct.update(request_knowledge)
626-
626+
627627

628628
def __iter__(self):
629629
if self._ctype == 'cobjectcuri':
@@ -1807,7 +1807,7 @@ def get(self, dest=None, force_default=False):
18071807
Path should include the file name.
18081808
eg: /path/to/file.txt
18091809
force_default: boolean
1810-
- Depricated with pyxnat-requests
1810+
- Depricated as of 1.0.0.0
18111811
- Has no effect if the file is downloaded for the first time
18121812
- If the file was previously download with a custom path,
18131813
calling get() will remember the custom location unless:
@@ -1930,7 +1930,7 @@ def put(self, src, format='U', content='U', tags='U', overwrite=False, **datatyp
19301930
'overwrite': 'true' if overwrite else 'false',
19311931
'inbody':'true'
19321932
}
1933-
1933+
19341934
if '?' in self._absuri:
19351935
k, v = self._absuri.split('?')[1].split('=')
19361936
query_args[k] = v

pyxnat/version.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
VERSION='0.9.5.4'
2-
1+
VERSION='1.0.0.0'

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
httplib2==0.7.3
21
lxml==2.3.2
2+
requests=2.1.0

0 commit comments

Comments
 (0)