Skip to content

stadmill/osipi

 
 

Repository files navigation

Disclaimer:

This package is under development. All the details mentioned below are long-term intentions behind the production of this package.

OSIPI: Open Science Initiative for Perfusion Imaging

OSIPI is a Python package developed by the Open Source Initiative for Perfusion Imaging OSIPI, a project under the Perfusion Study Group of the International Society for Magnetic Resonance in Medicine ISMRM. It serves as the authoritative tool for perfusion MRI analysis.

OSIPI's aim is to create open access resources for perfusion imaging research to eliminate duplicate development, to improve the reproducibility and to speed up the translation of perfusion imaging for clinical practice.

The osipi package structure and logic follows the lexicon defined by OSIPI, and wraps around selected implementations collected in the code contributions of OSIPI.

Features

  • Comprehensive set of tools for analyzing perfusion MRI data
  • Follows the lexicon defined by OSIPI
  • Incorporates selected implementations contributed by the community

Quick Start

Installation

To install OSIPI, you can use pip:

  `pip install osipi`

Usage

To use OSIPI in your Python scripts, import the package:

  `import osipi`

Contributions

We welcome contributions to OSIPI! To contribute, follow these steps:

  • Fork the OSIPI repository on GitHub.
  • Create a new branch for your feature or bug fix.
  • Make your changes and commit them with descriptive messages.
  • Push your changes to your fork.
  • Submit a pull request to the main OSIPI repository.

Development Setup

We use poetry to manage the dependencies for this project.

Using Poetry

  1. If you don't have Poetry installed, you can install it using pip:

    pip install poetry

    Or, if you're using a Unix-based system, you can install it using the following command:

    curl -sSL https://install.python-poetry.org | python3 -

    For more information on installing Poetry, see the official documentation

  2. Clone the repository to your local machine.

  3. Navigate to the project directory.

  4. Install the project dependencies with Poetry:

    poetry install
  5. Activate the Poetry environment:

    poetry shell

Setting up pre-commit

pre-commit is a tool that we use to maintain high-quality code in this project. It runs checks (hooks) on your code each time you commit changes. Here's how to set it up:

Pre-Commit Hooks

Pre-commit hooks are scripts that run automatically before a commit is made in a Git repository. They help catch common issues like syntax errors, formatting problems, and other code quality issues.

Example hooks

  • flake8 - a linter that checks your code for common errors and style issues.
  • trailing-whitespace - a hook that removes trailing whitespace from your files.
  • ruff - also a linter that checks your code for common errors and style issues.
  • end of file fixer - a hook that ensures that all files end with a newline.
  • check yaml

We are using pre-commit configuration file to define our hooks. You can find the configuration file here

  1. In the project directory, run the following command to install the pre-commit hooks:

    pre-commit install
  2. You can run all pre-commit hooks on all files with:

    pre-commit run --all-files

NOTE:

  • Next time you commit changes, pre-commit will run the hooks automatically.
  • Some hooks automatically fix/format your files to specific standards. If you see that some of your files have been changed after a commit, don't worry! It's just pre-commit doing its job. Add the changes and commit them again.

For more details on how to contribute, visit the Developer Guide.

As mentioned before, this project is still in the early stages of development. If you'd like to contribute by adding functionality, we recommend opening an issue first to discuss your proposed functionality and the best ways to implement it.

Details

For more detail please see the documentation.

About

Python package for perfusion MRI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%