Skip to content

Commit

Permalink
Continue renaming filters
Browse files Browse the repository at this point in the history
  • Loading branch information
illusional committed Jun 14, 2024
1 parent ff15ab5 commit ce39f7e
Show file tree
Hide file tree
Showing 41 changed files with 48 additions and 49 deletions.
2 changes: 1 addition & 1 deletion api/graphql/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import strawberry

from db.python.db_filters import GenericFilter, GenericMetaFilter
from db.python.filters import GenericFilter, GenericMetaFilter

T = TypeVar('T')
Y = TypeVar('Y')
Expand Down
2 changes: 1 addition & 1 deletion api/graphql/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from strawberry.dataloader import DataLoader

from api.utils import get_projectless_db_connection, group_by
from db.python.db_filters import GenericFilter, get_hashable_value
from db.python.filters import GenericFilter, get_hashable_value
from db.python.layers import (
AnalysisLayer,
AssayLayer,
Expand Down
2 changes: 1 addition & 1 deletion api/graphql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from api.graphql.loaders import LoaderKeys, get_context
from db.python import enum_tables
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers import (
AnalysisLayer,
AnalysisRunnerLayer,
Expand Down
2 changes: 1 addition & 1 deletion api/routes/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
get_projectless_db_connection,
)
from api.utils.export import ExportType
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.analysis import AnalysisLayer
from db.python.tables.analysis import AnalysisFilter
from db.python.tables.project import ProjectPermissionsTable
Expand Down
2 changes: 1 addition & 1 deletion api/routes/analysis_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
get_project_readonly_connection,
get_project_write_connection,
)
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.analysis_runner import AnalysisRunnerLayer
from db.python.tables.analysis_runner import AnalysisRunnerFilter
from models.models.analysis_runner import AnalysisRunner, AnalysisRunnerInternal
Expand Down
2 changes: 1 addition & 1 deletion api/routes/assay.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from api.utils import get_project_readonly_connection
from api.utils.db import Connection, get_projectless_db_connection
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.assay import AssayLayer
from db.python.tables.assay import AssayFilter
from db.python.tables.project import ProjectPermissionsTable
Expand Down
2 changes: 1 addition & 1 deletion api/routes/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
from api.utils.export import ExportType
from api.utils.extensions import guess_delimiter_by_upload_file_obj
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.family import FamilyLayer, PedRow
from db.python.tables.family import FamilyFilter
from models.models.family import Family
Expand Down
2 changes: 1 addition & 1 deletion api/routes/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
get_projectless_db_connection,
)
from api.utils.export import ExportType
from db.python.db_filters.web import ProjectParticipantGridFilter
from db.python.filters.web import ProjectParticipantGridFilter
from db.python.layers.search import SearchLayer
from db.python.layers.seqr import SeqrLayer
from db.python.layers.web import WebLayer
Expand Down
2 changes: 1 addition & 1 deletion db/python/filters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is used to import all the filters that are used in the application

