Skip to content

Commit 65bc333

Browse files
committed
enh: add pathlib as requirement
1 parent 943f449 commit 65bc333

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

heudiconv/info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'nibabel',
1212
'pydicom',
1313
'nipype',
14+
'pathlib',
1415
]
1516

1617
TESTS_REQUIRES = [

heudiconv/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ def clear_temp_dicoms(item_dicoms):
328328
tmp = Path(op.commonprefix(item_dicoms).parents[1])
329329
except IndexError:
330330
return
331-
if (op.dirname(tmp) == tempfile.gettempdir()
332-
and op.basename(tmp).startswith('heudiconvDCM')
333-
and op.exists(tmp)):
331+
if (str(tmp.parent) == tempfile.gettempdir()
332+
and str(tmp.stem).startswith('heudiconvDCM')
333+
and op.exists(str(tmp))):
334334
# clean up directory holding dicoms
335335
shutil.rmtree(tmp)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.[full]
1+
.[all]
22
# This is a dcmstack branch with changes for Python 3
33
# sent PR to main repo, TODO: check if merged
44
# https://github.com/ghisvail/dcmstack/pull/1

0 commit comments

Comments
 (0)