@orcabus/platform-cdk-constructs 0.0.44 → 0.0.46

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 CHANGED
@@ -6756,6 +6756,6 @@
6756
6756
  "symbolId": "shared-config/slack:SlackAlerts"
6757
6757
  }
6758
6758
  },
6759
- "version": "0.0.44",
6760
- "fingerprint": "arsb/LGcRULLZhW7yVeQPPrQ6Xufpe98A6X9G62fzCM="
6759
+ "version": "0.0.46",
6760
+ "fingerprint": "wq/3vu0Z5vehQmydjFGp9Xs6zhtw4bSqWMa+sy2zW+0="
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.44" };
18
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.apigateway.OrcaBusApiGateway", version: "0.0.46" };
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.44" };
16
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.CrossDeploymentArtifactBucket", version: "0.0.46" };
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.44" };
35
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.DeploymentStackPipeline", version: "0.0.46" };
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.44" };
43
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbPartitionedConstruct", version: "0.0.46" };
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.44" };
78
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbNonPartitionedConstruct", version: "0.0.46" };
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.44" };
58
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.ecs.EcsFargateTaskConstruct", version: "0.0.46" };
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.44" };
59
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.lambda.PythonUvFunction", version: "0.0.46" };
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
@@ -59,12 +59,21 @@ def data_sharing_post_request(
59
59
  )
60
60
 
61
61
 
62
+ from .query_helpers import (
63
+ get_package,
64
+ get_push_job
65
+ )
66
+
62
67
  from .update_helpers import (
63
68
  update_package_status,
64
69
  update_push_job_status,
65
70
  )
66
71
 
67
72
  __all__ = [
73
+ # Get helpers
74
+ "get_package",
75
+ "get_push_job",
76
+ # Push job helpers
68
77
  "update_package_status",
69
78
  "update_push_job_status",
70
79
  ]
@@ -1,3 +1,4 @@
1
+ from datetime import datetime
1
2
  from typing import Literal, TypedDict, NotRequired, Union
2
3
 
3
4
  PackageStatusType = Literal[
@@ -17,7 +18,7 @@ PushJobStatusType = Literal[
17
18
  ]
18
19
 
19
20
 
20
- class PackageObject(TypedDict):
21
+ class PackageObjectDict(TypedDict):
21
22
  id: str
22
23
  packageName: str
23
24
  stepsExecutionArn: str
@@ -27,6 +28,18 @@ class PackageObject(TypedDict):
27
28
  hasExpired: NotRequired[bool]
28
29
 
29
30
 
31
+ class PushJobObjectDict(TypedDict):
32
+ id: str
33
+ stepFunctionsExecutionArn: str
34
+ status: PushJobStatusType
35
+ startTime: str
36
+ packageId: str
37
+ shareDestination: str
38
+ logUri: NotRequired[str]
39
+ endTime: NotRequired[str]
40
+ errorMessages: NotRequired[str]
41
+
42
+
30
43
  class JobPatchParameters(TypedDict):
31
44
  status: Union[PackageStatusType, PushJobStatusType]
32
45
  errorMessage: NotRequired[str]
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env python3
2
+ from .globals import PACKAGE_ENDPOINT, PUSH_ENDPOINT
3
+ from .models import PackageObjectDict, PushJobObjectDict
4
+ from . import get_data_sharing_request
5
+
6
+ def get_package(
7
+ package_id: str,
8
+ ) -> PackageObjectDict:
9
+ """
10
+ Add QC stats to a fastq_id.
11
+
12
+ :param package_id: The package id
13
+ :param kwargs: JobPatchParameters to update the package with.
14
+ """
15
+ return get_data_sharing_request(
16
+ f"{PACKAGE_ENDPOINT}/{package_id}"
17
+ )
18
+
19
+
20
+ def get_push_job(
21
+ push_job_id: str,
22
+ ) -> PushJobObjectDict:
23
+ """
24
+ Add push job status to a push job.
25
+
26
+ :param push_job_id: The push job id
27
+ :param push_job_status: The push job status to set
28
+ :param error_message: Optional error message
29
+ """
30
+ return get_data_sharing_request(
31
+ f"{PUSH_ENDPOINT}/{push_job_id}",
32
+ )
@@ -2,13 +2,13 @@ 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 PackageObject, JobPatchParameters
5
+ from .models import PackageObjectDict, JobPatchParameters, PushJobObjectDict
6
6
 
7
7
 
8
8
  def update_package_status(
9
9
  package_id: str,
10
10
  **kwargs: Unpack[JobPatchParameters]
11
- ) -> PackageObject:
11
+ ) -> PackageObjectDict:
12
12
  """
13
13
  Add QC stats to a fastq_id.
14
14
 
@@ -32,7 +32,7 @@ def update_package_status(
32
32
  def update_push_job_status(
33
33
  push_job_id: str,
34
34
  **kwargs: Unpack[JobPatchParameters]
35
- ) -> PackageObject:
35
+ ) -> PushJobObjectDict:
36
36
  """
