Skip to content

Commit d600466

Browse files
authored
Merge pull request #19 from nipype/auto-gen
Auto generated interfaces from MRtrix3 source code
2 parents f077844 + 7b4f2a1 commit d600466

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2294
-3036
lines changed

.github/workflows/ci-cd.yml

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/pythonpackage.yml

Lines changed: 0 additions & 129 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,8 @@ dmypy.json
133133

134134
# VS Code
135135
.vscode/
136+
137+
# Hatchling
138+
_version.py
139+
140+
/pydra/tasks/mrtrix3/v3_0

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
==============================
2+
Pydra task package for mrtrix3
3+
==============================
4+
5+
.. image:: https://github.com/nipype/pydra-mrtrix3/actions/workflows/pythonpackage.yaml/badge.svg
6+
:target: https://github.com/nipype/pydra-mrtrix3/actions/workflows/pythonpackage.yaml
7+
.. image:: https://codecov.io/gh/nipype/pydra-mrtrix3/branch/main/graph/badge.svg?token=UIS0OGPST7
8+
:target: https://codecov.io/gh/nipype/pydra-mrtrix3
9+
.. image:: https://img.shields.io/pypi/pyversions/pydra-mrtrix3.svg
10+
:target: https://pypi.python.org/pypi/pydra-mrtrix3/
11+
:alt: Supported Python versions
12+
.. image:: https://img.shields.io/pypi/v/pydra-mrtrix3.svg
13+
:target: https://pypi.python.org/pypi/pydra-mrtrix3/
14+
:alt: Latest Version
15+
16+
17+
This package contains a collection of Pydra task interfaces for the mrtrix3 toolkit.
18+
19+
20+
Generation of interfaces
21+
------------------------
22+
23+
Task interfaces are automatically generated from the MRtrix3 source code using the
24+
`generate.py` script, with the exception of a few interfaces that are manually
25+
written.
26+
27+
Developer installation
28+
----------------------
29+
30+
First install the package in editable mode
31+
32+
.. code-block::
33+
34+
$ pip install -e .[test]
35+
36+
Then generate the automic interfaces using
37+
38+
.. code-block::
39+
40+
$ python3 generate.py
41+
42+
This package comes with a battery of automatically generated test modules. They can be launched using
43+
44+
.. code-block::
45+
46+
$ pytest --doctest-modules pydra/tasks/*

conftest.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
import os
2-
import tempfile
3-
from pathlib import Path
42
import pytest
3+
from pathlib import Path
4+
5+
os.environ["PATH"] = (
6+
str(Path(__file__).parent.parent.parent / "bin") + ":" + os.environ["PATH"]
7+
)
8+
os.environ["MRTRIX_CLI_PARSE_ONLY"] = "0"
59

610

711
@pytest.fixture
8-
def work_dir():
9-
return Path(tempfile.mkdtemp())
12+
def cli_parse_only():
13+
os.environ["MRTRIX_CLI_PARSE_ONLY"] = "1"
14+
# You can set more environment variables here if needed
15+
yield
16+
# Clean up or reset environment variables if necessary
17+
del os.environ["MRTRIX_CLI_PARSE_ONLY"]
1018

1119

1220
# For debugging in IDE's don't catch raised exceptions and let the IDE

docs/conf.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

docs/requirements.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
black >=22.12.0
2+
click >=8.1.3
3+
tqdm
4+
attrs >=23.1.0
5+
fileformats >= 0.8
6+
fileformats-extras >= 0.2.1
7+
fileformats-medimage >= 0.4.4
8+
fileformats-medimage-extras >= 0.1.5
9+
fileformats-medimage-mrtrix3
10+
fileformats-medimage-mrtrix3-extras

0 commit comments

Comments
 (0)