Skip to content

Commit

Permalink
FIX: get rid of resource_filename for python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
kx79wq committed Dec 7, 2024
1 parent 9d11a23 commit f12a337
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions histogrammar/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
# Resources lookup file for histogrammar

import pathlib
from pkg_resources import resource_filename
import histogrammar as hg

ROOT_DIRECTORY = pathlib.Path(__file__).resolve().parent


# data files that are shipped with histogrammar.
_DATA = {
_.name: _
for _ in pathlib.Path(resource_filename(hg.__name__, "test_data")).glob("*")
for _ in pathlib.Path(ROOT_DIRECTORY / "test_data").glob("*")
}

# Tutorial notebooks
_NOTEBOOK = {
_.name: _
for _ in pathlib.Path(resource_filename(hg.__name__, "notebooks")).glob("*.ipynb")
for _ in pathlib.Path(ROOT_DIRECTORY / "notebooks").glob("*.ipynb")
}

# Resource types
Expand Down

0 comments on commit f12a337

Please sign in to comment.