Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra pkg_resource use #4294

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions package/MDAnalysis/analysis/data/filenames.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@
# reference plots for Ramachandran and Janin classes
]

from pkg_resources import resource_filename

Rama_ref = resource_filename(__name__, 'rama_ref_data.npy')
Janin_ref = resource_filename(__name__, 'janin_ref_data.npy')
from importlib import resources

_base_ref = resources.files('MDAnalysis.analysis.data')
Rama_ref = (_base_ref / 'rama_ref_data.npy').as_posix()
Janin_ref = (_base_ref / 'janin_ref_data.npy').as_posix()

# This should be the last line: clean up namespace
del resource_filename
del resources
Loading