Skip to content

Commit

Permalink
Merge branch 'master' into write_config_taxprofiler
Browse files Browse the repository at this point in the history
  • Loading branch information
sofstam authored Nov 21, 2024
2 parents 9af8d31 + a647bea commit b2e327f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 64.5.6
current_version = 64.5.8
commit = True
tag = True
tag_name = v{new_version}
Expand Down
2 changes: 1 addition & 1 deletion cg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__title__ = "cg"
__version__ = "64.5.6"
__version__ = "64.5.8"
44 changes: 12 additions & 32 deletions cg/store/crud/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,12 @@
from cg.constants.constants import CaseActions, CustomerId, PrepCategory, SampleType
from cg.exc import CaseNotFoundError, CgError, OrderNotFoundError, SampleNotFoundError
from cg.models.orders.constants import OrderType
from cg.server.dto.samples.collaborator_samples_request import (
CollaboratorSamplesRequest,
)
from cg.server.dto.samples.collaborator_samples_request import CollaboratorSamplesRequest
from cg.services.orders.order_service.models import OrderQueryParams
from cg.store.base import BaseHandler
from cg.store.exc import EntryNotFoundError
from cg.store.filters.status_analysis_filters import (
AnalysisFilter,
apply_analysis_filter,
)
from cg.store.filters.status_application_filters import (
ApplicationFilter,
apply_application_filter,
)
from cg.store.filters.status_analysis_filters import AnalysisFilter, apply_analysis_filter
from cg.store.filters.status_application_filters import ApplicationFilter, apply_application_filter
from cg.store.filters.status_application_limitations_filters import (
ApplicationLimitationsFilter,
apply_application_limitations_filter,
Expand All @@ -34,23 +26,14 @@
apply_application_versions_filter,
)
from cg.store.filters.status_bed_filters import BedFilter, apply_bed_filter
from cg.store.filters.status_bed_version_filters import (
BedVersionFilter,
apply_bed_version_filter,
)
from cg.store.filters.status_bed_version_filters import BedVersionFilter, apply_bed_version_filter
from cg.store.filters.status_case_filters import CaseFilter, apply_case_filter
from cg.store.filters.status_case_sample_filters import (
CaseSampleFilter,
apply_case_sample_filter,
)
from cg.store.filters.status_case_sample_filters import CaseSampleFilter, apply_case_sample_filter
from cg.store.filters.status_collaboration_filters import (
CollaborationFilter,
apply_collaboration_filter,
)
from cg.store.filters.status_customer_filters import (
CustomerFilter,
apply_customer_filter,
)
from cg.store.filters.status_customer_filters import CustomerFilter, apply_customer_filter
from cg.store.filters.status_illumina_flow_cell_filters import (
IlluminaFlowCellFilter,
apply_illumina_flow_cell_filters,
Expand All @@ -69,10 +52,7 @@
OrderTypeApplicationFilter,
apply_order_type_application_filter,
)
from cg.store.filters.status_organism_filters import (
OrganismFilter,
apply_organism_filter,
)
from cg.store.filters.status_organism_filters import OrganismFilter, apply_organism_filter
from cg.store.filters.status_pacbio_smrt_cell_filters import (
PacBioSMRTCellFilter,
apply_pac_bio_smrt_cell_filters,
Expand Down Expand Up @@ -1031,11 +1011,11 @@ def get_samples_to_sequence(self) -> list[Sample]:
)
return records.order_by(Sample.prepared_at).all()

def get_families_with_analyses(self) -> Query:
def get_cases_with_analyzes(self) -> Query:
"""Return all cases in the database with an analysis."""
return self._get_outer_join_cases_with_analyses_query()

def get_families_with_samples(self) -> Query:
def get_cases_with_samples(self) -> Query:
"""Return all cases in the database with samples."""
return self._get_join_cases_with_samples_query()

Expand All @@ -1062,7 +1042,7 @@ def get_cases_to_analyze(self, workflow: Workflow = None, limit: int = None) ->
CaseFilter.FOR_ANALYSIS,
]
cases = apply_case_filter(
cases=self.get_families_with_analyses(),
cases=self.get_cases_with_analyzes(),
filter_functions=case_filter_functions,
workflow=workflow,
)
Expand Down Expand Up @@ -1238,7 +1218,7 @@ def observations_to_upload(self, workflow: Workflow = None) -> Query:
CaseFilter.WITH_LOQUSDB_SUPPORTED_SEQUENCING_METHOD,
]
records: Query = apply_case_filter(
cases=self.get_families_with_samples(),
cases=self.get_cases_with_samples(),
filter_functions=case_filter_functions,
workflow=workflow,
)
Expand All @@ -1249,7 +1229,7 @@ def observations_to_upload(self, workflow: Workflow = None) -> Query:
def observations_uploaded(self, workflow: Workflow = None) -> Query:
"""Return observations that have been uploaded."""
records: Query = apply_case_filter(
cases=self.get_families_with_samples(),
cases=self.get_cases_with_samples(),
filter_functions=[CaseFilter.WITH_LOQUSDB_SUPPORTED_WORKFLOW],
workflow=workflow,
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "cg"
version = "64.5.6"
version = "64.5.8"
description = "Clinical Genomics command center"
authors = ["Clinical Genomics <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit b2e327f

Please sign in to comment.