diff --git a/gambit/cli/common.py b/gambit/cli/common.py index 43e07e5..f984cd6 100644 --- a/gambit/cli/common.py +++ b/gambit/cli/common.py @@ -7,9 +7,7 @@ from sqlalchemy.orm import sessionmaker from gambit.kmers import KmerSpec -from gambit.db import ReferenceDatabase -from gambit.db.models import only_genomeset -from gambit.db.sqla import ReadOnlySession +from gambit.db import ReferenceDatabase, ReadOnlySession, only_genomeset from gambit.sigs.base import ReferenceSignatures, load_signatures from gambit.util.io import FilePath, read_lines from gambit.util.misc import join_list_human diff --git a/gambit/query.py b/gambit/query.py index bc76118..bed9be0 100644 --- a/gambit/query.py +++ b/gambit/query.py @@ -10,8 +10,7 @@ from gambit import __version__ as GAMBIT_VERSION from gambit.classify import classify, ClassifierResult, GenomeMatch, compare_classifier_results, \ compare_genome_matches -from gambit.db.models import reportable_taxon -from gambit.db import ReferenceDatabase, Taxon, ReferenceGenomeSet +from gambit.db import ReferenceDatabase, Taxon, ReferenceGenomeSet, reportable_taxon from gambit.seq import SequenceFile from gambit.sigs import KmerSignature, SignaturesMeta from gambit.metric import jaccarddist_matrix diff --git a/tests/data/testdb_210818/generate-results.py b/tests/data/testdb_210818/generate-results.py index 6a1aa54..2e0cafe 100755 --- a/tests/data/testdb_210818/generate-results.py +++ b/tests/data/testdb_210818/generate-results.py @@ -12,8 +12,7 @@ from csv import DictReader from gambit.seq import SequenceFile -from gambit.db import ReferenceDatabase -from gambit.db.models import reportable_taxon +from gambit.db import ReferenceDatabase, reportable_taxon from gambit.query import QueryParams, query_parse from gambit.results.archive import ResultsArchiveWriter from gambit.util.misc import zip_strict diff --git a/tests/db/test_db_refdb.py b/tests/db/test_db_refdb.py index b337b06..e2d3433 100644 --- a/tests/db/test_db_refdb.py +++ b/tests/db/test_db_refdb.py @@ -6,8 +6,7 @@ from sqlalchemy.orm import sessionmaker from gambit.db import refdb -from gambit.db.refdb import ReferenceDatabase -from gambit.db import Genome, ReferenceGenomeSet, AnnotatedGenome, Taxon +from gambit.db import Genome, ReferenceGenomeSet, AnnotatedGenome, Taxon, ReferenceDatabase GENOME_ID_ATTRS = {attr: getattr(Genome, attr) for attr in Genome.ID_ATTRS} diff --git a/tests/db/test_db_sqla.py b/tests/db/test_db_sqla.py index 69b7bc0..4361930 100644 --- a/tests/db/test_db_sqla.py +++ b/tests/db/test_db_sqla.py @@ -2,7 +2,7 @@ from sqlalchemy.orm import Session -from gambit.db.sqla import ReadOnlySession, file_sessionmaker +from gambit.db import ReadOnlySession, file_sessionmaker def test_file_sessionmaker(testdb): diff --git a/tests/testdb.py b/tests/testdb.py index 906f649..648694d 100644 --- a/tests/testdb.py +++ b/tests/testdb.py @@ -11,11 +11,9 @@ from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker -from gambit.db.sqla import ReadOnlySession from gambit.seq import SequenceFile from gambit.sigs import load_signatures -from gambit.db import ReferenceDatabase -from gambit.db.models import only_genomeset +from gambit.db import ReferenceDatabase, ReadOnlySession, only_genomeset from gambit.results.archive import ResultsArchiveReader