Skip to content

Commit c0f3a66

Browse files
committed
switched from using pkg_resources to importlib.resources
1 parent ad54b9c commit c0f3a66

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cubids/config.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
"""Functions for configuring CuBIDS."""
22

33
from pathlib import Path
4-
4+
import importlib.resources as pkg_resources
55
import yaml
6-
from pkg_resources import resource_filename as pkgrf
7-
86

97
def load_config(config_file):
108
"""Load a YAML file containing a configuration for param groups."""
119
if config_file is None:
12-
config_file = Path(pkgrf("cubids", "data/config.yml"))
10+
config_file = Path(pkg_resources.files("cubids") / "data/config.yml")
1311

1412
with config_file.open() as f:
1513
config = yaml.safe_load(f)

0 commit comments

Comments
 (0)