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

Adding AWS HealthOmics as a Module in "Play" tools #954

Merged
merged 183 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 176 commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
2bf7f7a
sync modularization main with main (#395)
AmrSaber Mar 30, 2023
098081d
backend: Pluginarchitecture (#359)
nikpodsh Mar 31, 2023
b26956b
Added boilerplate for omics module
dlpzx Apr 4, 2023
ef129e6
frontend: simplify dev dockerfile (#396)
AmrSaber Apr 5, 2023
fefc45c
frontend: make styling consistent and remove dead code (#394)
AmrSaber Apr 5, 2023
ec45f74
Adding Omics API
Apr 7, 2023
f26fc01
ignore styling commits in git blame (#405)
AmrSaber Apr 11, 2023
3c4ab2d
Dataset Modularization pt.1 (#413)
nikpodsh Apr 24, 2023
74a249a
Datasets modularization pt.2 (#432)
nikpodsh May 2, 2023
2a4c3d6
Datasets modularization pt.3 (#440)
nikpodsh May 4, 2023
3a9b3d8
Datasets modularization pt.4 (#441)
nikpodsh May 4, 2023
d9b99b3
Datasets modularization pt.5 (#442)
nikpodsh May 10, 2023
fa174f3
Module dependencies (#447)
nikpodsh May 17, 2023
45c1b33
Worksheets modularization (#449)
dbalintx May 17, 2023
07ffa1b
modularization: Merge from main V1.5.2 to the modularization branch (…
nikpodsh May 25, 2023
f2505b5
modularization: MLstudio modularization (#486)
dlpzx Jun 14, 2023
bb6e6c0
modularization: testing extensions (#518)
dlpzx Jun 16, 2023
2b07213
Merge branch 'modularization-main' into modularization/omics-module
dlpzx Jun 20, 2023
a9ab725
Worked on omics-module - still in-progress
dlpzx Jun 20, 2023
f599a8a
modularization: Disable and skip module test directories for modules …
nikpodsh Jun 21, 2023
f3bccc6
modularization: Dataset Sharing modularization (#488)
nikpodsh Jun 26, 2023
79cd32e
modularization: Datapipelines modularization (#457)
dbalintx Jun 27, 2023
ebebe26
Dashboard modularization (#537)
nikpodsh Jul 4, 2023
1ac4c2f
feat: Redshift removal (#551)
dbalintx Jul 6, 2023
db223f5
Fix methods without permissions (#547)
nikpodsh Jul 10, 2023
1dd39e2
Added boilerplate for omics module
dlpzx Apr 4, 2023
8a28d30
Adding Omics API
Apr 7, 2023
1bfcbb9
Worked on omics-module - still in-progress
dlpzx Jun 20, 2023
ff3eb85
Merge remote-tracking branch 'origin/modularization/omics-module' int…
dlpzx Jul 11, 2023
1cba7d8
Update with latest design drafts, added TODOs
dlpzx Jul 11, 2023
94cf683
feat:increase memory limit for local frontend container (#568)
dbalintx Jul 13, 2023
ea0e3e9
Change the pipeline for the modularization (#545)
nikpodsh Jul 13, 2023
e870882
Add generic way to toggle data.all features (#538)
blitzmohit Jul 19, 2023
1b92710
Refactoring of aws calls (#550)
nikpodsh Jul 19, 2023
e859965
Migrate to a new permission checker (#569)
nikpodsh Jul 20, 2023
f2adb7e
Core modularization (#592)
nikpodsh Jul 24, 2023
7d2704f
Merge main into modularization-main branch (#595)
nikpodsh Jul 26, 2023
5b71cac
Resolve modularization inconsistencies (#605)
dbalintx Jul 31, 2023
399769a
Merge remote-tracking branch 'origin/modularization-main' into modula…
dlpzx Jul 31, 2023
99836c7
Modularization-main bugfixes (#604)
dbalintx Aug 3, 2023
3758e68
Modularization: clean up base (#638)
dlpzx Aug 8, 2023
b8d0334
modularization: pivot role policies (#616)
dlpzx Aug 9, 2023
232276f
Minor issues in the modularization (#639)
nikpodsh Aug 10, 2023
2933f18
Move custom resources to Dataset Environment extension (#647)
dlpzx Aug 14, 2023
f182ee2
All modules can be disabled at a time (#643)
nikpodsh Aug 16, 2023
90bc8e8
Update modularization work with the latest main (#661)
nikpodsh Aug 16, 2023
195175a
Change Defaut Cloudfront TLS Feature Flag (#658)
noah-paige Aug 16, 2023
67df2f3
Merge `modularization/frontend` into `modularization-main` (#665)
itsmo-amzn Aug 17, 2023
3ff6360
Refactor and modularize tests (#656)
nikpodsh Aug 17, 2023
9a75de6
Fix module dependency loading. (#675)
nikpodsh Aug 18, 2023
f780e3b
Refactor db names (#677)
dlpzx Aug 18, 2023
9a3ba75
Modularization - Add CDK Bootstrap Exec Policy (#668)
noah-paige Aug 18, 2023
f123cdf
Merge remote-tracking branch 'os/modularization-main' into modulariza…
dlpzx Aug 18, 2023
4bb5343
fixed frontend docker timeout + boto3 for omics
Aug 22, 2023
6ac9998
omics backend changes
Aug 22, 2023
bcab0cc
updated botocore for boto3 omics
Aug 22, 2023
af9dd6a
rebased from patrick-clean-slate and made some frontend changes
Sep 5, 2023
07154a8
Fix imports in frontend to use global imports instead of relative imp…
dlpzx Sep 6, 2023
98bdcdf
fix imports and default filters
dlpzx Sep 7, 2023
be6d53c
made changes to resolve compile issues
Sep 7, 2023
af3a2dd
made changes for ui fixes
Sep 12, 2023
e3a7f8c
Add ECS task to fetch workflows on schedule. Pagination on list_workf…
dlpzx Sep 18, 2023
0db59bb
Squashed commit of the following
Sep 21, 2023
a98e768
updated backend code to include region
Oct 3, 2023
8c1eab7
getworkflow changes
Oct 3, 2023
c152401
Changes to client
dlpzx Oct 3, 2023
3a2bed5
Get workflow changes
Oct 3, 2023
ceb00dd
Merge branch 'kiran-clean-state' of https://git-codecommit.us-east-1.…
Oct 3, 2023
4dea3ac
made changes to common object ObjectBrief.js and other omice view com…
Oct 3, 2023
381a35c
Merge branch 'main-os' into deploy
dlpzx Oct 5, 2023
2dcc552
Add cdk.json values for deployment
dlpzx Oct 5, 2023
0e6fd7a
add context.json for deployment
dlpzx Oct 5, 2023
4ecb752
Add migration script for omics tables
dlpzx Oct 5, 2023
19750da
New decorator type for container task
dlpzx Oct 5, 2023
d23aa54
Adding logs and checking previously registered workflows logic
dlpzx Oct 6, 2023
e65d171
upgrade boto3 version in all requirements files
dlpzx Oct 6, 2023
bdacd8d
Issue with max pagination limit, set to 100
dlpzx Oct 6, 2023
94145b8
Added more logs
dlpzx Oct 6, 2023
d5e6fb5
Fix list_workflows pagination
dlpzx Oct 6, 2023
02dde75
Squashed commit of the following
dlpzx Oct 10, 2023
2e46e8b
Changes to omics createform
dlpzx Oct 10, 2023
0f56fb3
fixed null workflow error
Oct 12, 2023
ed28635
fixing form errors
Oct 12, 2023
58695fb
fixed form validation bugs
Oct 12, 2023
28477bb
Remove unnecessary create run button
dlpzx Oct 13, 2023
63b9fc6
Prettify the frontend
dlpzx Oct 13, 2023
8e37c66
Kiran working session changes
dlpzx Oct 16, 2023
3fd6d8d
Fix issues with permissions
dlpzx Oct 16, 2023
f449762
Added table for list runs and fix create forms and format
dlpzx Oct 17, 2023
336f4bc
Add migraiton script for omics run table
dlpzx Oct 17, 2023
3b1cc5a
Add migraiton script for omics run table
dlpzx Oct 17, 2023
c90a440
made changes to modify the bucket settings
Oct 17, 2023
73ad312
replaced data.all with Amazon ResearchZone
Oct 17, 2023
b982cc9
Merging remote to local
Oct 17, 2023
f6d2c1e
Omics cleanup
dlpzx Oct 18, 2023
5671825
Merge branch 'main-os' into modularization/omics-module
dlpzx Dec 18, 2023
9b72ff4
Clean-up and added TODOs
dlpzx Dec 18, 2023
b9f2351
Merge branch 'main' into modularization/omics-module
dlpzx Jan 11, 2024
5c4c077
clean-up mismatch with main
dlpzx Jan 11, 2024
1d8c672
clean-up mismatch with main-frontend
dlpzx Jan 11, 2024
6149e35
Added permissions to Omics
dlpzx Jan 25, 2024
0007751
Merge branch 'main' into modularization/omics-module
dlpzx Feb 1, 2024
0f92390
Omics - re-do frontend, added to environment, clean-up code, naming c…
dlpzx Feb 2, 2024
5076b0b
Merge branch 'main' into modularization/omics-module
dlpzx Feb 20, 2024
edf86c7
Added testing framework to Omics
dlpzx Feb 20, 2024
cac969d
Omics count_resources and flake
dlpzx Feb 20, 2024
e7002d4
Fixed Omics tests as example
dlpzx Feb 20, 2024
893b4bf
Fix init file - add dataset dependency
dlpzx Feb 20, 2024
c5e53ac
Draft of scoped down permissions
dlpzx Feb 20, 2024
8de80fd
Fixed migration scripts, Rename omics_models, fix issue in pivotrole …
dlpzx Feb 21, 2024
e4a396f
Add Omics migration
dlpzx Feb 21, 2024
44dd4b8
Fixing details in imports and flaking
dlpzx Feb 21, 2024
fac509c
Update omics_client.py for tags placeholder
ironspur5 Mar 1, 2024
4a4e02a
Update env_role_omics_policy.py scoping down permissions
ironspur5 Mar 1, 2024
f54a7da
Update pivot_role_omics_policy.py scoped down permissions
ironspur5 Mar 1, 2024
6a043dc
Update omics_client.py to add Team tag on Run
ironspur5 Mar 1, 2024
b17e332
Merge branch 'main' into modularization/omics-module
dlpzx Mar 5, 2024
5812501
Updates with main - resolve conflicts
dlpzx Mar 5, 2024
25ae62d
Upgrade python version to 3.9
dlpzx Mar 11, 2024
2922a71
Fix issue on prefix used in pivot role policies
dlpzx Mar 11, 2024
963c52f
Fix issue in pivotrole policies List + remove status
dlpzx Mar 11, 2024
e0bbe46
Fix issue in pivotrole policies List
dlpzx Mar 11, 2024
a2e5e06
Update pivot_role_omics_policy.py to include ARN format of Ready2Run …
ironspur5 Mar 14, 2024
9bd2429
Update env_role_omics_policy.py to add support for Ready2Run workflow…
ironspur5 Mar 14, 2024
aa6be2f
Update env_role_omics_policy.py Applying StartRun to Workflow resource
ironspur5 Mar 19, 2024
4a9ea19
Update pivot_role_omics_policy.py Applying StartRun to Workflow resource
ironspur5 Mar 19, 2024
07a5ca5
Update omics_workflows_fetcher.py fixing duplicate workflows in DB at…
ironspur5 Mar 22, 2024
d687b4a
Update omics_workflows_fetcher.py Removing private workflows until fu…
ironspur5 Mar 26, 2024
4f098b4
Added Omics toogle to environment as environment parameter
dlpzx Apr 3, 2024
0289122
Fix accountId and region from OmicsRun gql model
dlpzx Apr 3, 2024
8723d3e
Add search bar in OmicsWorkflows and filter in query
dlpzx Apr 3, 2024
c52875c
Merge branch 'main' into modularization/omics-module
dlpzx Apr 3, 2024
3ec41e3
Fix formatting for Omics
dlpzx Apr 3, 2024
8c31586
Fix duplicates in omics fetcher by looking at id
dlpzx Apr 3, 2024
5bc855d
Added tests and fixed omics fetcher
dlpzx Apr 3, 2024
55c0ab7
Merge branch 'main' into modularization/omics-module
dlpzx Apr 10, 2024
ae1df23
Modified code from new main features
dlpzx Apr 10, 2024
57002e0
Add omics tests and fix glitch
dlpzx Apr 10, 2024
88dab90
Formatting using ruff
dlpzx Apr 10, 2024
5d5c283
adding needed IAM permissions and trust relationship to environment a…
Apr 12, 2024
ccaadcb
Add checks for source None
dlpzx Apr 16, 2024
dff83c8
Remove unnecessary decoration in listOmicsRuns
dlpzx Apr 17, 2024
33b8d84
Merge branch 'main' into modularization/omics-module
dlpzx Apr 17, 2024
0c1382e
Update the omics migration script
dlpzx Apr 17, 2024
b397b0c
Fix has_group_permissions import
dlpzx Apr 17, 2024
0650dcc
Linting
dlpzx Apr 17, 2024
197d2bf
Merge branch 'main' into modularization/omics-module
dlpzx Apr 22, 2024
25785bd
added MUI Data Grid component to list and select Runs
Apr 30, 2024
47e3727
Fix permissions for run in Omics
dlpzx May 3, 2024
fed88af
Fix output S3 in list Runs
dlpzx May 3, 2024
607b197
Adding frontend button and initial logic for Delete Runs
May 5, 2024
4747083
Continuing adding deleteRuns backend and frontend code
May 7, 2024
b3de0b7
delete run backend clean up continued
May 10, 2024
89ba76a
placeholder code for delete runs unit tests
May 14, 2024
7f71160
Remove TODOs, revert changes in files that should not be edited
dlpzx May 14, 2024
d6954d4
removing unneeded comments and TODOs
May 14, 2024
f7f4b93
WIP delete runs testing
May 14, 2024
deca034
Change input type for deleteOmicsRun.js and fix minor issues
dlpzx May 15, 2024
099f43a
Fix order of giving permissions
dlpzx May 15, 2024
abe594a
Fix delete omics test bugs
dlpzx May 17, 2024
aa358f2
Merge branch 'refs/heads/main' into modularization/omics-module
dlpzx May 17, 2024
e5b3d7d
Fix alembic head for omics
dlpzx May 17, 2024
a28154e
Fix changes from main
dlpzx May 17, 2024
16576cc
linting
dlpzx May 17, 2024
3a0598e
Fix imports
dlpzx May 17, 2024
ce96ff9
finishing delete runs unit tests
May 17, 2024
c43797f
Merge branch 'refs/heads/main' into modularization/omics-module
dlpzx May 21, 2024
46d3876
Fix alembic, linting and integration tests with changes from main
dlpzx May 21, 2024
82e997c
Fix PR self-review
dlpzx May 21, 2024
a6214b6
Fix PR self-review - omics client without references to db objects
dlpzx May 21, 2024
77418a4
removing omics runs as environment resources
May 21, 2024
2387e0b
Addressing bulk of Noah's PR comments; will address the rest later th…
Jun 5, 2024
5c35cd0
Merge remote-tracking branch 'refs/remotes/origin/main' into modulari…
dlpzx Jun 7, 2024
a14c177
Fix migrations, PR comments and merge format
dlpzx Jun 7, 2024
0753a28
Move listS3DatasetsOwnedByEnvGroup to global services - shared by omi…
dlpzx Jun 7, 2024
0ebf4f3
Add query to listOmicsEnvironments in ECS task
dlpzx Jun 7, 2024
a0951bc
scoping pivot role permissions for Omics testing
Jun 10, 2024
f255f48
no environments case
dlpzx Jun 10, 2024
94a2797
addressing misc PR comments
Jun 11, 2024
f7deeb9
Merge remote-tracking branch 'refs/remotes/origin/main' into modulari…
dlpzx Jun 14, 2024
3ce3085
Fix tests and enable in config to have tests always enabled in PR
dlpzx Jun 14, 2024
5346eee
Disable omics from config.json
dlpzx Jun 14, 2024
d39fc19
linting
dlpzx Jun 14, 2024
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
6 changes: 3 additions & 3 deletions backend/dataall/base/cdkproxy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aws-cdk-lib==2.99.0
boto3==1.24.85
boto3-stubs==1.24.85
botocore==1.27.85
boto3==1.28.23
boto3-stubs==1.28.23
botocore==1.31.23
cdk-nag==2.7.2
constructs==10.0.73
starlette==0.36.3
Expand Down
noah-paige marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def generate_policies(self) -> [aws_iam.ManagedPolicy]:
'StringEquals': {
'iam:PassedToService': [
'glue.amazonaws.com',
'omics.amazonaws.com',
'lambda.amazonaws.com',
'sagemaker.amazonaws.com',
'states.amazonaws.com',
Expand Down
1 change: 1 addition & 0 deletions backend/dataall/core/environment/cdk/environment_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def create_group_environment_role(self, group: EnvironmentGroup, id: str):
iam.ServicePrincipal('databrew.amazonaws.com'),
iam.ServicePrincipal('codebuild.amazonaws.com'),
iam.ServicePrincipal('codepipeline.amazonaws.com'),
iam.ServicePrincipal('omics.amazonaws.com'),
self.pivot_role,
),
)
Expand Down
41 changes: 41 additions & 0 deletions backend/dataall/modules/omics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""Contains the code related to HealthOmics"""

import logging
from typing import Set, List, Type

from dataall.base.loader import ImportMode, ModuleInterface
from dataall.modules.omics.db.omics_repository import OmicsRepository

log = logging.getLogger(__name__)


class OmicsApiModuleInterface(ModuleInterface):
"""Implements ModuleInterface for omics GraphQl lambda"""

@staticmethod
def is_supported(modes: Set[ImportMode]) -> bool:
return ImportMode.API in modes

@staticmethod
def depends_on() -> List[Type['ModuleInterface']]:
from dataall.modules.s3_datasets import DatasetApiModuleInterface

return [DatasetApiModuleInterface]

def __init__(self):
import dataall.modules.omics.api

log.info('API of omics has been imported')


class OmicsCdkModuleInterface(ModuleInterface):
"""Implements ModuleInterface for omics ecs tasks"""

@staticmethod
def is_supported(modes: Set[ImportMode]) -> bool:
return ImportMode.CDK in modes

def __init__(self):
import dataall.modules.omics.cdk

log.info('API of Omics has been imported')
5 changes: 5 additions & 0 deletions backend/dataall/modules/omics/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""The package defines the schema for Omics Pipelines"""

from dataall.modules.omics.api import input_types, mutations, queries, types, resolvers

__all__ = ['types', 'input_types', 'queries', 'mutations', 'resolvers']
6 changes: 6 additions & 0 deletions backend/dataall/modules/omics/api/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from dataall.base.api.constants import GraphQLEnumMapper


class OmicsWorkflowType(GraphQLEnumMapper):
PRIVATE = 'PRIVATE'
READY2RUN = 'READY2RUN'
32 changes: 32 additions & 0 deletions backend/dataall/modules/omics/api/input_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""The module defines GraphQL input types for Omics Runs"""

from dataall.base.api import gql

NewOmicsRunInput = gql.InputType(
name='NewOmicsRunInput',
arguments=[
gql.Field('environmentUri', type=gql.NonNullableType(gql.String)),
gql.Field('workflowUri', type=gql.NonNullableType(gql.String)),
gql.Field('label', type=gql.NonNullableType(gql.String)),
gql.Field('destination', type=gql.String),
gql.Field('parameterTemplate', type=gql.String),
gql.Field('SamlAdminGroupName', type=gql.NonNullableType(gql.String)),
],
)

dlpzx marked this conversation as resolved.
Show resolved Hide resolved
OmicsFilter = gql.InputType(
name='OmicsFilter',
arguments=[
gql.Argument(name='term', type=gql.String),
gql.Argument(name='page', type=gql.Integer),
gql.Argument(name='pageSize', type=gql.Integer),
],
)

OmicsDeleteInput = gql.InputType(
name='OmicsDeleteInput',
arguments=[
gql.Argument(name='runUris', type=gql.NonNullableType(gql.ArrayType(gql.String))),
gql.Argument(name='deleteFromAWS', type=gql.Boolean),
],
)
20 changes: 20 additions & 0 deletions backend/dataall/modules/omics/api/mutations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""The module defines GraphQL mutations for Omics Pipelines"""

from dataall.base.api import gql
from .resolvers import create_omics_run, delete_omics_run
from .types import OmicsRun
from .input_types import NewOmicsRunInput, OmicsDeleteInput

createOmicsRun = gql.MutationField(
name='createOmicsRun',
type=OmicsRun,
args=[gql.Argument(name='input', type=gql.NonNullableType(NewOmicsRunInput))],
resolver=create_omics_run,
)

dlpzx marked this conversation as resolved.
Show resolved Hide resolved
deleteOmicsRun = gql.MutationField(
name='deleteOmicsRun',
type=gql.Boolean,
args=[gql.Argument(name='input', type=gql.NonNullableType(OmicsDeleteInput))],
resolver=delete_omics_run,
)
27 changes: 27 additions & 0 deletions backend/dataall/modules/omics/api/queries.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""The module defines GraphQL queries for Omics runs"""

from dataall.base.api import gql
from .resolvers import list_omics_runs, get_omics_workflow, list_omics_workflows
from .types import OmicsRunSearchResults, OmicsWorkflow, OmicsWorkflows
from .input_types import OmicsFilter

listOmicsRuns = gql.QueryField(
name='listOmicsRuns',
args=[gql.Argument(name='filter', type=OmicsFilter)],
resolver=list_omics_runs,
type=OmicsRunSearchResults,
)

getOmicsWorkflow = gql.QueryField(
name='getOmicsWorkflow',
args=[gql.Argument(name='workflowUri', type=gql.NonNullableType(gql.String))],
type=OmicsWorkflow,
resolver=get_omics_workflow,
)

listOmicsWorkflows = gql.QueryField(
name='listOmicsWorkflows',
args=[gql.Argument(name='filter', type=OmicsFilter)],
type=OmicsWorkflows,
resolver=list_omics_workflows,
)
76 changes: 76 additions & 0 deletions backend/dataall/modules/omics/api/resolvers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import logging
from dataall.base.api.context import Context
from dataall.base.db import exceptions
from dataall.modules.omics.services.omics_service import OmicsService
from dataall.modules.omics.db.omics_models import OmicsRun

log = logging.getLogger(__name__)


class RequestValidator:
"""Aggregates all validation logic for operating with omics"""

@staticmethod
def required_uri(uri):
if not uri:
raise exceptions.RequiredParameter('URI')

@staticmethod
def validate_creation_request(data):
required = RequestValidator._required
if not data:
raise exceptions.RequiredParameter('data')
if not data.get('label'):
raise exceptions.RequiredParameter('name')

required(data, 'environmentUri')
required(data, 'SamlAdminGroupName')
required(data, 'workflowUri')
required(data, 'parameterTemplate')
required(data, 'destination')

@staticmethod
def _required(data: dict, name: str):
if not data.get(name):
raise exceptions.RequiredParameter(name)


def create_omics_run(context: Context, source, input=None):
RequestValidator.validate_creation_request(input)
return OmicsService.create_omics_run(
uri=input['environmentUri'], admin_group=input['SamlAdminGroupName'], data=input
)


def list_omics_runs(context: Context, source, filter: dict = None):
if not filter:
filter = {}
return OmicsService.list_user_omics_runs(filter)


def list_omics_workflows(context: Context, source, filter: dict = None):
if not filter:
filter = {}
return OmicsService.list_omics_workflows(filter)


def get_omics_workflow(context: Context, source, workflowUri: str = None):
RequestValidator.required_uri(workflowUri)
return OmicsService.get_omics_workflow(workflowUri)


def delete_omics_run(context: Context, source, input):
RequestValidator.required_uri(input.get('runUris'))
return OmicsService.delete_omics_runs(uris=input.get('runUris'), delete_from_aws=input.get('deleteFromAWS', True))


def resolve_omics_workflow(context, source: OmicsRun, **kwargs):
if not source:
return None
return OmicsService.get_omics_workflow(source.workflowUri)


def resolve_omics_run_details(context, source: OmicsRun, **kwargs):
if not source:
return None
return OmicsService.get_omics_run_details_from_aws(source.runUri)
91 changes: 91 additions & 0 deletions backend/dataall/modules/omics/api/types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
from dataall.base.api import gql
from .resolvers import resolve_omics_workflow, resolve_omics_run_details
from dataall.core.organizations.api.resolvers import resolve_organization_by_env
from dataall.core.environment.api.resolvers import resolve_environment

OmicsWorkflow = gql.ObjectType(
name='OmicsWorkflow',
fields=[
gql.Field(name='workflowUri', type=gql.String),
gql.Field(name='id', type=gql.String),
gql.Field(name='arn', type=gql.String),
gql.Field(name='name', type=gql.String),
gql.Field(name='label', type=gql.String),
gql.Field(name='type', type=gql.String),
gql.Field(name='description', type=gql.String),
gql.Field(name='parameterTemplate', type=gql.String),
gql.Field(name='environmentUri', type=gql.String),
],
)

OmicsWorkflows = gql.ObjectType(
name='OmicsWorkflows',
fields=[
gql.Field(name='count', type=gql.Integer),
gql.Field(name='page', type=gql.Integer),
gql.Field(name='pages', type=gql.Integer),
gql.Field(name='hasNext', type=gql.Boolean),
gql.Field(name='hasPrevious', type=gql.Boolean),
gql.Field(name='nodes', type=gql.ArrayType(OmicsWorkflow)),
],
)

OmicsRunStatus = gql.ObjectType(
name='OmicsRunStatus',
fields=[gql.Field(name='status', type=gql.String), gql.Field(name='statusMessage', type=gql.String)],
)

dlpzx marked this conversation as resolved.
Show resolved Hide resolved

OmicsRun = gql.ObjectType(
name='OmicsRun',
fields=[
gql.Field('runUri', type=gql.ID),
gql.Field('environmentUri', type=gql.String),
gql.Field('organizationUri', type=gql.String),
gql.Field('name', type=gql.String),
gql.Field('label', type=gql.String),
gql.Field('description', type=gql.String),
gql.Field('tags', type=gql.ArrayType(gql.String)),
gql.Field('created', type=gql.String),
gql.Field('updated', type=gql.String),
gql.Field('owner', type=gql.String),
gql.Field('workflowUri', type=gql.String),
gql.Field('SamlAdminGroupName', type=gql.String),
gql.Field('parameterTemplate', type=gql.String),
gql.Field('outputDatasetUri', type=gql.String),
gql.Field('outputUri', type=gql.String),
gql.Field(
name='environment',
type=gql.Ref('Environment'),
resolver=resolve_environment,
),
gql.Field(
name='organization',
type=gql.Ref('Organization'),
resolver=resolve_organization_by_env,
),
gql.Field(
name='workflow',
type=OmicsWorkflow,
resolver=resolve_omics_workflow,
),
gql.Field(
name='status',
type=OmicsRunStatus,
resolver=resolve_omics_run_details,
),
],
)


OmicsRunSearchResults = gql.ObjectType(
name='OmicsRunSearchResults',
fields=[
gql.Field(name='count', type=gql.Integer),
gql.Field(name='page', type=gql.Integer),
gql.Field(name='pages', type=gql.Integer),
gql.Field(name='hasNext', type=gql.Boolean),
gql.Field(name='hasPrevious', type=gql.Boolean),
gql.Field(name='nodes', type=gql.ArrayType(OmicsRun)),
],
)
1 change: 1 addition & 0 deletions backend/dataall/modules/omics/aws/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Contains code that send requests to AWS using SDK (boto3)"""
Loading
Loading