from db.python.db_filters.generic import (
from db.python.filters.generic import (
GenericFilter,
GenericFilterModel,
GenericMetaFilter,
Expand Down
4 changes: 2 additions & 2 deletions db/python/filters/participant.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# pylint: disable=too-many-instance-attributes
import dataclasses

from db.python.db_filters.generic import (
from db.python.filters.generic import (
GenericFilter,
GenericFilterModel,
GenericMetaFilter,
)
from db.python.db_filters.sample import SampleFilter
from db.python.filters.sample import SampleFilter
from models.models.project import ProjectId


Expand Down
4 changes: 2 additions & 2 deletions db/python/filters/sample.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# pylint: disable=too-many-instance-attributes
import dataclasses

from db.python.db_filters.generic import (
from db.python.filters.generic import (
GenericFilter,
GenericFilterModel,
GenericMetaFilter,
)
from db.python.db_filters.sequencing_group import SequencingGroupFilter
from db.python.filters.sequencing_group import SequencingGroupFilter
from models.models.project import ProjectId


Expand Down
2 changes: 1 addition & 1 deletion db/python/filters/sequencing_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import dataclasses
from datetime import date

from db.python.db_filters.generic import (
from db.python.filters.generic import (
GenericFilter,
GenericFilterModel,
GenericMetaFilter,
Expand Down
4 changes: 2 additions & 2 deletions db/python/filters/web.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from db.python.db_filters.generic import GenericFilter, GenericMetaFilter
from db.python.db_filters.participant import ParticipantFilter
from db.python.filters.generic import GenericFilter, GenericMetaFilter
from db.python.filters.participant import ParticipantFilter
from models.base import SMBase
from models.models.project import ProjectId
from models.utils.sample_id_format import sample_id_transform_to_raw
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from api.utils import group_by
from db.python.connect import Connection
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.base import BaseLayer
from db.python.layers.sequencing_group import SequencingGroupLayer
from db.python.tables.analysis import AnalysisFilter, AnalysisTable
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/cohort.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from db.python.connect import Connection
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.base import BaseLayer
from db.python.layers.sequencing_group import SequencingGroupLayer
from db.python.tables.cohort import CohortFilter, CohortTable, CohortTemplateFilter
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from api.utils import group_by
from db.python.connect import Connection
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.base import BaseLayer
from db.python.layers.participant import ParticipantLayer
from db.python.tables.family import FamilyFilter, FamilyTable
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/ourdna/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Any

from db.python.connect import Connection
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.base import BaseLayer
from db.python.layers.participant import ParticipantLayer
from db.python.layers.sample import SampleLayer
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from enum import Enum
from typing import Any

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.base import BaseLayer
from db.python.layers.sample import SampleLayer
from db.python.tables.family import FamilyTable
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any

from api.utils import group_by
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.assay import AssayLayer
from db.python.layers.base import BaseLayer, Connection
from db.python.layers.sequencing_group import SequencingGroupLayer
Expand Down
3 changes: 1 addition & 2 deletions db/python/layers/seqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import slack_sdk.errors
from backoff import expo, on_exception
from cloudpathlib import AnyPath

from cpg_utils.cloud import get_google_identity_token

from api.settings import (
Expand All @@ -24,8 +23,8 @@
get_slack_token,
)
from db.python.connect import Connection
from db.python.db_filters import GenericFilter
from db.python.enum_tables import SequencingTypeTable
from db.python.filters import GenericFilter
from db.python.layers.analysis import AnalysisInternal, AnalysisLayer
from db.python.layers.base import BaseLayer
from db.python.layers.family import FamilyLayer
Expand Down
2 changes: 1 addition & 1 deletion db/python/layers/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import date

from api.utils import group_by
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.assay import AssayLayer
from db.python.layers.base import BaseLayer
from db.python.layers.family import FamilyLayer
Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections import defaultdict
from typing import Any, Dict, List, Optional, Set, Tuple

from db.python.db_filters import GenericFilter, GenericFilterModel, GenericMetaFilter
from db.python.filters import GenericFilter, GenericFilterModel, GenericMetaFilter
from db.python.tables.base import DbBase
from db.python.utils import NotFoundError, to_db_json
from models.enums import AnalysisStatus
Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/analysis_runner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dataclasses
import datetime

from db.python.db_filters import GenericFilter, GenericFilterModel
from db.python.filters import GenericFilter, GenericFilterModel
from db.python.tables.base import DbBase
from db.python.utils import to_db_json
from models.models.analysis_runner import AnalysisRunnerInternal
Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/assay.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections import defaultdict
from typing import Any, NamedTuple

from db.python.db_filters import GenericFilter, GenericFilterModel, GenericMetaFilter
from db.python.filters import GenericFilter, GenericFilterModel, GenericMetaFilter
from db.python.tables.base import DbBase
from db.python.utils import NoOpAenter, NotFoundError, to_db_json
from models.models.assay import AssayId, AssayInternal
Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/bq/generic_bq_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from google.cloud import bigquery

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter

T = TypeVar('T')

Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/bq/generic_bq_filter_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dataclasses
from typing import Any

from db.python.db_filters import GenericFilterModel
from db.python.filters import GenericFilterModel
from db.python.tables.bq.generic_bq_filter import GenericBQFilter


Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/cohort.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import dataclasses
import datetime

from db.python.db_filters import GenericFilter, GenericFilterModel
from db.python.filters import GenericFilter, GenericFilterModel
from db.python.tables.base import DbBase
from db.python.tables.project import ProjectId
from db.python.utils import NotFoundError, to_db_json
Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from collections import defaultdict
from typing import Any, Dict, List, Optional, Set

from db.python.db_filters import GenericFilter, GenericFilterModel
from db.python.filters import GenericFilter, GenericFilterModel
from db.python.tables.base import DbBase
from db.python.utils import NotFoundError, escape_like_term
from models.models.family import FamilyInternal
Expand Down
2 changes: 1 addition & 1 deletion db/python/tables/family_participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from collections import defaultdict
from typing import Any

from db.python.db_filters import GenericFilter, GenericFilterModel
from db.python.filters import GenericFilter, GenericFilterModel
from db.python.tables.base import DbBase
from models.models.family import PedRowInternal
from models.models.project import ProjectId
Expand Down
4 changes: 2 additions & 2 deletions db/python/tables/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from collections import defaultdict
from typing import Any

from db.python.db_filters import GenericFilter
from db.python.db_filters.participant import ParticipantFilter
from db.python.filters import GenericFilter
from db.python.filters.participant import ParticipantFilter
from db.python.tables.base import DbBase
from db.python.utils import NotFoundError, escape_like_term, from_db_json, to_db_json
from models.models import PRIMARY_EXTERNAL_ORG, ParticipantInternal, ProjectId
Expand Down
4 changes: 2 additions & 2 deletions db/python/tables/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from datetime import date
from typing import Any, Iterable

from db.python.db_filters import GenericFilter
from db.python.db_filters.sample import SampleFilter
from db.python.filters import GenericFilter
from db.python.filters.sample import SampleFilter
from db.python.tables.base import DbBase
from db.python.utils import NotFoundError, escape_like_term, to_db_json
from models.models import PRIMARY_EXTERNAL_ORG, ProjectId
Expand Down
4 changes: 2 additions & 2 deletions db/python/tables/sequencing_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from datetime import date
from typing import Any

from db.python.db_filters.generic import GenericFilter
from db.python.db_filters.sequencing_group import SequencingGroupFilter
from db.python.filters.generic import GenericFilter
from db.python.filters.sequencing_group import SequencingGroupFilter
from db.python.tables.base import DbBase
from db.python.utils import NoOpAenter, to_db_json
from models.models.project import ProjectId
Expand Down
2 changes: 1 addition & 1 deletion test/test_analysis.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylint: disable=invalid-overridden-method
from test.testbase import DbIsolatedTest, run_as_sync

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.analysis import AnalysisLayer
from db.python.layers.assay import AssayLayer
from db.python.layers.sample import SampleLayer
Expand Down
2 changes: 1 addition & 1 deletion test/test_analysis_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import datetime
from test.testbase import DbIsolatedTest, run_as_sync

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.analysis_runner import AnalysisRunnerLayer
from db.python.tables.analysis_runner import AnalysisRunnerFilter
from models.models.analysis_runner import AnalysisRunnerInternal
Expand Down
2 changes: 1 addition & 1 deletion test/test_assay.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from pymysql.err import IntegrityError

from db.python.db_filters import GenericFilter
from db.python.enum_tables import AssayTypeTable
from db.python.filters import GenericFilter
from db.python.layers.assay import AssayLayer
from db.python.layers.sample import SampleLayer
from db.python.tables.assay import AssayFilter, AssayTable
Expand Down
2 changes: 1 addition & 1 deletion test/test_cohort.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from pymysql.err import IntegrityError

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers import CohortLayer, SampleLayer
from db.python.tables.cohort import CohortFilter
from models.models import (
Expand Down
2 changes: 1 addition & 1 deletion test/test_generic_filters.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dataclasses
import unittest

from db.python.db_filters import GenericFilter, GenericFilterModel
from db.python.filters import GenericFilter, GenericFilterModel


@dataclasses.dataclass(kw_only=True)
Expand Down
2 changes: 1 addition & 1 deletion test/test_participant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from test.testbase import DbIsolatedTest, run_as_sync

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers.participant import ParticipantLayer
from db.python.tables.participant import ParticipantFilter
from models.base import PRIMARY_EXTERNAL_ORG
Expand Down
4 changes: 2 additions & 2 deletions test/test_sample.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from test.testbase import DbIsolatedTest, run_as_sync

from db.python.db_filters.generic import GenericFilter
from db.python.db_filters.sample import SampleFilter
from db.python.filters.generic import GenericFilter
from db.python.filters.sample import SampleFilter
from db.python.layers.sample import SampleLayer
from models.models import PRIMARY_EXTERNAL_ORG, SampleUpsertInternal

Expand Down
2 changes: 1 addition & 1 deletion test/test_sequencing_groups.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime
from test.testbase import DbIsolatedTest, run_as_sync

from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers import AnalysisLayer, SampleLayer, SequencingGroupLayer
from db.python.tables.sequencing_group import SequencingGroupFilter
from models.enums.analysis import AnalysisStatus
Expand Down
2 changes: 1 addition & 1 deletion test/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ProjectParticipantGridFilter,
prepare_participants_for_export,
)
from db.python.db_filters import GenericFilter
from db.python.filters import GenericFilter
from db.python.layers import (
AssayLayer,
ParticipantLayer,
Expand Down

0 comments on commit ce39f7e

Please sign in to comment.