Skip to content
Snippets Groups Projects
Commit 6551651e authored by Matthew David Pitkin's avatar Matthew David Pitkin
Browse files

Merge branch '111-switch-from-pkg_resources-to-importlib-resources' into 'master'

Resolve "Switch from pkg_resources to importlib.resources"

Closes #111

See merge request cwinpy/cwinpy!157
parents c45865db 59df6351
No related merge requests found
Showing
with 9 additions and 7 deletions
......@@ -4,8 +4,8 @@ include cwinpy/heterodyne/*.c
include cwinpy/heterodyne/*.h
recursive-include test/ *.py
recursive-include test/data *
cwinpy/data/S5/hw_inj/*.par
cwinpy/data/S6/hw_inj/*.par
cwinpy/data/O1/hw_inj/*.par
cwinpy/data/O2/hw_inj/*.par
cwinpy/data/O3/hw_inj/*.par
cwinpy/pkg_data/S5/hw_inj/*.par
cwinpy/pkg_data/S6/hw_inj/*.par
cwinpy/pkg_data/O1/hw_inj/*.par
cwinpy/pkg_data/O2/hw_inj/*.par
cwinpy/pkg_data/O3/hw_inj/*.par
import filecmp
import glob
import os
from importlib import resources
import pkg_resources
from astropy.time import Time
from .parfile import PulsarParameters
......@@ -163,7 +163,9 @@ HW_INJ_RUNTIMES["O3"] = {
HW_INJ_RUNS = ["S5", "S6", "O1", "O2", "O3a"]
HW_INJ_BASE_PATH = pkg_resources.resource_filename("cwinpy", "data/")
with resources.path("cwinpy.pkg_data", "__init__.py") as rpath:
HW_INJ_BASE_PATH = str(rpath.parent)
#: locations of hardware injection parameter files
HW_INJ = {
run: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment