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

MAINT: pkg_resources deprecation #237

Merged
merged 2 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions q2_sample_classifier/tests/test_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
import tempfile
import pkg_resources
import importlib

from qiime2.plugin.testing import TestPluginBase

Expand All @@ -23,5 +23,4 @@ def tearDown(self):
self.temp_dir.cleanup()

def get_data_path(self, filename):
return pkg_resources.resource_filename(self.package,
'data/%s' % filename)
return importlib.resources.files(self.package) / 'data' / filename
4 changes: 2 additions & 2 deletions q2_sample_classifier/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import pkg_resources
import importlib
from scipy.sparse import issparse
from scipy.stats import randint
import biom
Expand Down Expand Up @@ -63,7 +63,7 @@
}


TEMPLATES = pkg_resources.resource_filename('q2_sample_classifier', 'assets')
TEMPLATES = importlib.resources.files('q2_sample_classifier') / 'assets'


def _extract_features(feature_data):
Expand Down
Loading