Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

markjschreiber/clean-up-codebase #98

Merged
merged 2 commits into from
Oct 18, 2021
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
2 changes: 1 addition & 1 deletion packages/cdk/lib/roles/cromwell-engine-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as iam from "monocdk/aws-iam";
import { PolicyOptions } from "../types/engine-options";
import { BucketOperations } from "../../common/BucketOperations";
import { CromwellBatchPolicy } from "./policies/cromwell-batch-policy";
import { Arn, ArnComponents, Stack } from "monocdk";
import { Arn, Stack } from "monocdk";

interface CromwellEngineRoleProps {
readOnlyBucketArns: string[];
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk/lib/roles/nextflow-adapter-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as cdk from "monocdk";
import * as iam from "monocdk/aws-iam";
import { NextflowAdapterBatchPolicy, NextflowSubmitJobBatchPolicyProps } from "./policies/nextflow-adapter-batch-policy";
import { BucketOperations } from "../../common/BucketOperations";
import { Arn, ArnComponents } from "monocdk";
import { Arn } from "monocdk";
import { Stack } from "monocdk";

export interface NextflowAdapterRoleProps extends NextflowSubmitJobBatchPolicyProps {
Expand Down
6 changes: 3 additions & 3 deletions packages/cdk/lib/roles/nextflow-engine-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import * as cdk from "monocdk";
import * as iam from "monocdk/aws-iam";
import { PolicyOptions } from "../types/engine-options";
import { BucketOperations } from "../../common/BucketOperations";
import { NextflowEngineBatchPolicy, NextflowBatchPolicyProps } from "./policies/nextflow-engine-batch-policy";
import { NextflowAdapterBatchPolicy, NextflowSubmitJobBatchPolicyProps } from "./policies/nextflow-adapter-batch-policy";
import { Arn, ArnComponents, Stack } from "monocdk";
import { NextflowEngineBatchPolicy } from "./policies/nextflow-engine-batch-policy";
import { NextflowAdapterBatchPolicy } from "./policies/nextflow-adapter-batch-policy";
import { Arn, Stack } from "monocdk";

interface NextflowEngineRoleProps {
readOnlyBucketArns: string[];
Expand Down
1 change: 0 additions & 1 deletion packages/cdk/lib/stacks/context-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { ContextAppParameters } from "../env";
import { BatchStack, BatchStackProps } from "./nested/batch-stack";
import { CromwellEngineStack } from "./nested/cromwell-engine-stack";
import { NextflowEngineStack } from "./nested/nextflow-engine-stack";
import { ManagedPolicy } from "monocdk/aws-iam";

export interface ContextStackProps extends StackProps {
readonly contextParameters: ContextAppParameters;
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk/lib/stacks/nested/cromwell-engine-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CloudMapOptions, FargateTaskDefinition, LogDriver } from "monocdk/aws-e
import { Construct } from "constructs";
import { ApiProxy, SecureService } from "../../constructs";
import { PrivateDnsNamespace } from "monocdk/aws-servicediscovery";
import { IRole, Role, ServicePrincipal } from "monocdk/aws-iam";
import { IRole } from "monocdk/aws-iam";
import { createEcrImage, renderServiceWithContainer, renderServiceWithTaskDefinition } from "../../util";
import { APP_NAME } from "../../constants";
import { Bucket } from "monocdk/aws-s3";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/cmd/application/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ slug: %s

type mainVars struct {
docPath string
format string
format string
}

func init() {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/internal/pkg/cli/describe_output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestDescribeOutput(t *testing.T) {
expectedDescription: "Output of the command has following format:\nCONTEXTINSTANCE: ErrorStatus Id Info Name RunStatus RunTime StartTime\n",
},
"Context": {
output: types.Context{},
output: types.Context{},
expectedDescription: "Output of the command has following format:\nCONTEXT: MaxVCpus Name RequestSpotInstances Status" +
" StatusReason\nINSTANCETYPE: Value\nOUTPUTLOCATION: Url\n",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/internal/pkg/cli/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (

const (
FormatFlag = "format"
FormatFlagDefault = string(format.DefaultFormat)
FormatFlagDefault = string(format.DefaultFormat)
FormatFlagDescription = "Format option for output. Valid options are: text, tabular"
)

Expand Down
16 changes: 10 additions & 6 deletions packages/cli/internal/pkg/cli/format/format.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package format

import (
"bytes"
"os"
"text/tabwriter"
"bytes"
)

var Default Formatter = NewText()

type FormatterType string

const (
textFormat FormatterType = "text"
tableFormat FormatterType = "table"
DefaultFormat = textFormat
textFormat FormatterType = "text"
tableFormat FormatterType = "table"
DefaultFormat = textFormat
)

func NewText() *Text {
Expand All @@ -26,8 +28,10 @@ func NewTable() *Table {

func SetFormatter(format FormatterType) {
switch format {
case textFormat: Default = NewText()
case tableFormat: Default = NewTable()
case textFormat:
Default = NewText()
case tableFormat:
Default = NewTable()
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/internal/pkg/cli/format/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (f *Table) appendSimpleSlice(field reflect.Value, outputList []string, row
return outputList
}

func (f *Table) appendSimpleValue(field reflect.Value, outputList[]string, row int) []string {
func (f *Table) appendSimpleValue(field reflect.Value, outputList []string, row int) []string {
if row > 0 {
outputList = append(outputList, emptyVal)
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/internal/pkg/cli/spec/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ func (context *Context) UnmarshalYAML(unmarshal func(interface{}) error) error {

*context = Context(defaults)
return nil
}
}
1 change: 0 additions & 1 deletion packages/cli/internal/pkg/cli/spec/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ contexts:
}
}


func TestProjectDefaults(t *testing.T) {
const yamlStr = `
name: DefaultTest
Expand Down