-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored project setup on initial structure
* Changed CDK to be coded in TypeScript * Followed CDK CodePipeline best practise and reference architecture by introducing concepts: workload, stateful, stateless, component * Split CDK entry points: manual and self-mutating pipeline * Initial mark up for unit tests structure for both TS/Py * deploy time code in TypeScript * run time code in Python
- Loading branch information
Showing
77 changed files
with
3,612 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"restParams": true, | ||
"spread": true | ||
} | ||
}, | ||
"plugins": ["prettier", "@typescript-eslint"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-filename-extension": [ | ||
1, | ||
{ | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
} | ||
] | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.ts | ||
!*.d.ts | ||
|
||
# CDK asset staging directory | ||
.cdk.staging | ||
cdk.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See https://prettier.io/docs/en/ignore.html | ||
|
||
# Ignore artifacts: | ||
build | ||
coverage | ||
local_ignore | ||
bams | ||
vcfs | ||
|
||
# Ignore all HTML files: | ||
*.html | ||
|
||
.pre-commit-config.yaml | ||
buildspec.yml | ||
docker-compose.yml | ||
README.md | ||
start.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"bracketSameLine": true, | ||
"printWidth": 100, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
.PHONY: test | ||
|
||
install: | ||
@yarn install | ||
@find ./lib -name 'requirements.txt' -exec pip install -r {} \; | ||
@pip install -r requirements-dev.txt | ||
@pre-commit install | ||
|
||
check: | ||
@pre-commit run --all-files | ||
|
||
run: | ||
sam local invoke | ||
|
||
build: | ||
for dir in $(shell find ./lambdas/layers -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do ./lambdas/layers/create_layer_package.sh $$dir; done | ||
cdk synth | ||
for dir in $(shell find ./lib/workload/stateless/layers -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do ./lib/workload/stateless/layers/create_layer_package.sh $$dir; done | ||
|
||
deploy: build | ||
cdk deploy OrcaBus | ||
cdk deploy OrcaBusSchemaStack | ||
test: | ||
@yarn test | ||
@pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env node | ||
import 'source-map-support/register'; | ||
import * as cdk from 'aws-cdk-lib'; | ||
import { OrcaBusStatelessStack } from '../lib/workload/orcabus-stateless-stack'; | ||
import { OrcaBusStatefulStack } from '../lib/workload/orcabus-stateful-stack'; | ||
|
||
const app = new cdk.App(); | ||
|
||
new OrcaBusStatefulStack(app, 'OrcaBusStatefulStack', { | ||
env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, | ||
}); | ||
|
||
new OrcaBusStatelessStack(app, 'OrcaBusStatelessStack', { | ||
env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// TODO impl |
Oops, something went wrong.