-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
605 lines (419 loc) · 16.5 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
Changelog
=========
All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_
and this project adheres to `Semantic Versioning <http://semver.org/>`_
0.5.1 - 2023-03-30
------------------
Added
~~~~~
- Testing infrastructure for functional tests based on xnat4tests
- Added the `insert_date` and `is_history` properties to XNAT objects (Project, Subject, Experiment, Scan) to
allow access to these metadata fields
- Option to retrieve users per project
Fixed
~~~~~
- Fixed bugs in upload where files would be opened in string instead of bytes mode, leading to encoding errors
- Fixed bugs in upload where return values were omitted in some nested function, leading to breaking responses
- Fixed bug in object creation when secondary id was not supplied, see issue #37
0.5.0 - 2023-02-27
------------------
Changed
~~~~~~~
- Dropped Python 2 support, code can now use more modern features and is easier to maintain
Added
~~~~~
- Support for XNAT search engine usings XNATpy
- Exposes more server information (xnat_uptime, xnat_build_info, plugins list)
Improved
~~~~~~~~
- Reworked upload functions to have more clear behaviour
Fixed
~~~~~
- Creating experiments with an existing label now does not acccidentally move the
experiment to a different subject (added safety checks)
- Files had the ID/path swapped, making it possible to have non-unique IDs
- ProjectData creation now uses the id parameter correctly
0.4.3 - 2022-10-31
------------------
Added
~~~~~
- Added initial support for XNAT/jupyterhub
Improved
~~~~~~~~
- Fixed some of the plumbing for searching
0.4.2 - 2022-04-07
------------------
Fixed
~~~~~
- Problem with the namespace prefix parsing with XNAT 1.8.4 cause the parser to fail
0.4.1 - 2022-02-22
------------------
Added
~~~~~
- New `connection.upload_file()` method that makes sure the argument is point to a valid file, avoiding
accidentally attempting to upload a string.
Changed
~~~~~~~
- The `services.import_` method now has two mutually exclusive arguments for supplying data: `path` and
`data`. For a given `path` a check is done to see if it actually points to a valid file on the filesystem
for data it is just passed on to `upload`.
Fixed
~~~~~
- Some fuctions depending on `services.import_` were broken because a check was added to see
if the data pointed to a file, not allowing in-memory data to be uploaded, breaking `import_dir`
methods.
0.4.0 - 2022-01-27
------------------
Fixed
~~~~~
- Nested SimpleListing failed to recognise correct parent, breaking `scan.parameters.add_param`
- Fixes in xpath and xsi_type resolving
Added
~~~~~
- xnatpy command-line interface, now xnatpy comes with a number of CLI options
to use directly from the shell
- A `scan.fields` shortcut to `scan.parameters.add_param` for convenience
- Objects with custom variables now have the `obj.custom_variables` property which gives access to the custom
variable defined in the interface, including some type casting and value checking when updating them.
0.3.28 - 2021-10-28
-------------------
Fixed
~~~~~
- Additional parameters were not set properly during object creation
- It was impossible to login using tokens because the auth provides could not be found, added workaround
Changed
~~~~~~~
- Updated upload_dir and import_dir to default use a SpooledTemporaryFile and improved the zip and tar functionality
0.3.27 - 2021-09-29
-------------------
Added
~~~~~
- Options to create a session with re-using a JSESSION ID instead of logging in and a BaseXNATSession that does
not destroy the session on disconnect
- Catalog refresh method for resources
Changed
~~~~~~~
- Allow import functions to take project, subject and experiment as xnatpy objects as well as strings
Fixed
~~~~~
- Failure to connect with redirection when url has a trailing ``/``
- Added an special auth for requests to avoid it automatically reading the netrc and using
basic auth, ruining the efficiency from cookie based sessions.
- Deleting an object should also remove it from the connection and listing caches
0.3.26 - 2021-04-16
-------------------
Improved
~~~~~~~~
- Switched to cookie based login instead of basic auth with every requests (should be more performant)
- Close underlying requests session when closing a connection
- Added CI/CD infrastructure for testing and releasing
- Improved import_dicom_inbox
Fixed
~~~~~
- InvestigatorData had nonsensical string conversion
- Option to flatten directories when downloading an entire resource
- Bug with resource labels doing unwanted quotation on creation
- Added timeouts and caught them on initial requests (before the xnat session was established)
0.3.25 - 2020-09-24
-------------------
Added
~~~~~
- Added ``import_dicom_inbox`` function to import dicoms from server filesystem
via a path
- Support of querying information for FileData via the containing resource file
listing, giving access to file_content, file_format, digest, etc
Fixed
~~~~~
- Fixed issue when creating objects with a space in the label, the object would
be created but the uri with the label (and spaces) would not work, making the
return object useless. Now it updates the URI to use the generated ID if
possible avoiding the issue.
0.3.24 - 2020-06-19
-------------------
Fixed
~~~~~
- Stupid import bug in previous release
0.3.23 - 2020-06-19
-------------------
Improved
~~~~~~~~
- Connections now check if they are still valid and will raise an appropriate
error if they are closed. This avoid strange errors when trying to use a
connection after ``.disconnect`` has been called.
- Avoid warning about collections.abc use on Python 3.7+
0.3.22 - 2020-02-26
-------------------
Added
~~~~~
- The ``services.import_dir`` function to import a local directory into XNAT.
The function will automatically zip the contents in a temporary file (or
memory if desired) before upload.
Changed
~~~~~~~
- Updated documentation and setup to refer to new gitlab repository instead
of bitbucket, finalizing the move
- Add a default timeout of 300 seconds (5 minutes) to all requests to avoid
stale connections blocking the entire code (without error, just infinite
hangs). Can be changed when connecting or in the XNATSession object
afterwards. Note that the 300 seconds is not the total duration of the
request allowed, but means that after there is nothing received 300 seconds
the connection is considered timed-out, a download that takes 10 minutes
would still be possible.
Improved
~~~~~~~~
- The ``import_`` function is more resilient. On windows programs like 7zip could
mess with the mimetypes and cause zip files get a different estimated
content_type. If a non-recognized content type is found, xnatpy will try to
re-estimate it based just on the extension.
- Added supper to change the ``import-handler`` in the ``import_`` function
0.3.21 - 2019-10-09
-------------------
Improved
~~~~~~~~
- Removed annoying warning message when resource was accessed
0.3.20 - 2019-10-09
-------------------
Fixed
~~~~~
- now possible to create/retrieve data for resources properly. XNAT would
only return the catalog when queried and not the object information. Created
a work around that catches the case in get_json and retrieves the json data
from the listing instead and presents it in a format consistent with the
REST API so other code still functions.
0.3.19 - 2019-09-20
-------------------
Added
~~~~~
- xnatpy changes the user-agent header to give detailed information about
the xnatpy client running.
- option to have some progress logging/printing added to the download_dir
methods for projects and subjects
- add method to find specific sessions in the prearchive
Improved
~~~~~~~~
- Avoid use of get_source when generating xnatpy module code, which should help
when compiling xnatpy to a binary (py2exe etc)
0.3.18 - 2019-06-06
-------------------
Improved
~~~~~~~~
- Added ``force`` flag to ``ScanData.read_dicom``
- Added ``open`` to ``PrearchiveFile`` (same as for FileData)
- Added ``read_dicom`` to ``PrearchiveScan`` (same as for ScanData)
- Documentation improved, added code reference and changelog into docs
Fixed
~~~~~
- Flag extension_types=False now also working for 1.7 servers
0.3.17 - 2019-04-04
-------------------
Added
~~~~~
- Can open FileData object with ``file.open()`` to get a file-like object
that can be used similar to a local file.
- Added ``read_dicom()`` to ScanData to read the dicom header/file with pydicom
- ``external_uri`` method to get a full external uri of an XNAT object
0.3.16 - 2019-03-28
-------------------
Fixed
~~~~~
- Support for changing subject and experiment labels
- Support creation of ScanData types with the id and type set on creation
- Fix a bug in scanning extension types where there are new-lines in the xs:schema tag
0.3.14 - 2019-02-22
-------------------
Added
~~~~~
- Check which user is logged in and expose that in ``connection.logged_in_user``
- Check the cookies to set the appropriate heartbeat interval for the server.
- Allow getting the session expiration information with ``connection.session_expiration_time``
Changed
~~~~~~~
- Refactored some code in the model building, which is optional if you only want
to use xnatpy for a convenience layer about requests. Giving ``no_build_model=True``
to the connect function will disable the scraping of the server xml structure and
not create all classes, but will log in and keep alive a connection. Only the simple
connection ``get``, ``head``, ``put``, ``post``, ``delete``, ``download``, ``upload``
methods are really safe to use in that case.
- XNAT objects (including subject and experiments) will use the listing to get their
label and xsitype to avoid the need to get each experiment when creating a listing.
This makes listings way more efficient.
Fixed
~~~~~
- Bug with auth when xnat was not running in the server root, but rather in a subdirectory
0.3.13 - 2019-01-07
-------------------
Fixed
~~~~~
- Import problem in Python 2 which broke xnatpy
0.3.12 - 2019-01-03
-------------------
Added
~~~~~
- Adds fields argument to the dicom_dump method to filter on dicom tags server side.
- Adds dicom_dump method to prearchive scan.
- Allow deleting variables by useing del object.variable, this works in most
cases but seem to fail server-side on restriction such as gender (it does
not match any valid options)
Changed
~~~~~~~
- Beter computation for the uri's of resources
Fixed
~~~~~
- Fixed xml deprecation warning due to the use of .getchildren()
0.3.11 - 2018-11-12
-------------------
Fixed
~~~~~
- Functions with an async parameter had them renamed to asynchronous as async
is a keyword as of Python 3.7
- Fix a bug in the XSD parsing when an XSD contains a schema-level simpleType
- Bug in upload_dir with python3 when using a method based on a temporary file
Added
~~~~~
- Resource upload methods can now forward kwargs to the ``connection.upload``
method.
- Resource constructor also optionally takes a ``data_dir`` and ``upload_method``
arguments for uploading data immediately after creation.
0.3.10 - 2018-08-31
-------------------
Added
~~~~~
- The experiment.create_resource and scan.create_resource now take two extra
arguments: data_dir and method, which allow the uploading of the content of
a directory as the content of the newly created resource. The method is the
method for resource.upload_dir method
- Command line callable scripts that copies an entire project to another xnat.
See ``xnat_cp_project --help``
Changed
~~~~~~~
- Removed wrong default argument for create_assessor (invalid assessor type)
- The lower level get/put/post/delete methods now can process full uris as well
as paths as long as the uri start matches the server uri (e.g. instead of
using /data/projects you can also give https://serveruri.com/data/projects.
Fixed
~~~~~
- Fixed a small bug where an incorrect error message was giving when not giving
a value for the secondary label during object creation.
0.3.9 - 2018-07-02
------------------
Fixed
~~~~~
- xnatpy had issues with shared subjects and sessions as the REST API would
return the original object (with sharing information in it). Now xnatpy
check the requested uri and makes sure the information of the correct project
is used. Now shared objects can be used properly in xnatpy.
Added
~~~~~
- resource.upload now takes an ``extract`` parameter indicating data should be
extracted into files after upload
- resource.upload_dir to upload an entire directory to a resource, the directory
will be added into the resources so that e.g. directory/a.txt becomes resource/a.txt
- redirection detections, if the server has moved and is being redirected (e.g. using
a 302 or 301 response), xnatpy will detect that and use the new url instead.
0.3.8 - 2018-06-04
------------------
Added
~~~~~
- Methods to retrieve the DICOM header dump using the dcmdump service. This
can be used via services.dicom_dump(uri) or experiment.dicom_dump to get the
dump of the specific experiment
Fixed
~~~~~
- Strict username checking after login disabled to avoid problems with OIDC
- Fix a bug where token result would contain extra data
0.3.7 - 2018-03-12
------------------
Fixed
~~~~~
- Fixed a bug where the prompt for the password on Windows would not work
Changed
~~~~~~~
- Hide certificate warnings if verify=False, just give a one time warning that
things might not be safe, but no spam at every single request
0.3.6 - 2018-03-09
------------------
Added
~~~~~
- Support for issuing tokens in the service module
Fixed
~~~~~
- Allow user to login using a token (the username check will catch this an allow it)
Changed
~~~~~~~
- Improved the logging by reducing spam at the INFO/DEBUG levels. The debug parameter
on connect can now be used to enable the logging of xnatpy internals.
- Give a specific error if the XNAt password is outdated and requires an update.
0.3.5 - 2018-01-02
------------------
Fixed
~~~~~
- There were bugs in the prearchive breaking the entire pre-archive funcationaly
0.3.4 - 2017-11-13
------------------
Fixed
~~~~~
- Files in assessors would have a path prefixed with a / in some cases (which should never happen)
0.3.3 - 2017-10-18
------------------
Changed
~~~~~~~
- Abstracted the progress bar for downloading to allow other progress hooks (e.g. GUI)
Fixed
~~~~~
- Set proper minimal versions for requirements (e.g. six can be too old)
- Bug in upload for Python3
- Bug with getting the file size when there are redirects (issue #8)
- Bug with getting files from a project/subject/experiment/scan directly instead of via resource (issue #5)
0.3.2 - 2017-10-15
------------------
Fixed
~~~~~
- Bug in the the create_object function in the selection of the non-history object
- Bug in the setting of project properties (due to the lack of a parent)
0.3.1 - 2017-09-04
------------------
Changed
~~~~~~~
- FileData now has an id and path, the id is the filename and the path is the
path relative from the resource. This makes working with subdirectories in
resources possible.
Fixed
~~~~~
- Bug where history of XNAT was misinterpreted and an old version of an object could be loaded
- Resources could loose track of their ID when the cache was cleared
- Resources did not invalidate cache after uploading files
0.3.0 - 2017-08-17
------------------
Added
~~~~~
- Better support for complex data structures, especially data types that
include lists in their data.
- Support for extension types, xnatpy automatically searches for all extension
xsd files and will create Python classes for those as well.
- Listings can be indexed with integers to get their n-th element, the order
is the order given by XNAT.
- Allow overwriting of files on upload
- Support for listing users via /data/users REST endpoint in the session.users
Changed
~~~~~~~
- xsd schema parsing is completely rewritten, allows more support for complex
data structures
Fixed
~~~~~
- Support for XNAT 1.7.3
- Fixed a bug where opening a second session would ruin the first one, it
should now be possible to have multiple sessions open concurently.
0.2.3 - 2017-04-03
------------------
Added
~~~~~
- xnatpy now uses the progressbar2 package to deliver fancy progress bars when downloading
- Attributes in the session that allow users to skip/alter the checking of responses
Changed
~~~~~~~
- Logging now using a logger. You can change the log levels or supply your own logger which xnatpy will use in favour of its own
- xnatpy now gets the version information from 1.7 xnat correctly
Fixed
~~~~~
- A bug in XNAT 1.7 caused the prearchive routes to be wrong, added a work around that fixes the prearchive with xnatpy