Skip to content

Commit

Permalink
Merge pull request #19 from nipype/auto-gen
Browse files Browse the repository at this point in the history
Auto generated interfaces from MRtrix3 source code
  • Loading branch information
tclose committed May 29, 2024
2 parents f077844 + 7b4f2a1 commit d600466
Show file tree
Hide file tree
Showing 54 changed files with 2,294 additions and 3,036 deletions.
412 changes: 412 additions & 0 deletions .github/workflows/ci-cd.yml

Large diffs are not rendered by default.

129 changes: 0 additions & 129 deletions .github/workflows/pythonpackage.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,8 @@ dmypy.json

# VS Code
.vscode/

# Hatchling
_version.py

/pydra/tasks/mrtrix3/v3_0
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

13 changes: 0 additions & 13 deletions README.md

This file was deleted.

46 changes: 46 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
==============================
Pydra task package for mrtrix3
==============================

.. image:: https://github.com/nipype/pydra-mrtrix3/actions/workflows/pythonpackage.yaml/badge.svg
:target: https://github.com/nipype/pydra-mrtrix3/actions/workflows/pythonpackage.yaml
.. image:: https://codecov.io/gh/nipype/pydra-mrtrix3/branch/main/graph/badge.svg?token=UIS0OGPST7
:target: https://codecov.io/gh/nipype/pydra-mrtrix3
.. image:: https://img.shields.io/pypi/pyversions/pydra-mrtrix3.svg
:target: https://pypi.python.org/pypi/pydra-mrtrix3/
:alt: Supported Python versions
.. image:: https://img.shields.io/pypi/v/pydra-mrtrix3.svg
:target: https://pypi.python.org/pypi/pydra-mrtrix3/
:alt: Latest Version


This package contains a collection of Pydra task interfaces for the mrtrix3 toolkit.


Generation of interfaces
------------------------

Task interfaces are automatically generated from the MRtrix3 source code using the
`generate.py` script, with the exception of a few interfaces that are manually
written.

Developer installation
----------------------

First install the package in editable mode

.. code-block::
$ pip install -e .[test]
Then generate the automic interfaces using

.. code-block::
$ python3 generate.py
This package comes with a battery of automatically generated test modules. They can be launched using

.. code-block::
$ pytest --doctest-modules pydra/tasks/*
16 changes: 12 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import os
import tempfile
from pathlib import Path
import pytest
from pathlib import Path

os.environ["PATH"] = (
str(Path(__file__).parent.parent.parent / "bin") + ":" + os.environ["PATH"]
)
os.environ["MRTRIX_CLI_PARSE_ONLY"] = "0"


@pytest.fixture
def work_dir():
return Path(tempfile.mkdtemp())
def cli_parse_only():
os.environ["MRTRIX_CLI_PARSE_ONLY"] = "1"
# You can set more environment variables here if needed
yield
# Clean up or reset environment variables if necessary
del os.environ["MRTRIX_CLI_PARSE_ONLY"]


# For debugging in IDE's don't catch raised exceptions and let the IDE
Expand Down
51 changes: 0 additions & 51 deletions docs/conf.py

This file was deleted.

10 changes: 10 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
black >=22.12.0
click >=8.1.3
tqdm
attrs >=23.1.0
fileformats >= 0.8
fileformats-extras >= 0.2.1
fileformats-medimage >= 0.4.4
fileformats-medimage-extras >= 0.1.5
fileformats-medimage-mrtrix3
fileformats-medimage-mrtrix3-extras
Loading

0 comments on commit d600466

Please sign in to comment.