Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning
0.3.18 - 2019-06-06¶
Improved¶
- Added
force
flag toScanData.read_dicom
- Added
open
toPrearchiveFile
(same as for FileData) - Added
read_dicom
toPrearchiveScan
(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 connectionget
,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.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
andupload_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