Skip to content

Commit

Permalink
Merge branch 'main' into agora/migration-gene-search
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 committed Oct 24, 2024
2 parents 0c106a7 + 4bd0277 commit 73104ff
Show file tree
Hide file tree
Showing 66 changed files with 2,858 additions and 616 deletions.
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"alefragnani.Bookmarks",
"Angular.ng-template",
"dbaeumer.vscode-eslint",
"donjayamanne.python-environment-manager",
"dorzey.vscode-sqlfluff",
"eamodio.gitlens",
"emeraldwalk.RunOnSave",
Expand Down
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
Expand Down
18 changes: 9 additions & 9 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
/.yarn @tschaffter

# OpenChallenges
/apps/openchallenges/ @rrchai @tschaffter @vpchung
/libs/openchallenges/ @rrchai @tschaffter @vpchung
/apps/openchallenges/ @rrchai @tschaffter
/libs/openchallenges/ @rrchai @tschaffter

## DB content
/apps/openchallenges/challenge-service/src/main/resources/db/ @tschaffter @vpchung @gaiaandreoletti
/apps/openchallenges/organization-service/src/main/resources/db/ @tschaffter @vpchung @gaiaandreoletti
/apps/openchallenges/challenge-service/src/main/resources/db/ @tschaffter @gaiaandreoletti
/apps/openchallenges/organization-service/src/main/resources/db/ @tschaffter @gaiaandreoletti

## EDAM ETL
/apps/openchallenges/edam-etl/ @mdsage1
/apps/openchallenges/edam-etl/ @rrchai

# Schematic
/apps/schematic/ @andrewelamb @GiaJordan @linglp @milen-sage
Expand All @@ -27,7 +27,7 @@

/libs/shared/ @tschaffter

/apps/model-ad/ @hallieswan @sagely1
/docker/model-ad/ @hallieswan @sagely1
/libs/model-ad/ @hallieswan @sagely1
/libs/results-visualization-framework/ @hallieswan @sagely1
/apps/model-ad/ @sagely1
/docker/model-ad/ @sagely1
/libs/model-ad/ @sagely1
/libs/results-visualization-framework/ @sagely1
14 changes: 7 additions & 7 deletions .github/actions/setup-dev-container/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: 'Installs the dev container CLI, fetches caches (if exist), and sta
runs:
using: 'composite'
steps:
- name: Set up pnpm cache
uses: actions/cache@v3
with:
path: '/tmp/.pnpm-store'
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# - name: Set up pnpm cache
# uses: actions/cache@v3
# with:
# path: '/tmp/.pnpm-store'
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-

- name: Set up Renv cache
uses: actions/cache@v3
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/locust-load-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Locust Load Test

on:
workflow_dispatch:
inputs:
product:
type: choice
description: 'Name of the product to test'
required: true
options:
- agora
- openchallenges
# user_count:
# description: 'Number of users to simulate in Locust'
# required: true
# default: '50'
# spawn_rate:
# description: 'Rate at which users are spawned (users per second)'
# required: true
# default: '10'

jobs:
deploy:
runs-on: ubuntu-22.04-4core-16GBRAM-150GBSSD
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4

- name: Set up the dev container
uses: ./.github/actions/setup-dev-container

# - name: Build the specified product, serve it, and perform a load test
# run: |
# devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
# && nx run-many --target=build-image --projects=${{ inputs.product }}-*" \
# && nx serve-detach ${{ inputs.product }}-apex \
# && nx serve sandbox-locust --configuration=${{ inputs.product }}

- name: Perform a load test
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx run sandbox-locust:serve:${{ inputs.product }} --headless
- name: Upload Locust reports as artifacts
uses: actions/upload-artifact@v4
with:
name: locust-reports
path: apps/sandbox/locust/locust_*.csv
15 changes: 8 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@
"editor.inlayHints.enabled": "off",
"eslint.enable": true,
"eslint.workingDirectories": ["."],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "html"],
// We need to explicitly set Prettier as the format for JSON formats, otherwise the formatter
// provided with VS Code will set itself as the default one, despite us specifying that Prettier
// is the default formatter (editor.defaultFormatter).
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"json"
],
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand All @@ -42,16 +46,13 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.tsdk": "node_modules/typescript/lib",
// Python settings
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
// "python.terminal.activateEnvironment": false,
"python.terminal.activateEnvInCurrentTerminal": false,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.tabSize": 4
},
// SQL settings
"sqltools.autoOpenSessionFiles": false,
"sqltools.connections": [
{
Expand Down
11 changes: 0 additions & 11 deletions apps/agora/apex/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@
"command": "docker/agora/serve-detach.sh agora-apex"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/agora/apex",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/agora-apex"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/agora/api-docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@
"command": "docker/agora/serve-detach.sh agora-api-docs"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/agora/api-docs",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/agora-api-docs"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/agora/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@
"fix": true
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": ".",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/agora-api"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/agora/app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,6 @@
},
"defaultConfiguration": "development"
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": ".",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/agora-app"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["server"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
16 changes: 0 additions & 16 deletions apps/agora/data/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,6 @@
"command": "docker/agora/serve-detach.sh {projectName}"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "{projectRoot}",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": [
"type=edge,branch=main",
"type=raw,value=local",
"type=sha",
"type=raw,value=$DATA_FILE.$DATA_VERSION"
]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/agora/mongo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
"command": "docker/agora/serve-detach.sh {projectName}"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/agora/mongo",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
22 changes: 0 additions & 22 deletions apps/openchallenges/apex/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@
"command": "docker/openchallenges/serve-detach.sh openchallenges-apex"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "{projectRoot}"
},
"configurations": {
"local": {
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
}
},
"ci": {
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=semver,pattern={{version}},value=${VERSION}", "type=sha"]
},
"push": true
}
},
"defaultConfiguration": "local"
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/api-docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@
"command": "docker/openchallenges/serve-detach.sh openchallenges-api-docs"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/api-docs",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-api-docs"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/api-gateway/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/api-gateway",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-api-gateway"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,6 @@
"jestConfig": "apps/openchallenges/app/jest.config.ts"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": ".",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-app"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["server"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/challenge-service/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/challenge-service",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"context": "apps/openchallenges/challenge-service",
Expand Down
Loading

0 comments on commit 73104ff

Please sign in to comment.