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

Release - OurDNA Dashboard v2 prototype #1024

Merged
merged 1 commit into from
Feb 4, 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
38 changes: 0 additions & 38 deletions api/graphql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
AssayLayer,
CohortLayer,
FamilyLayer,
OurDnaDashboardLayer,
SampleLayer,
SequencingGroupLayer,
)
Expand Down Expand Up @@ -68,7 +67,6 @@
DiscussionInternal,
)
from models.models.family import PedRowInternal
from models.models.ourdna import OurDNADashboard, OurDNALostSample
from models.models.project import (
FullWriteAccessRoles,
ProjectId,
Expand Down Expand Up @@ -110,30 +108,6 @@ async def m(info: Info[GraphQLContext, 'Query']) -> list[str]:
GraphQLAnalysisStatus = strawberry.enum(AnalysisStatus) # type: ignore


@strawberry.experimental.pydantic.type(model=OurDNALostSample, all_fields=True) # type: ignore
class GraphQLOurDNALostSample:
"""OurDNA Lost Sample GraphQL model to be used in OurDNA Dashboard"""

pass # pylint: disable=unnecessary-pass


@strawberry.experimental.pydantic.type(model=OurDNADashboard) # type: ignore
class GraphQLOurDNADashboard:
"""OurDNA Dashboard model"""

collection_to_process_end_time: strawberry.scalars.JSON
collection_to_process_end_time_statistics: strawberry.scalars.JSON
collection_to_process_end_time_bucket_statistics: strawberry.scalars.JSON
collection_to_process_end_time_24h: strawberry.scalars.JSON
processing_times_by_site: strawberry.scalars.JSON
processing_times_by_collection_site: strawberry.scalars.JSON
total_samples_by_collection_event_name: strawberry.scalars.JSON
samples_lost_after_collection: list[GraphQLOurDNALostSample]
samples_concentration_gt_1ug: strawberry.scalars.JSON
participants_consented_not_collected: list[int]
participants_signed_not_consented: list[int]


# Create cohort GraphQL model
@strawberry.type
class GraphQLCohort:
Expand Down Expand Up @@ -416,18 +390,6 @@ async def analysis_runner(
analysis_runners = await alayer.query(filter_)
return [GraphQLAnalysisRunner.from_internal(ar) for ar in analysis_runners]

@strawberry.field
async def ourdna_dashboard(
self, info: Info, root: 'Project'
) -> 'GraphQLOurDNADashboard':
connection = info.context['connection']
ourdna_layer = OurDnaDashboardLayer(connection)
if not root.id:
raise ValueError('Project must have an id')
ourdna_dashboard = await ourdna_layer.query(project_id=root.id)
# pylint: disable=no-member
return GraphQLOurDNADashboard.from_pydantic(ourdna_dashboard)

@strawberry.field()
async def pedigree(
self,
Expand Down
1 change: 0 additions & 1 deletion db/python/layers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from db.python.layers.cohort import CohortLayer
from db.python.layers.comment import CommentLayer
from db.python.layers.family import FamilyLayer
from db.python.layers.ourdna.dashboard import OurDnaDashboardLayer
from db.python.layers.participant import ParticipantLayer
from db.python.layers.project_insights import ProjectInsightsLayer
from db.python.layers.sample import SampleLayer
Expand Down
Empty file.
Loading