Skip to content

Commit c762861

Browse files
committed
switch to importlib.resources from pkg_resources
1 parent fb3d6bd commit c762861

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

cubids/tests/utils.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import nibabel as nb
1010
import numpy as np
1111
import pandas as pd
12-
from pkg_resources import resource_filename as pkgrf
12+
import importlib.resources
1313

14-
TEST_DATA = pkgrf("cubids", "tests/data")
14+
TEST_DATA = importlib.resources.files("cubids") / "tests/data"
1515

1616

1717
def get_data(tmp_path):
@@ -51,18 +51,6 @@ def _add_deletion(summary_tsv):
5151
return df.loc[3, "KeyParamGroup"]
5252

5353

54-
# def _edit_tsv(summary_tsv):
55-
# df = pd.read_table(summary_tsv)
56-
# df['RenameEntitySet'] = df['RenameEntitySet'].apply(str)
57-
# df['EntitySet'] = df['EntitySet'].apply(str)
58-
# for row in range(len(df)):
59-
# if df.loc[row, 'EntitySet'] == \
60-
# "acquisition-v4_datatype-fmap_fmap-magnitude1_suffix-magnitude1":
61-
# df.at[row, 'RenameEntitySet'] = \
62-
# "acquisition-v5_datatype-fmap_fmap-magnitude1_suffix-magnitude1"
63-
# df.to_csv(summary_tsv)
64-
65-
6654
def _add_ext_files(img_path):
6755
# add and save extension files in
6856
dwi_exts = [".bval", ".bvec"]

0 commit comments

Comments
 (0)