Skip to main content

Models for infering dynamics in neuroimaging data

Project description

See the read the docs page for a description of this project: https://osl-dynamics.readthedocs.io.

Installation

Here, we describe how to install osl-dynamics from source. We recommend using the conda environment files in /envs. For a generic linux machine, osl-dynamics can be installed in editable mode with:

git clone https://github.com/OHBA-analysis/osl-dynamics.git
cd osl-dynamics
conda env create -f envs/linux.yml
conda activate osld
pip install -e .

If you’re using a Mac then use the envs/mac.yml file to create the conda environment instead of envs/linux.yml. Note, the conda environments use pip to install TensorFlow, you may need to load/install additional libraries (such as CUDA/cuDNN) if you have GPU support.

Developers might want to clone the repo using SSH instead of HTTPS:

git clone git@github.com:OHBA-analysis/osl-dynamics.git

Oxford specific computers

If you’re installing on the Oxford BMRC server, use envs/bmrc.yml. If you’re installing on the OHBA workstation, use envs/hbaws.yml. Note, the hbaws.yml environment will automatically install spyder and jupyter notebooks.

Installing within an osl environment

If you have already installed OSL you can install osl-dynamics in the osl environment with:

conda activate osl
cd osl-dynamics
pip install tensorflow
pip install -e .

Documentation

The read the docs page should be automatically updated whenever there’s a new commit on the main branch.

The documentation is included as docstrings in the source code. Please write docstrings to any classes or functions you add following the numpy style. The API reference documentation will only be automatically generated if the docstrings are written correctly. The documentation directory /doc also contains .rst files that provide additional info regarding installation, development, the models, etc.

To compile the documentation locally you need to install the required packages (sphinx, etc.) in your conda environment:

cd osl-dynamics
pip install -r doc/requirements.txt

To compile the documentation locally use:

python setup.py build_sphinx

The local build of the documentation webpage can be found in build/sphinx/html/index.html.

Releases

The process of packaging a python project is described here: https://packaging.python.org/en/latest/tutorials/packaging-projects.

A couple packages are needed to build and upload a project to PyPI, these can be installed in your conda environment with:

pip install build twine

The following steps can be used to release a new version:

  1. Update the version number on line 5 of setup.cfg.

  2. Commit the updated setup.cfg to the main branch of the GitHub repo.

  3. Delete any old distributions that have been built (if there are any): rm -r dist.

  4. Build a distribution in the osl-dynamics root directory with python -m build. This will create a new directory called dist.

  5. Test the build by installing in a test conda environment with cd dist; pip install <build>.whl.

  6. Upload the distribution to PyPI with twine upload dist/*. You will need to enter the username and password that you used to register with https://pypi.org.

  7. Tag the commit uploaded to PyPI with the version number using the ‘Create a new release’ link on the right of the GitHub repo webpage.

The uploaded distribution will then be available to be installed with:

pip install osl-dynamics

Editing Source Code

See here for useful info regarding how to use the BMRC cluster and how to edit the source code.

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

osl-dynamics-1.2.4.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osl_dynamics-1.2.4-py3-none-any.whl (4.1 MB view details)

Uploaded Python 3

File details

Details for the file osl-dynamics-1.2.4.tar.gz.

File metadata

  • Download URL: osl-dynamics-1.2.4.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for osl-dynamics-1.2.4.tar.gz
Algorithm Hash digest
SHA256 6a94aee0c2815326804442454b3a34ca76cdc6e495a1814b3cd943f033c3ffb5
MD5 469a6c88f0b581eff46298b4855b8f57
BLAKE2b-256 fe94e7df7ace8d780894b46c826bc44fcf49b4770e4f6df150f015398956fa88

See more details on using hashes here.

File details

Details for the file osl_dynamics-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: osl_dynamics-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for osl_dynamics-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bc36905ba29fab22f3e4b1a97fdb57d2058405b571c1ebd89dc5b01e345044b7
MD5 26ec3a9cd0ee36654d2d6a4ed6477b2b
BLAKE2b-256 a03b3162ef2d55adc1bfb895d7da6f7b594207c5917b5b76809bf081f5e1e1b4

See more details on using hashes here.

Supported by

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