37
37
  Add push job status to a push job.
38
38
 
@@ -28,7 +28,8 @@ def update_multiqc_job_status(
28
28
  job_id: str,
29
29
  status: str,
30
30
  steps_execution_arn: Optional[str] = None,
31
- output_uri: Optional[str] = None
31
+ html_output_uri: Optional[str] = None,
32
+ parquet_output_uri: Optional[str] = None
32
33
  ):
33
34
  """
34
35
  Update the status of a MultiQC job.
@@ -36,7 +37,8 @@ def update_multiqc_job_status(
36
37
  :param job_id: The unique identifier of the MultiQC job.
37
38
  :param status: The new status of the job (e.g., "running", "completed", "failed").
38
39
  :param steps_execution_arn: (Optional) The ARN of the step function execution associated with the job.
39
- :param output_uri: (Optional) The URI of the output MultiQC report.
40
+ :param html_output_uri: (Optional) The URI of the output MultiQC report.
41
+ :param parquet_output_uri: (Optional) The URI of the output MultiQC parquet file.
40
42
  :return: The response from the fastq_patch_request function.
41
43
  """
42
44
  return fastq_patch_request(
@@ -46,7 +48,12 @@ def update_multiqc_job_status(
46
48
  {
47
49
  "status": status,
48
50
  "stepsExecutionArn": steps_execution_arn,
49
- "multiqcOutputHtmlUri": output_uri
51
+ "multiqcHtml": ({
52
+ "s3Uri": html_output_uri
53
+ }) if html_output_uri else None,
54
+ "multiqcParquet": ({
55
+ "s3Uri": parquet_output_uri
56
+ }) if parquet_output_uri else None
50
57
  }.items())
51
58
  )
52
59
  )
@@ -15,6 +15,8 @@ from typing import (
15
15
  TypedDict, NotRequired, Literal, List, Union
16
16
  )
17
17
 
18
+ from app.interface.jobs_api.models import ReadCountCalculationOutputObject
19
+
18
20
  JobType = Literal['FASTQ_DECOMPRESSION']
19
21
  JobStatusType = Literal['PENDING', 'RUNNING', 'FAILED', 'ABORTED', 'SUCCEEDED']
20
22
 
@@ -66,7 +68,8 @@ class RawMd5sumCalculationOutputObject(TypedDict):
66
68
  JobOutputType = Union[
67
69
  DecompressionJobOutputObject |
68
70
  GzipFileSizeCalculationOutputObject |
69
- RawMd5sumCalculationOutputObject
71
+ RawMd5sumCalculationOutputObject |
72
+ ReadCountCalculationOutputObject
70
73
  ]
71
74
 
72
75
  class Job(TypedDict):
@@ -86,6 +89,7 @@ class JobCreateParameters(TypedDict):
86
89
  maxReads: NotRequired[int]
87
90
  outputUriPrefix: NotRequired[str]
88
91
  sampling: NotRequired[bool]
92
+ noSplitByLane: NotRequired[bool]
89
93
 
90
94
 
91
95
  class JobQueryParameters(TypedDict):
@@ -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.44" };
16
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.monitoredQueue.MonitoredQueue", version: "0.0.46" };
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.44" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.namedLambdaRole.NamedLambdaRole", version: "0.0.46" };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orcabus/platform-cdk-constructs",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "description": "CDK Package for OrcaBus infrastructure.",
5
5
  "main": "index.ts",
6
6
  "types": "index.d.ts",
@@ -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.44" };
18
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.provider.ProviderFunction", version: "0.0.46" };
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.44" };
26
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusVpc", version: "0.0.46" };
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.44" };
45
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusSharedComputeSecurityGroup", version: "0.0.46" };
46
46
  /**
47
47
  * The shared security group that is used by compute resources to access the database.
48
48
  * @param scope
@@ -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.44" };
14
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.slack.SlackAlerts", version: "0.0.46" };
15
15
  /**
16
16
  * Format the ARN for the slack alerts SNS topic for the current stack.
17
17
  * @param stack