Skip to content

Commit

Permalink
Replace deprecated importlib.resources calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsinger committed Nov 12, 2023
1 parent 13a9e90 commit ff08cb9
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions radbelt/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@
# SPDX-License-Identifier: NASA-1.3
#

from importlib import resources
from importlib.resources import files, as_file

from .extern import igrf as igrf_data
from .extern import aep8 as aep8_data

with resources.path(igrf_data, 'dgrf1945.dat') as p:
IGRF_DATA_PATH = str(p.parent.resolve())
with resources.path(aep8_data, 'ae8min.asc') as p:
AEP8_DATA_PATH = str(p.parent.resolve())

del igrf_data, aep8_data
with as_file(files(__package__)) as path:
IGRF_DATA_PATH = str(path / 'extern' / 'igrf')
AEP8_DATA_PATH = str(path / 'extern' / 'aep8')

0 comments on commit ff08cb9

Please sign in to comment.