Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
/functions/query-gen-svc @brandantck @jerome-ng @LSriragavan @khairul-syazwan @satish-a0 @p-hoffmann @maggie-li-yd
/functions/terminology-svc @brandantck @jerome-ng @LSriragavan @khairul-syazwan @satish-a0 @p-hoffmann @maggie-li-yd
/functions/alp-dataflow-gen-init @alicia-koh @csafreen @Zhimin-arya @p-hoffmann
/flows @alicia-koh @csafreen @Zhimin-arya @p-hoffmann
/flows/strategus_plugin @hengxian-jiang @KangJingA @SantanM @suwarnoong @p-hoffmann
/plugins/flows @alicia-koh @csafreen @Zhimin-arya @p-hoffmann
/plugins/flows/strategus_plugin @hengxian-jiang @KangJingA @SantanM @suwarnoong @p-hoffmann
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CODEOWNERS entry for Strategus doesn’t match the updated workflow paths in this PR (which reference plugins/flows/hades/strategus_plugin/**). As written, /plugins/flows/strategus_plugin won’t apply if the Strategus plugin is nested under a flow group (e.g., hades). Update this rule to match the real location (e.g., /plugins/flows/hades/strategus_plugin or a wildcard like /plugins/flows/**/strategus_plugin).

Suggested change
/plugins/flows/strategus_plugin @hengxian-jiang @KangJingA @SantanM @suwarnoong @p-hoffmann
/plugins/flows/**/strategus_plugin @hengxian-jiang @KangJingA @SantanM @suwarnoong @p-hoffmann

Copilot uses AI. Check for mistakes.
/scripts @brandantck @mwaiyee @SantanM @satish-a0 @p-hoffmann
/services/alp-dataflow-gen @alicia-koh @csafreen @Zhimin-arya @p-hoffmann
/services/alp-dataflow-gen-worker @alicia-koh @csafreen @Zhimin-arya @p-hoffmann
Expand Down
4 changes: 2 additions & 2 deletions .github/CODEOWNERS.src
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
/functions/query-gen-svc @data2evidence/analyze
/functions/terminology-svc @data2evidence/analyze
/functions/alp-dataflow-gen-init @data2evidence/data
/flows @data2evidence/data
/flows/strategus_plugin @data2evidence/integrate
/plugins/flows @data2evidence/data
/plugins/flows/strategus_plugin @data2evidence/integrate
/scripts @data2evidence/devops
/services/alp-dataflow-gen @data2evidence/data
/services/alp-dataflow-gen-worker @data2evidence/data
Expand Down
14 changes: 7 additions & 7 deletions .github/instructions/flows.instructions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
applyTo: "flows/**"
applyTo: "plugins/flows/**"
---

# D2E Flows Development Instructions

## Quick Plugin Detection

**Auto-detect from file path:** `flows/[plugin_group]/[individual_plugin]/`
**Auto-detect from file path:** `plugins/flows/[plugin_group]/[individual_plugin]/`
**Plugin groups:** base, data_management, data_transformation, hades, loyalty_score, search_embedding, i2b2, cohort_survival

**Key indicators:**
Expand Down Expand Up @@ -60,7 +60,7 @@ def hello_flow(name: str = "World") -> dict:

### 2. Package.json Generation
```bash
cd flows
cd plugins/flows
python flowinit.py [package_name] [entrypoint] [plugin_type] [-dm]
```
**Required:** package_name, entrypoint (e.g. `path/to/flow.py:function`), plugin_type
Expand All @@ -78,18 +78,18 @@ uv add fastapi uvicorn --force

### 3. Build & Test
```bash
cd flows/[plugin_group]
cd plugins/flows/[plugin_group]
yarn build # Builds Docker image locally with local tag
```

**Integration testing with D2E:**
1. **Directly modify docker-compose-local.yml:**
- Uncomment: `- ./flows/[plugin_group]/package.json:/usr/src/plugins/d2e-flows/package.json`
- Uncomment: `- ./plugins/flows/[plugin_group]/package.json:/usr/src/plugins/d2e-flows/package.json`
- Change: `PLUGINS_SEED_UPDATE: ${PLUGINS_SEED_UPDATE:-false}` to `PLUGINS_SEED_UPDATE: ${PLUGINS_SEED_UPDATE:-true}`

