@orcabus/platform-cdk-constructs 0.0.37 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +2 -2
- package/api-gateway/api-gateway.js +1 -1
- package/deployment-stack-pipeline/artifact-bucket.js +1 -1
- package/deployment-stack-pipeline/pipeline.js +1 -1
- package/dynamodb/index.js +2 -2
- package/ecs/index.js +1 -1
- package/lambda/index.js +1 -1
- package/lambda/layers/mart_tools/src/mart_tools/mart/models.py +0 -2
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/__init__.py +4 -4
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/globals.py +0 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/models.py +5 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/update_helpers.py +14 -18
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq/__init__.py +7 -3
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq/create_helpers.py +2 -2
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq/models.py +0 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq/update_helpers.py +5 -5
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq_decompression/globals.py +0 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq_decompression/update_helpers.py +1 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/icav2_wes/__init__.py +5 -5
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/icav2_wes/create_helpers.py +5 -5
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/icav2_wes/models.py +6 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/icav2_wes/update_helpers.py +12 -9
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/mart/models.py +0 -2
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/metadata/project_helpers.py +1 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/metadata/sample_helpers.py +2 -2
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/metadata/subject_helpers.py +4 -4
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/sequence/models.py +1 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/utils/requests_helpers.py +0 -2
- package/monitored-queue/index.js +1 -1
- package/named-lambda-role/index.js +1 -1
- package/package.json +1 -1
- package/provider-function/index.js +1 -1
- package/shared-config/networking.js +2 -2
- package/shared-config/slack.js +1 -1
package/.jsii
CHANGED
|
@@ -6756,6 +6756,6 @@
|
|
|
6756
6756
|
"symbolId": "shared-config/slack:SlackAlerts"
|
|
6757
6757
|
}
|
|
6758
6758
|
},
|
|
6759
|
-
"version": "0.0.
|
|
6760
|
-
"fingerprint": "
|
|
6759
|
+
"version": "0.0.38",
|
|
6760
|
+
"fingerprint": "4FjPVQ7u4dRTAh4I76FF/w9EfDixVRbUKYR3r1wD8kg="
|
|
6761
6761
|
}
|
|
@@ -15,7 +15,7 @@ const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
|
15
15
|
const aws_route53_targets_1 = require("aws-cdk-lib/aws-route53-targets");
|
|
16
16
|
const config_1 = require("./config");
|
|
17
17
|
class OrcaBusApiGateway extends constructs_1.Construct {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.apigateway.OrcaBusApiGateway", version: "0.0.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.apigateway.OrcaBusApiGateway", version: "0.0.38" };
|
|
19
19
|
/**
|
|
20
20
|
* The AWS region where the API Gateway is deployed.
|
|
21
21
|
*/
|
|
@@ -13,7 +13,7 @@ exports.CROSS_DEPLOYMENT_ARTIFACT_BUCKET_NAME = "orcabus-cross-deployment-codepi
|
|
|
13
13
|
exports.CROSS_DEPLOYMENT_ARTIFACT_KMS_ALIAS = "orcabus-cross-deployment-codepipeline-artifact";
|
|
14
14
|
exports.CROSS_DEPLOYMENT_ARTIFACT_KMS_ARN_SSM_PARAMETER_NAME = "/orcabus/deployment-stack-pipeline/artifact-bucket/kms-key-arn";
|
|
15
15
|
class CrossDeploymentArtifactBucket extends constructs_1.Construct {
|
|
16
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.CrossDeploymentArtifactBucket", version: "0.0.
|
|
16
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.CrossDeploymentArtifactBucket", version: "0.0.38" };
|
|
17
17
|
/**
|
|
18
18
|
* The S3 bucket used to store artifacts for cross-deployment pipelines.
|
|
19
19
|
*/
|
|
@@ -32,7 +32,7 @@ exports.DEFAULT_SYNTH_STEP_PARTIAL_BUILD_SPEC = {
|
|
|
32
32
|
* before using this construct.
|
|
33
33
|
*/
|
|
34
34
|
class DeploymentStackPipeline extends constructs_1.Construct {
|
|
35
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.DeploymentStackPipeline", version: "0.0.
|
|
35
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.DeploymentStackPipeline", version: "0.0.38" };
|
|
36
36
|
/**
|
|
37
37
|
* The code pipeline construct that is created.
|
|
38
38
|
*/
|
package/dynamodb/index.js
CHANGED
|
@@ -40,7 +40,7 @@ const dynamodb = __importStar(require("aws-cdk-lib/aws-dynamodb"));
|
|
|
40
40
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
41
41
|
const config_1 = require("./config");
|
|
42
42
|
class DynamoDbPartitionedConstruct extends constructs_1.Construct {
|
|
43
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbPartitionedConstruct", version: "0.0.
|
|
43
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbPartitionedConstruct", version: "0.0.38" };
|
|
44
44
|
table;
|
|
45
45
|
constructor(scope, id, props) {
|
|
46
46
|
super(scope, id);
|
|
@@ -75,7 +75,7 @@ class DynamoDbPartitionedConstruct extends constructs_1.Construct {
|
|
|
75
75
|
}
|
|
76
76
|
exports.DynamoDbPartitionedConstruct = DynamoDbPartitionedConstruct;
|
|
77
77
|
class DynamoDbNonPartitionedConstruct extends constructs_1.Construct {
|
|
78
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbNonPartitionedConstruct", version: "0.0.
|
|
78
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbNonPartitionedConstruct", version: "0.0.38" };
|
|
79
79
|
table;
|
|
80
80
|
constructor(scope, id, props) {
|
|
81
81
|
super(scope, id);
|
package/ecs/index.js
CHANGED
|
@@ -55,7 +55,7 @@ exports.LAMBDA_ARCHITECTURE_MAP = {
|
|
|
55
55
|
['ARM64']: lambda.Architecture.ARM_64
|
|
56
56
|
};
|
|
57
57
|
class EcsFargateTaskConstruct extends constructs_1.Construct {
|
|
58
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.ecs.EcsFargateTaskConstruct", version: "0.0.
|
|
58
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.ecs.EcsFargateTaskConstruct", version: "0.0.38" };
|
|
59
59
|
cluster;
|
|
60
60
|
taskDefinition;
|
|
61
61
|
taskExecutionRole;
|
package/lambda/index.js
CHANGED
|
@@ -56,7 +56,7 @@ function getPythonUvDockerImage() {
|
|
|
56
56
|
return aws_cdk_lib_1.DockerImage.fromBuild(path_1.default.join(__dirname, 'build_python'));
|
|
57
57
|
}
|
|
58
58
|
class PythonUvFunction extends aws_lambda_python_alpha_1.PythonFunction {
|
|
59
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.lambda.PythonUvFunction", version: "0.0.
|
|
59
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.lambda.PythonUvFunction", version: "0.0.38" };
|
|
60
60
|
// Class constructs, to be used for caching the layers
|
|
61
61
|
// This means that if there are multiple lambdas throughout the stack
|
|
62
62
|
// They will all use the same layer
|
|
@@ -41,21 +41,21 @@ def get_data_sharing_request_response_results(
|
|
|
41
41
|
|
|
42
42
|
def data_sharing_patch_request(
|
|
43
43
|
endpoint: str,
|
|
44
|
-
|
|
44
|
+
json_data: Optional[Dict] = None,
|
|
45
45
|
):
|
|
46
46
|
return patch_request(
|
|
47
47
|
url=get_data_sharing_url(endpoint),
|
|
48
|
-
|
|
48
|
+
json_data=json_data
|
|
49
49
|
)
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
def data_sharing_post_request(
|
|
53
53
|
endpoint: str,
|
|
54
|
-
|
|
54
|
+
json_data: Optional[Dict] = None,
|
|
55
55
|
):
|
|
56
56
|
return patch_request(
|
|
57
57
|
url=get_data_sharing_url(endpoint),
|
|
58
|
-
|
|
58
|
+
json_data=json_data
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
|
|
@@ -17,7 +17,6 @@ PushJobStatusType = Literal[
|
|
|
17
17
|
]
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
class PackageObject(TypedDict):
|
|
22
21
|
id: str
|
|
23
22
|
packageName: str
|
|
@@ -26,3 +25,8 @@ class PackageObject(TypedDict):
|
|
|
26
25
|
requestTime: str
|
|
27
26
|
completionTime: NotRequired[str]
|
|
28
27
|
hasExpired: NotRequired[bool]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class JobPatchParameters(TypedDict):
|
|
31
|
+
status: str
|
|
32
|
+
errorMessage: NotRequired[str]
|
package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/update_helpers.py
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Unpack
|
|
2
2
|
|
|
3
3
|
from . import data_sharing_patch_request
|
|
4
4
|
from .globals import PACKAGE_ENDPOINT, PUSH_ENDPOINT
|
|
5
|
-
from .models import
|
|
5
|
+
from .models import PackageObject, JobPatchParameters
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def update_package_status(
|
|
9
9
|
package_id: str,
|
|
10
|
-
|
|
11
|
-
error_message: Optional[str] = None
|
|
10
|
+
**kwargs: Unpack[JobPatchParameters]
|
|
12
11
|
) -> PackageObject:
|
|
13
12
|
"""
|
|
14
13
|
Add QC stats to a fastq_id.
|
|
15
14
|
|
|
16
15
|
:param package_id: The package id
|
|
17
|
-
:param
|
|
18
|
-
:param error_message: Optional error message
|
|
16
|
+
:param kwargs: JobPatchParameters to update the package with.
|
|
19
17
|
"""
|
|
18
|
+
# Raise error if any of the kwargs are not in the FastqListRowQueryParameters
|
|
19
|
+
for key in kwargs.keys():
|
|
20
|
+
if key not in JobPatchParameters.__annotations__:
|
|
21
|
+
raise ValueError(f"Invalid parameter: {key}")
|
|
22
|
+
|
|
20
23
|
return data_sharing_patch_request(
|
|
21
24
|
f"{PACKAGE_ENDPOINT}/{package_id}",
|
|
22
|
-
|
|
25
|
+
json_data=dict(filter(
|
|
23
26
|
lambda x: x[1] is not None,
|
|
24
|
-
|
|
25
|
-
"status": package_status,
|
|
26
|
-
"error_message": error_message
|
|
27
|
-
}.items()
|
|
27
|
+
kwargs.items()
|
|
28
28
|
))
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def update_push_job_status(
|
|
33
33
|
push_job_id: str,
|
|
34
|
-
|
|
35
|
-
error_message: Optional[str] = None
|
|
34
|
+
**kwargs: Unpack[JobPatchParameters]
|
|
36
35
|
) -> PackageObject:
|
|
37
36
|
"""
|
|
38
37
|
Add push job status to a push job.
|
|
@@ -43,11 +42,8 @@ def update_push_job_status(
|
|
|
43
42
|
"""
|
|
44
43
|
return data_sharing_patch_request(
|
|
45
44
|
f"{PUSH_ENDPOINT}/{push_job_id}",
|
|
46
|
-
|
|
45
|
+
json_data=dict(filter(
|
|
47
46
|
lambda x: x[1] is not None,
|
|
48
|
-
|
|
49
|
-
"status": push_job_status,
|
|
50
|
-
"error_message": error_message
|
|
51
|
-
}.items()
|
|
47
|
+
kwargs.items()
|
|
52
48
|
))
|
|
53
49
|
)
|
|
@@ -40,27 +40,31 @@ def get_fastq_request_response_results(
|
|
|
40
40
|
):
|
|
41
41
|
return get_request_response_results(
|
|
42
42
|
url=get_fastq_url(endpoint),
|
|
43
|
-
params=params
|
|
43
|
+
params=params,
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
def fastq_patch_request(
|
|
48
48
|
endpoint: str,
|
|
49
49
|
params: Optional[Dict] = None,
|
|
50
|
+
json_data: Optional[Dict] = None,
|
|
50
51
|
):
|
|
51
52
|
return patch_request(
|
|
52
53
|
url=get_fastq_url(endpoint),
|
|
53
|
-
params=params
|
|
54
|
+
params=params,
|
|
55
|
+
json_data=json_data,
|
|
54
56
|
)
|
|
55
57
|
|
|
56
58
|
|
|
57
59
|
def fastq_post_request(
|
|
58
60
|
endpoint: str,
|
|
59
61
|
params: Optional[Dict] = None,
|
|
62
|
+
json_data: Optional[Dict] = None,
|
|
60
63
|
):
|
|
61
64
|
return post_request(
|
|
62
65
|
url=get_fastq_url(endpoint),
|
|
63
|
-
params=params
|
|
66
|
+
params=params,
|
|
67
|
+
json_data=json_data,
|
|
64
68
|
)
|
|
65
69
|
|
|
66
70
|
|
|
@@ -41,7 +41,7 @@ def create_fastq_object(**kwargs: Unpack[FastqCreate]) -> Fastq:
|
|
|
41
41
|
return Fastq(
|
|
42
42
|
**fastq_post_request(
|
|
43
43
|
endpoint=FASTQ_ENDPOINT,
|
|
44
|
-
|
|
44
|
+
json_data=dict(kwargs)
|
|
45
45
|
)
|
|
46
46
|
)
|
|
47
47
|
|
|
@@ -59,6 +59,6 @@ def create_fastq_set_object(**kwargs: Unpack[FastqSetCreate]) -> FastqSet:
|
|
|
59
59
|
return FastqSet(
|
|
60
60
|
**fastq_post_request(
|
|
61
61
|
endpoint=FASTQ_SET_ENDPOINT,
|
|
62
|
-
|
|
62
|
+
json_data=dict(kwargs)
|
|
63
63
|
)
|
|
64
64
|
)
|
|
@@ -37,7 +37,7 @@ def add_qc_stats(fastq_id: str, qc_stats: QcStats) -> Fastq:
|
|
|
37
37
|
|
|
38
38
|
return fastq_patch_request(
|
|
39
39
|
f"{FASTQ_ENDPOINT}/{fastq_id}/addQcStats",
|
|
40
|
-
|
|
40
|
+
json_data=dict(qc_stats)
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
|
|
@@ -54,7 +54,7 @@ def add_read_count(fastq_id: str, read_count: ReadCount) -> Fastq:
|
|
|
54
54
|
|
|
55
55
|
return fastq_patch_request(
|
|
56
56
|
f"{FASTQ_ENDPOINT}/{fastq_id}/addReadCount",
|
|
57
|
-
|
|
57
|
+
json_data=dict(read_count)
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
|
|
@@ -71,7 +71,7 @@ def add_file_compression_information(fastq_id: str, file_compression_information
|
|
|
71
71
|
|
|
72
72
|
return fastq_patch_request(
|
|
73
73
|
f"{FASTQ_ENDPOINT}/{fastq_id}/addFileCompressionInformation",
|
|
74
|
-
|
|
74
|
+
json_data=dict(file_compression_information)
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
|
|
@@ -88,7 +88,7 @@ def add_ntsm_storage_object(fastq_id: str, ntsm_fastq_storage_object: FileStorag
|
|
|
88
88
|
|
|
89
89
|
return fastq_patch_request(
|
|
90
90
|
f"{FASTQ_ENDPOINT}/{fastq_id}/addNtsmStorageObject",
|
|
91
|
-
|
|
91
|
+
json_data=dict(ntsm_fastq_storage_object)
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
|
|
@@ -105,7 +105,7 @@ def add_read_set(fastq_id: str, read_set: ReadSet) -> Fastq:
|
|
|
105
105
|
|
|
106
106
|
return fastq_patch_request(
|
|
107
107
|
f"{FASTQ_ENDPOINT}/{fastq_id}/addFastqPairStorageObject",
|
|
108
|
-
|
|
108
|
+
json_data=dict(read_set)
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
from typing import Optional, Dict
|
|
5
5
|
|
|
6
6
|
from .globals import ICAV2_WES_SUBDOMAIN_NAME
|
|
7
|
-
from .models import
|
|
7
|
+
from .models import WESPostRequest
|
|
8
8
|
from ..utils.requests_helpers import (
|
|
9
9
|
get_request, get_url, patch_request, get_request_response_results, post_request
|
|
10
10
|
)
|
|
@@ -45,22 +45,22 @@ def get_icav2_wes_request_response_results(
|
|
|
45
45
|
|
|
46
46
|
def icav2_wes_patch_request(
|
|
47
47
|
endpoint: str,
|
|
48
|
-
|
|
48
|
+
json_data: Optional[Dict] = None,
|
|
49
49
|
):
|
|
50
50
|
return patch_request(
|
|
51
51
|
url=get_icav2_wes_url(endpoint),
|
|
52
|
-
|
|
52
|
+
json_data=json_data
|
|
53
53
|
)
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
def icav2_wes_post_request(
|
|
57
57
|
endpoint: str,
|
|
58
|
-
|
|
58
|
+
json_data: Dict
|
|
59
59
|
):
|
|
60
60
|
# Confirm param keys are valid
|
|
61
61
|
return post_request(
|
|
62
62
|
url=get_icav2_wes_url(endpoint),
|
|
63
|
-
|
|
63
|
+
json_data=json_data
|
|
64
64
|
)
|
|
65
65
|
|
|
66
66
|
|
|
@@ -8,22 +8,22 @@ from typing import Unpack
|
|
|
8
8
|
|
|
9
9
|
from . import icav2_wes_post_request
|
|
10
10
|
from .globals import ANALYSES_ENDPOINT
|
|
11
|
-
from .models import
|
|
11
|
+
from .models import WESPostRequest, WESResponse
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def create_icav2_wes_analysis(
|
|
15
|
-
**kwargs: Unpack[
|
|
15
|
+
**kwargs: Unpack[WESPostRequest]
|
|
16
16
|
) -> WESResponse:
|
|
17
17
|
"""
|
|
18
18
|
Launch an icav2 analysis in the ICAV2 WES API.
|
|
19
19
|
"""
|
|
20
20
|
# Confirm param keys are valid
|
|
21
21
|
for key in kwargs.keys():
|
|
22
|
-
if key not in
|
|
23
|
-
raise ValueError(f"Invalid parameter key: {key}. Valid keys are: {', '.join(
|
|
22
|
+
if key not in WESPostRequest.__annotations__:
|
|
23
|
+
raise ValueError(f"Invalid parameter key: {key}. Valid keys are: {', '.join(WESPostRequest.__annotations__.keys())}")
|
|
24
24
|
|
|
25
25
|
# Confirm param values are valid
|
|
26
26
|
return icav2_wes_post_request(
|
|
27
27
|
ANALYSES_ENDPOINT,
|
|
28
|
-
|
|
28
|
+
json_data=dict(**kwargs)
|
|
29
29
|
)
|
|
@@ -25,7 +25,7 @@ class EngineParameters(TypedDict):
|
|
|
25
25
|
logsUri: str
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
class
|
|
28
|
+
class WESPostRequest(TypedDict):
|
|
29
29
|
"""WES request object."""
|
|
30
30
|
name: str
|
|
31
31
|
inputs: Dict[str, Any]
|
|
@@ -33,6 +33,11 @@ class WESRequest(TypedDict):
|
|
|
33
33
|
tags: NotRequired[Dict[str, Any]]
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
class WESPatchRequest(TypedDict):
|
|
37
|
+
status: str
|
|
38
|
+
icav2AnalysisId: NotRequired[str]
|
|
39
|
+
|
|
40
|
+
|
|
36
41
|
class WESResponse(TypedDict):
|
|
37
42
|
"""WES response object."""
|
|
38
43
|
id: str
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Unpack
|
|
3
3
|
|
|
4
4
|
from . import icav2_wes_patch_request
|
|
5
5
|
from .globals import ANALYSES_ENDPOINT
|
|
6
|
-
from .models import WESResponse
|
|
6
|
+
from .models import WESResponse, WESPatchRequest
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
# Get the icav2 wes analysis by analysis name
|
|
9
10
|
def update_icav2_wes_analysis_status(
|
|
10
11
|
icav2_wes_orcabus_id: str,
|
|
11
|
-
|
|
12
|
-
icav2_analysis_id: Optional[str] = None
|
|
12
|
+
**kwargs: Unpack[WESPatchRequest]
|
|
13
13
|
) -> WESResponse:
|
|
14
14
|
"""
|
|
15
15
|
Get the icav2 wes analysis by analysis name
|
|
16
16
|
"""
|
|
17
|
+
# Confirm param keys are valid
|
|
18
|
+
for key in kwargs.keys():
|
|
19
|
+
if key not in WESPatchRequest.__annotations__:
|
|
20
|
+
raise ValueError(f"Invalid parameter key: {key}. Valid keys are: {', '.join(WESPatchRequest.__annotations__.keys())}")
|
|
21
|
+
|
|
22
|
+
|
|
17
23
|
return icav2_wes_patch_request(
|
|
18
24
|
f"{ANALYSES_ENDPOINT}/{icav2_wes_orcabus_id}",
|
|
19
|
-
|
|
25
|
+
json_data=dict(filter(
|
|
20
26
|
lambda kv_iter_: kv_iter_[1] is not None,
|
|
21
|
-
|
|
22
|
-
"status": status,
|
|
23
|
-
"icav2AnalysisId": icav2_analysis_id
|
|
24
|
-
}.items()
|
|
27
|
+
kwargs.items()
|
|
25
28
|
))
|
|
26
29
|
)
|
|
@@ -42,7 +42,7 @@ def get_project_from_project_id(project_id: str) -> Project:
|
|
|
42
42
|
def get_projects_list_from_project_id_list(project_id_list: List[str], accept_missing: bool = False) -> List[Project]:
|
|
43
43
|
"""
|
|
44
44
|
Get project from the project id
|
|
45
|
-
:param
|
|
45
|
+
:param project_id_list:
|
|
46
46
|
:return:
|
|
47
47
|
"""
|
|
48
48
|
# We have an internal id, convert to int
|
|
@@ -44,7 +44,7 @@ def get_sample_from_sample_id(sample_id: str) -> Sample:
|
|
|
44
44
|
def get_samples_list_from_sample_id_list(sample_id_list: List[str], accept_missing: bool = False) -> List[Sample]:
|
|
45
45
|
"""
|
|
46
46
|
Get sample from the sample id
|
|
47
|
-
:param
|
|
47
|
+
:param sample_id_list:
|
|
48
48
|
:return:
|
|
49
49
|
"""
|
|
50
50
|
# We have an internal id, convert to int
|
|
@@ -88,7 +88,7 @@ def get_sample_from_sample_orcabus_id(sample_orcabus_id: str) -> Sample:
|
|
|
88
88
|
def get_samples_list_from_sample_orcabus_id_list(sample_orcabus_id_list: List[str], accept_missing: bool = False) -> List[Project]:
|
|
89
89
|
"""
|
|
90
90
|
Get sample from the sample id
|
|
91
|
-
:param
|
|
91
|
+
:param sample_orcabus_id_list:
|
|
92
92
|
:return:
|
|
93
93
|
"""
|
|
94
94
|
# We have an internal id, convert to int
|
|
@@ -40,8 +40,8 @@ def get_subject_from_subject_id(subject_id: str) -> Subject:
|
|
|
40
40
|
|
|
41
41
|
def get_subjects_list_from_subject_id_list(subject_id_list: List[str], accept_missing: bool = False) -> List[Sample]:
|
|
42
42
|
"""
|
|
43
|
-
Get
|
|
44
|
-
:param
|
|
43
|
+
Get subject objects from subject id list
|
|
44
|
+
:param subject_id_list:
|
|
45
45
|
:return:
|
|
46
46
|
"""
|
|
47
47
|
# We have an internal id, convert to int
|
|
@@ -74,8 +74,8 @@ def get_subject_orcabus_id_from_subject_id(subject_id: str) -> str:
|
|
|
74
74
|
|
|
75
75
|
def get_subjects_list_from_subject_orcabus_id_list(subject_orcabus_id_list: List[str], accept_missing: bool = False) -> List[Sample]:
|
|
76
76
|
"""
|
|
77
|
-
Get
|
|
78
|
-
:param
|
|
77
|
+
Get subject objects from subject orcabus id list
|
|
78
|
+
:param subject_orcabus_id_list:
|
|
79
79
|
:return:
|
|
80
80
|
"""
|
|
81
81
|
# We have an internal id, convert to int
|
package/monitored-queue/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const aws_cloudwatch_actions_1 = require("aws-cdk-lib/aws-cloudwatch-actions");
|
|
|
13
13
|
* SNS topic.
|
|
14
14
|
*/
|
|
15
15
|
class MonitoredQueue extends constructs_1.Construct {
|
|
16
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.monitoredQueue.MonitoredQueue", version: "0.0.
|
|
16
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.monitoredQueue.MonitoredQueue", version: "0.0.38" };
|
|
17
17
|
queue;
|
|
18
18
|
deadLetterQueue;
|
|
19
19
|
alarm;
|
|
@@ -7,7 +7,7 @@ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
|
|
|
7
7
|
* A construct which represents a named role that a Lambda function can assume.
|
|
8
8
|
*/
|
|
9
9
|
class NamedLambdaRole extends aws_iam_1.Role {
|
|
10
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.namedLambdaRole.NamedLambdaRole", version: "0.0.
|
|
10
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.namedLambdaRole.NamedLambdaRole", version: "0.0.38" };
|
|
11
11
|
constructor(scope, id, props) {
|
|
12
12
|
super(scope, id, {
|
|
13
13
|
assumedBy: new aws_iam_1.ServicePrincipal("lambda.amazonaws.com"),
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
|
15
15
|
* to the provider framework.
|
|
16
16
|
*/
|
|
17
17
|
class ProviderFunction extends constructs_1.Construct {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.provider.ProviderFunction", version: "0.0.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.provider.ProviderFunction", version: "0.0.38" };
|
|
19
19
|
_function;
|
|
20
20
|
_response;
|
|
21
21
|
constructor(scope, id, props) {
|
|
@@ -23,7 +23,7 @@ exports.VPC_LOOKUP_PROPS = {
|
|
|
23
23
|
* Helper for looking up the shared OrcaBus VPC.
|
|
24
24
|
*/
|
|
25
25
|
class OrcaBusVpc {
|
|
26
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusVpc", version: "0.0.
|
|
26
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusVpc", version: "0.0.38" };
|
|
27
27
|
/**
|
|
28
28
|
* The shared VPC that is used by OrcaBus.
|
|
29
29
|
* @param scope
|
|
@@ -42,7 +42,7 @@ exports.SHARED_SECURITY_GROUP_NAME = "OrcaBusSharedComputeSecurityGroup";
|
|
|
42
42
|
* Helper for looking up the shared compute security group by name.
|
|
43
43
|
*/
|
|
44
44
|
class OrcaBusSharedComputeSecurityGroup {
|
|
45
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusSharedComputeSecurityGroup", version: "0.0.
|
|
45
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusSharedComputeSecurityGroup", version: "0.0.38" };
|
|
46
46
|
/**
|
|
47
47
|
* The shared security group that is used by compute resources to access the database.
|
|
48
48
|
* @param scope
|
package/shared-config/slack.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.SLACK_ALERTS_SNS_TOPIC = "AwsChatBotTopic-alerts";
|
|
|
11
11
|
* A helper class to construct the arn for the slack SNS topic.
|
|
12
12
|
*/
|
|
13
13
|
class SlackAlerts {
|
|
14
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.slack.SlackAlerts", version: "0.0.
|
|
14
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.slack.SlackAlerts", version: "0.0.38" };
|
|
15
15
|
/**
|
|
16
16
|
* Format the ARN for the slack alerts SNS topic for the current stack.
|
|
17
17
|
* @param stack
|