diff --git a/q2_moshpit/__init__.py b/q2_moshpit/__init__.py index 4641236d..fc65643d 100644 --- a/q2_moshpit/__init__.py +++ b/q2_moshpit/__init__.py @@ -6,13 +6,13 @@ # The full license is in the file LICENSE, distributed with this software. # ---------------------------------------------------------------------------- +from .kraken2 import classification, database +from .metabat2 import metabat2 +from . import diamond, annotation + -import importlib from ._version import get_versions __version__ = get_versions()['version'] del get_versions -importlib.import_module('q2_moshpit.kraken2') -importlib.import_module('q2_moshpit.metabat2') -importlib.import_module('q2_moshpit.diamond') -importlib.import_module('q2_moshpit.annotation') +__all__ = ['metabat2', 'classification', 'database', 'diamond', 'annotation'] diff --git a/q2_moshpit/annotation/tests/test_annotate.py b/q2_moshpit/annotation/tests/test_annotate.py index 3c0d9ec1..42515cc9 100644 --- a/q2_moshpit/annotation/tests/test_annotate.py +++ b/q2_moshpit/annotation/tests/test_annotate.py @@ -12,7 +12,7 @@ from q2_types_genomics.genome_data import SeedOrthologDirFmt, OrthologFileFmt from q2_types_genomics.reference_db import EggnogRefDirFmt import pandas as pd - +import pandas.testing as pdt class TestAnnotate(TestPluginBase): package = 'q2_moshpit.annotation.tests' @@ -28,10 +28,9 @@ def test_small_good_hits(self): eggnog_db=egg_db) exp_fp = self.get_data_path('expected/test_output.emapper.annotations') - exp = OrthologFileFmt(exp_fp, mode='r').view(pd.DataFrame).values + exp = OrthologFileFmt(exp_fp, mode='r').view(pd.DataFrame) for rel_path, obj in obs_obj.annotations.iter_views(OrthologFileFmt): - obs = obj.view(pd.DataFrame).values - - self.assertEqual(obs, exp) - assert False + obs = obj.view(pd.DataFrame) + pdt.assert_frame_equal(obs, exp) +