2. **Restart trex service:**
```bash
cd ../.. # Navigate to D2E root folder from flows/[plugin_group]
cd ../../.. # Navigate to D2E root folder from plugins/flows/[plugin_group]
# Restart only trex using yarn (recommended)
yarn local --services trex start
```
Expand All @@ -100,7 +100,7 @@ yarn build # Builds Docker image locally with local tag

### Directory Structure
```
flows/[plugin_group]/
plugins/flows/[plugin_group]/
├── Dockerfile # Uses requirements_[name].txt OR pyproject.toml
├── package.json # Generated by flowinit.py
├── requirements_[name].txt # Legacy deps (most plugins)
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/d2e-demosetup-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,33 +68,33 @@ jobs:
initial-fetch-depth: 1
filters: |
flow_base:
- "flows/base/**"
- "plugins/flows/base/**"
flow_i2b2:
- "flows/i2b2/**"
- "plugins/flows/i2b2/**"
flow_data_management:
- "flows/data_management/**"
- "plugins/flows/data_management/**"
flow_package_json:
- "flows/base/package.json"
- "plugins/flows/base/package.json"
ui:
- "ui/**"

- name: Build Flow base docker image
if: steps.file_changes.outputs.flow_base == 'true'
id: build_flow_base_image
run: |
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./flows/base/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-base:develop ./flows
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./plugins/flows/base/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-base:develop ./plugins/flows

- name: Build i2b2 docker image
if: steps.file_changes.outputs.flow_i2b2 == 'true'
id: build_i2b2_image
run: |
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./flows/i2b2/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-i2b2:develop ./flows
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./plugins/flows/i2b2/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-i2b2:develop ./plugins/flows

- name: Build data management docker image
if: steps.file_changes.outputs.flow_data_management == 'true'
id: build_dm_image
run: |
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./flows/data_management/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-data-management:develop ./flows
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./plugins/flows/data_management/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-data-management:develop ./plugins/flows

- name: Build docker images
if: success() || failure()
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Flow base docker-compose-local
if: ${{ steps.file_changes.outputs.flow_package_json == 'true' }}
run: |
sed -i 's|# - ./flows/base/package.json:/usr/src/plugins/d2e-flows/package.json|- ./flows/base/package.json:/usr/src/plugins/d2e-flows/package.json|' docker-compose-local.yml
sed -i 's|# - ./plugins/flows/base/package.json:/usr/src/plugins/d2e-flows/package.json|- ./plugins/flows/base/package.json:/usr/src/plugins/d2e-flows/package.json|' docker-compose-local.yml

- name: Restart d2e services
if: success() || failure()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/d2e-demosetup-hana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ jobs:
initial-fetch-depth: 1
filters: |
src:
- "flows/base/**"
- "plugins/flows/base/**"

- name: Build Flow base docker image
if: steps.flow_file_changes.outputs.src == 'true'
id: build_flow_base_image
run: |
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./flows/base/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-base:develop ./flows
docker build --build-arg GIT_COMMIT_ARG=${{ github.sha }} --build-arg BUILD_TYPE=OSS --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file ./plugins/flows/base/Dockerfile --platform linux/amd64 --attest type=provenance,disabled=true --tag ghcr.io/ohdsi/d2e/flow-base:develop ./plugins/flows

- name: Build docker images
if: success() || failure()
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ jobs:
initial-fetch-depth: 1
filters: |
src:
- "flows/**"
- "plugins/flows/**"
- "services/**"
- "package.json"
- "docker-compose.yml"
rkernel:
- "./services/enterprise-gateway/CustomKernelManager/**"
- "./services/enterprise-gateway/kernels/**"
- "./services/enterprise-gateway/r-strategus-lib/**"
- "./flows/hades/renv.lock"
- "./flows/_shared_flow_utils/postgresql-42.3.1.jar"
- "./plugins/flows/hades/renv.lock"
- "./plugins/flows/_shared_flow_utils/postgresql-42.3.1.jar"
- ".github/workflows/docker-build-push.yaml"

bld:
Expand All @@ -93,26 +93,26 @@ jobs:
matrix:
include:
- AZ_REG_REPOSITORY: d2e/flow-base
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/base/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/base/Dockerfile
- AZ_REG_REPOSITORY: d2e/flow-i2b2
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/i2b2/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/i2b2/Dockerfile
- AZ_REG_REPOSITORY: d2e/flow-search-embedding
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/search_embedding/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/search_embedding/Dockerfile
- AZ_REG_REPOSITORY: d2e/flow-data-management
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/data_management/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/data_management/Dockerfile
- AZ_REG_REPOSITORY: d2e/flow-loyalty-score
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/loyalty_score/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/loyalty_score/Dockerfile
- AZ_REG_REPOSITORY: d2e/flow-hades
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/hades/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/hades/Dockerfile
- AZ_REG_REPOSITORY: d2e/flow-data-transformation
DOCKER_BUILD_CONTEXT_PATH: ./flows
DOCKER_BUILD_FILE_PATH: ./flows/data_transformation/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./plugins/flows
DOCKER_BUILD_FILE_PATH: ./plugins/flows/data_transformation/Dockerfile
- AZ_REG_REPOSITORY: d2e-pg-mgmt-init
DOCKER_BUILD_FILE_PATH: ./services/alp-pg-management/Dockerfile
DOCKER_BUILD_CONTEXT_PATH: ./services/alp-pg-management
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
initial-fetch-depth: 1
filters: |
src:
- "flows/**"
- "plugins/flows/**"
- "package.json"
- "docker-compose.yml"
- "ui/**"
Expand All @@ -93,13 +93,13 @@ jobs:
fail-fast: false
matrix:
include:
- PKGPATH: ./flows/base/
- PKGPATH: ./flows/i2b2/
- PKGPATH: ./flows/search_embedding/
- PKGPATH: ./flows/data_management/
- PKGPATH: ./flows/hades/
- PKGPATH: ./flows/loyalty_score/
- PKGPATH: ./flows/data_transformation/
- PKGPATH: ./plugins/flows/base/
- PKGPATH: ./plugins/flows/i2b2/
- PKGPATH: ./plugins/flows/search_embedding/
- PKGPATH: ./plugins/flows/data_management/
- PKGPATH: ./plugins/flows/hades/
- PKGPATH: ./plugins/flows/loyalty_score/
- PKGPATH: ./plugins/flows/data_transformation/
- PKGPATH: ./ui
NPM: bun
- PKGPATH: ./functions/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_strategus_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
filters: |
has_strategus_changes:
- 'flows/hades/strategus_plugin/**'
- 'plugins/flows/hades/strategus_plugin/**'

- name: Determine condition to run
env:
Expand All @@ -39,4 +39,4 @@ jobs:
if: env.WF_RUN == 'true'
run: |
docker pull --platform linux/amd64 ghcr.io/ohdsi/d2e/flow-hades:develop
docker compose -f ./flows/hades/strategus_plugin/dc-local.yml up
docker compose -f ./plugins/flows/hades/strategus_plugin/dc-local.yml up
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/flows",
"localRoot": "${workspaceFolder}/plugins/flows",
"remoteRoot": "./flows"
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

localRoot was updated to plugins/flows, but remoteRoot still points to ./flows. This will likely break source mapping during remote debugging after the move. Update remoteRoot to the actual remote path where the flows code lives now (e.g., ./plugins/flows), or keep both sides consistent with whatever path the container/runtime uses.

Suggested change
"remoteRoot": "./flows"
"remoteRoot": "./plugins/flows"

Copilot uses AI. Check for mistakes.
}
]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- ./ui/resources:/usr/src/local-resources # For local ui development only
# - ./services/trex/core:/usr/src/core # For debugging trex with local code
# - ./services/trex/deno.json:/usr/src/deno.json
# - ./flows/base/package.json:/usr/src/plugins/d2e-flows/package.json # For local flows development only
# - ./plugins/flows/base/package.json:/usr/src/plugins/d2e-flows/package.json # For local flows development only
environment:
RUST_LOG: info
RUST_BACKTRACE: full
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading