Skip to content

Commit 2961a65

Browse files
committed
Merge tag 'v0.5' into debian
The first release after major refactoring: - Refactored into a proper `heudiconv` Python module - `heuristics` is now a `heudiconv.heuristics` submodule - you can specify shipped heuristics by name (e.g. `-f reproin`) without providing full path to their files - you need to use `--files` (not just positional argument(s)) if not using `--dicom_dir_templates` or `--subjects` to point to data files or directories with input DICOMs - `Dockerfile` is generated by [neurodocker](https://github.com/kaczmarj/neurodocker) - Logging verbosity reduced - Increased leniency with missing DICOM fields - `dbic_bids` heuristic renamed into reproin - [LICENSE](https://github.com/nipy/heudiconv/blob/master/LICENSE) with Apache 2.0 license for the project - [CHANGELOG.md](https://github.com/nipy/heudiconv/blob/master/CHANGELOG.md) - [Regression testing](https://github.com/nipy/heudiconv/blob/master/tests/test_regression.py) on real data (using datalad) - A dedicated [ReproIn](https://github.com/repronim/reproin) project with details about ReproIn setup/specification and operation using `reproin` heuristic shipped with heudiconv - [utils/test-compare-two-versions.sh](utils/test-compare-two-versions.sh) helper to compare conversions with two different versions of heudiconv - Support for converters other than `dcm2niix`, which is now the default. Explicitly specify `-c none` to only prepare conversion specification files without performing actual conversion - Compatibility with Nipype 1.0, PyDicom 1.0, and upcoming DataLad 0.10 - Consistency with converted files permissions - Ensured subject id for BIDS conversions will be BIDS compliant - Re-add `seqinfo` fields as column names in generated `dicominfo` - More robust sanity check of the regex reformatted .json file to avoid numeric precision issues - Many other various issues * tag 'v0.5': ENH: skip test_conversion if test data is not fetchable BF: skip testing the monitor code if tinydb is not available BF: do not ship "test" package in binary distribution
2 parents 985ba7c + 8cae01d commit 2961a65

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ def findsome(subdir, extensions):
3131
f.split(op.sep, 1)[1] for f in findall(subdir)
3232
if op.splitext(f)[-1].lstrip('.') in extensions
3333
]
34+
# Only recentish versions of find_packages support include
35+
# heudiconv_pkgs = find_packages('.', include=['heudiconv*'])
36+
# so we will filter manually for maximal compatibility
37+
heudiconv_pkgs = [pkg for pkg in find_packages('.') if pkg.startswith('heudiconv')]
38+
3439

3540
setup(
3641
name=ldict['__packagename__'],
@@ -40,7 +45,7 @@ def findsome(subdir, extensions):
4045
description=ldict['__description__'],
4146
long_description=ldict['__longdesc__'],
4247
license=ldict['__license__'],
43-
packages=find_packages(),
48+
packages=heudiconv_pkgs,
4449
entry_points={'console_scripts': [
4550
'heudiconv=heudiconv.cli.run:main',
4651
'heudiconv_monitor=heudiconv.cli.monitor:main',

tests/test_monitor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
import os.path as op
44
import pytest
55
from mock import patch
6-
from tinydb import TinyDB, Query
6+
try:
7+
from tinydb import TinyDB, Query
8+
except ImportError:
9+
pytest.importorskip("tinydb")
710
from subprocess import CalledProcessError
811

912
try:

tests/test_regression.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
have_datalad = True
88
try:
99
from datalad import api # to pull and grab data
10+
from datalad.support.exceptions import IncompleteResultsError
1011
except ImportError:
1112
have_datalad = False
1213

@@ -21,7 +22,10 @@
2122
@pytest.mark.skipif(not have_datalad, reason="no datalad")
2223
def test_conversion(tmpdir, subject, heuristic):
2324
tmpdir.chdir()
24-
datadir = fetch_data(tmpdir.strpath, subject)
25+
try:
26+
datadir = fetch_data(tmpdir.strpath, subject)
27+
except IncompleteResultsError as exc:
28+
pytest.skip("Failed to fetch test data: %s" % str(exc))
2529
outdir = tmpdir.mkdir('out').strpath
2630

2731
args = gen_heudiconv_args(datadir, outdir, subject, heuristic)

0 commit comments

Comments
 (0)