Skip to main content

XNAT in Python

Project description

https://github.com/pyxnat/pyxnat/actions/workflows/ci.yml/badge.svg https://coveralls.io/repos/github/pyxnat/pyxnat/badge.svg?branch=master https://img.shields.io/pypi/dm/pyxnat.svg https://img.shields.io/pypi/pyversions/pyxnat.svg https://img.shields.io/pypi/v/pyxnat.svg https://gitlab.com/xgrg/tweetit/-/raw/master/resources/008-pyxnat-v1.4.gif?inline=false

Where to get it

The source code is currently hosted on GitHub at: https://github.com/pyxnat/pyxnat

Binary installers for the latest released version are available at the Python package index. pyxnat can be installed using pip with the following command:

pip install pyxnat

Dependencies

  • requests v2.20 or higher

  • python-lxml v4.3.2 or higher recommended, earlier versions may work.

For development purposes:

  • python-nose v1.2.1 or higher

  • coverage v3.6 or higher

See the full installation instructions for recommended and optional dependencies.

Installation from sources

To install pyxnat from source, from the pyxnat directory (same one where you found this file after cloning the git repo), execute:

python setup.py install

Documentation

The official documentation is hosted at: https://pyxnat.github.io/pyxnat

Running the test suite

Until v1.1 tests were exclusively performed on XNAT Central using a dedicated user account (nosetests). Yet some tests were not allowed to run due to restricted permissions. In v1.1, tests were restructured and were directed to two independent XNAT instances based on permission level. Hence XNAT Central is still used for most tests with read access whereas other tests requiring write permissions are run on a local XNAT instance in a Docker container.

Consequently, running the test suite now requires the following:

  • python-nose v1.2.1+

  • coverage v3.6+

  • docker v18+

Setting up a local Docker-powered XNAT instance may be achieved easily using docker-compose and any available recipe. We recommend the one from the following repository (maintained by the XNAT team). Once the repository cloned, run the following command (possibly as sudo)

docker-compose up -d

After a couple of minutes, the XNAT instance should be up and running locally. You may check it out visiting http://localhost.

The script tests/setup_xnat.py may then be executed to populate the local instance before running the tests.

Finally run the tests with the following command (from the root of the project):

nosetests pyxnat/tests

The file .github/workflows/ci.yml (used for CI) features these described steps and may be referred to for further information.

Building the documentation

Building the docs requires to have setuptools and sphinx (v2.0+) installed. Then run the command:

python setup.py build_sphinx

The docs are built in the build/sphinx/html folder.

Contribute to pyxnat

To contribute to pyxnat, first create an account on GitHub. Once this is done, fork the pyxnat repository to have you own repository, clone it using git clone on the computers where you want to work. Make changes in your clone, push them to your GitHub fork, test them on several computers and when you are happy with them, send a pull request to the main repository.

License

BSD 3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxnat-1.5.tar.gz (78.7 kB view details)

Uploaded Source

Built Distribution

pyxnat-1.5-py3-none-any.whl (95.3 kB view details)

Uploaded Python 3

File details

Details for the file pyxnat-1.5.tar.gz.

File metadata

  • Download URL: pyxnat-1.5.tar.gz
  • Upload date:
  • Size: 78.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.7.14

File hashes

Hashes for pyxnat-1.5.tar.gz
Algorithm Hash digest
SHA256 63c9a3e8e7d95f2135ab70bc1f25731b24ae641eab2d2b0bfc257fedac7169e7
MD5 44ffa02ee237159e9cfc81117a89af6a
BLAKE2b-256 d402f05bee8132579ba7310569e50da76ffdfbb0e1987286c7a82d22d4122e39

See more details on using hashes here.

File details

Details for the file pyxnat-1.5-py3-none-any.whl.

File metadata

  • Download URL: pyxnat-1.5-py3-none-any.whl
  • Upload date:
  • Size: 95.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.7.14

File hashes

Hashes for pyxnat-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ddfc4e95cd74803ecf043e8ecc084694911019959b914aaa038ad7b00415f886
MD5 ca2a4b62449ff86f8ccc40a554d5c714
BLAKE2b-256 80cf04fc34ba85c6242b029cfd245a0edd0c2be6c829656682aca8546623f924

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page