Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ updates:

# Keep Dockerfile base images up to date
- package-ecosystem: "docker"
directory: "/apps/cogstack-jupyter-hub"
directory: "/apps/jupyter-hub"
schedule:
interval: "monthly"
registries:
Expand All @@ -41,7 +41,7 @@ updates:

# Keep uv.lock Python dependencies up to date
- package-ecosystem: "uv"
directory: "/apps/cogstack-jupyter-hub"
directory: "/apps/jupyter-hub"
schedule:
interval: "monthly"
commit-message:
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/build_helm_charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,22 @@ jobs:
- name: Discover charts
id: charts
run: |
if [[ "${{ steps.version.outputs.single_chart }}" == "true" ]]; then
echo "charts=${{ steps.version.outputs.chart }}" >> "$GITHUB_OUTPUT"
else
CHARTS=()
while IFS= read -r chartfile; do
CHARTS+=("$(basename "$(dirname "$chartfile")")")
done < <(find . -maxdepth 2 -mindepth 2 -type f -name Chart.yaml | sort)
echo "charts=${CHARTS[*]}" >> "$GITHUB_OUTPUT"
CHARTS=()
while IFS= read -r chartfile; do
CHART_DIR="$(dirname "$chartfile")"
if [[ "${{ steps.version.outputs.single_chart }}" == "true" ]]; then
CHART_NAME="$(helm show chart "$CHART_DIR" | awk '/^name:/ {print $2; exit}')"
if [[ "$CHART_NAME" != "${{ steps.version.outputs.chart }}" ]]; then
continue
fi
fi
CHARTS+=("$(basename "$CHART_DIR")")
done < <(find . -maxdepth 2 -mindepth 2 -type f -name Chart.yaml | sort)
if [[ "${{ steps.version.outputs.single_chart }}" == "true" && "${#CHARTS[@]}" != 1 ]]; then
echo "Expected exactly one chart named ${{ steps.version.outputs.chart }}; found ${#CHARTS[@]}." >&2
exit 1
fi
echo "charts=${CHARTS[*]}" >> "$GITHUB_OUTPUT"

- name: Recursive dependency update (all charts, including nested)
# Waiting on helm recursive feature https://github.com/helm/helm/pull/30855
Expand All @@ -182,12 +189,13 @@ jobs:
run: |
VERSION="${{ steps.version.outputs.chart_version }}"
for CHART in ${{ steps.charts.outputs.charts }}; do
helm push "./$CHART-$VERSION.tgz" oci://registry-1.docker.io/cogstacksystems
CHART_NAME="$(helm show chart "./$CHART" | awk '/^name:/ {print $2; exit}')"
helm push "./$CHART_NAME-$VERSION.tgz" oci://registry-1.docker.io/cogstacksystems
done

- name: Attach chart to GitHub Release
uses: softprops/action-gh-release@v3
if: github.ref_type == 'tag'
with:
tag_name: ${{ github.ref_name }}
files: deployment/charts/${{ steps.charts.outputs.chart }}-${{ steps.version.outputs.chart_version }}.tgz
files: deployment/charts/${{ steps.version.outputs.chart }}-${{ steps.version.outputs.chart_version }}.tgz
12 changes: 6 additions & 6 deletions .github/workflows/docker_build_cohorter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
tags:
- "cohorter-v*.*.*" # e.g., cohorter-v1.2.3
paths:
- "apps/cogstack-cohorter/**"
- "apps/cohorter/**"
- ".github/workflows/docker_build_cohorter.yml"
pull_request:
paths:
- "apps/cogstack-cohorter/**"
- "apps/cohorter/**"
- ".github/workflows/docker_build_cohorter.yml"

jobs:
Expand All @@ -24,13 +24,13 @@ jobs:
matrix:
include:
- name: nl2dsl
context: apps/cogstack-cohorter/NL2DSL
dockerfile: apps/cogstack-cohorter/NL2DSL/Dockerfile
context: apps/cohorter/NL2DSL
dockerfile: apps/cohorter/NL2DSL/Dockerfile
image: cogstacksystems/cogstack-cohorter-nl2dsl

- name: webapp
context: apps/cogstack-cohorter/WebAPP
dockerfile: apps/cogstack-cohorter/WebAPP/Dockerfile
context: apps/cohorter/WebAPP
dockerfile: apps/cohorter/WebAPP/Dockerfile
image: cogstacksystems/cogstack-cohorter-webapp

steps:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/docker_build_jupyterhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
branches: [main]
tags: ['cogstack-jupyter-hub-v*.*.*']
paths:
- "apps/cogstack-jupyter-hub/**"
- "apps/jupyter-hub/**"
- ".github/workflows/docker_build_jupyterhub.yml"
pull_request:
paths:
- "apps/cogstack-jupyter-hub/**"
- "apps/jupyter-hub/**"
- ".github/workflows/docker_build_jupyterhub.yml"
workflow_dispatch:

Expand Down Expand Up @@ -72,8 +72,8 @@ jobs:
id: hub
uses: docker/build-push-action@v7
with:
context: apps/cogstack-jupyter-hub
file: apps/cogstack-jupyter-hub/Dockerfile_hub
context: apps/jupyter-hub
file: apps/jupyter-hub/Dockerfile_hub
platforms: linux/amd64
build-args: |
CPU_ARCHITECTURE=amd64
Expand All @@ -90,8 +90,8 @@ jobs:
id: su
uses: docker/build-push-action@v7
with:
context: apps/cogstack-jupyter-hub
file: apps/cogstack-jupyter-hub/Dockerfile_singleuser
context: apps/jupyter-hub
file: apps/jupyter-hub/Dockerfile_singleuser
platforms: linux/amd64
build-args: |
CPU_ARCHITECTURE=amd64
Expand Down Expand Up @@ -156,8 +156,8 @@ jobs:
id: hub
uses: docker/build-push-action@v7
with:
context: apps/cogstack-jupyter-hub
file: apps/cogstack-jupyter-hub/Dockerfile_hub
context: apps/jupyter-hub
file: apps/jupyter-hub/Dockerfile_hub
platforms: linux/arm64
build-args: |
CPU_ARCHITECTURE=arm64
Expand All @@ -173,8 +173,8 @@ jobs:
id: su
uses: docker/build-push-action@v7
with:
context: apps/cogstack-jupyter-hub
file: apps/cogstack-jupyter-hub/Dockerfile_singleuser
context: apps/jupyter-hub
file: apps/jupyter-hub/Dockerfile_singleuser
platforms: linux/arm64
build-args: |
CPU_ARCHITECTURE=arm64
Expand Down Expand Up @@ -224,8 +224,8 @@ jobs:
- name: Build & push singleuser GPU (amd64)
uses: docker/build-push-action@v7
with:
context: apps/cogstack-jupyter-hub
file: apps/cogstack-jupyter-hub/Dockerfile_singleuser
context: apps/jupyter-hub
file: apps/jupyter-hub/Dockerfile_singleuser
platforms: linux/amd64
build-args: |
CPU_ARCHITECTURE=amd64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker_smoke_jupyterhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
branches: [main]
tags: ['cogstack-jupyter-hub-v*.*.*']
paths:
- "apps/cogstack-jupyter-hub/**"
- "apps/jupyter-hub/**"
- ".github/workflows/docker_smoke_jupyterhub.yml"
pull_request:
paths:
- "apps/cogstack-jupyter-hub/**"
- "apps/jupyter-hub/**"
- ".github/workflows/docker_smoke_jupyterhub.yml"
workflow_dispatch:

Expand All @@ -22,7 +22,7 @@ concurrency:

defaults:
run:
working-directory: apps/cogstack-jupyter-hub
working-directory: apps/jupyter-hub

jobs:
smoke:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ __pycache__/
*.py[cod]
*$py.class

# Python type stubs
*.pyi

# C extensions
*.so

Expand Down
18 changes: 10 additions & 8 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"deployment/charts/medcat-service-helm": "0.6.0",
"deployment/charts/medcat-trainer-helm": "0.5.2",
"deployment/charts/cogstack-ce-helm": "0.7.1",
"deployment/charts/cogstack-cohorter-helm": "0.5.0",
"deployment/charts/cogstack-observability-helm": "0.4.1",
"deployment/charts/cogstack-jupyterhub-helm": "0.5.0",
"deployment/charts/ocr-service-helm": "0.1.0",
"deployment/charts/medcat-service": "0.6.0",
"deployment/charts/medcat-trainer": "0.5.2",
"deployment/charts/ce": "0.7.1",
"deployment/charts/cohorter": "0.5.0",
"deployment/charts/observability": "0.4.1",
"deployment/charts/jupyterhub": "0.5.0",
"deployment/charts/ocr-service": "0.1.0",
"deployment/charts/nifi": "0.0.0",
"deployment/charts/nginx": "0.0.0",
"deployment/terraform/openstack-kubernetes-k3s": "0.1.2",
"apps/ocr-service": "1.1.4",
"apps/cogstack-jupyter-hub": "2.3.10"
"apps/jupyter-hub": "2.3.10"
}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ See the latest documentation on [Readthedocs](https://docs.cogstack.org/en/lates
<sub>Document and image text extraction built on Tesseract OCR</sub>
</td>
<td align="center" valign="top" width="50%">
<a href="apps/cogstack-jupyter-hub">
<a href="apps/jupyter-hub">
<img src="https://raw.githubusercontent.com/jupyterhub/design/master/assets/jupyterhub/light-background-jupyterhub-logo-square-color.svg" alt="CogStack Jupyter Hub" height="56"/>
<br/><strong>CogStack Jupyter Hub</strong>
</a>
Expand All @@ -51,15 +51,15 @@ See the latest documentation on [Readthedocs](https://docs.cogstack.org/en/lates
</tr>
<tr>
<td align="center" valign="top" width="50%">
<a href="apps/cogstack-cohorter">
<a href="apps/cohorter">
<img src="docs/docs/assets/cogstack-logo.png" alt="CogStack Cohorter" height="56"/>
<br/><strong>CogStack Cohorter</strong>
</a>
<br/>
<sub>Cohort definition tooling with NL2DSL and web UI</sub>
</td>
<td align="center" valign="top" width="50%">
<a href="apps/cogstack-dashboards-demo">
<a href="apps/dashboards-demo">
<img src="https://cdn.simpleicons.org/plotly/3F4F75" alt="CogStack Dashboards Demo" height="56"/>
<br/><strong>CogStack Dashboards Demo</strong>
</a>
Expand All @@ -69,6 +69,9 @@ See the latest documentation on [Readthedocs](https://docs.cogstack.org/en/lates
</tr>
</table>

See [CogStack NiFi](apps/nifi/README.md) for the ingestion image, Python
processors, JDBC drivers and flow templates.

### Tools
- Source for the official cogstack documentation. This git repo stores the top level documetation that hosts on https://docs.cogstack.org
- CogStack deployment instructions and examples
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.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This webapp is a cohort app for users to obtain the number of patients satifying

Other runtime dependencies include [ECharts](https://echarts.apache.org/en/index.html) for charts and [popper.js](https://popper.js.org/) for tooltips.

A GitHub Packages token with `read:packages` scope is required to install `@cogstack/frontend-common-react`. Set it in a `.env` file at the `apps/cogstack-cohorter/` root (see `.env.example`) or export it in your shell:
A GitHub Packages token with `read:packages` scope is required to install `@cogstack/frontend-common-react`. Set it in a `.env` file at the `apps/cohorter/` root (see `.env.example`) or export it in your shell:

```bash
export NPM_TOKEN=ghp_your_token_here
Expand Down Expand Up @@ -44,7 +44,7 @@ There is a script `gen_random_data.js` in `server/data/` folder to generate the

Please make sure to have the six data files ready in the `server/data/` folder before starting the server. To start the server, in the app folder run `cd server && npm install && npm run start`.

The recommended way to run the full stack (webapp + NL2DSL + MedCAT + Ollama) is via `docker-compose` from the `apps/cogstack-cohorter/` root — see the root-level README and `.env.example` for details. The `NPM_TOKEN` is passed as a BuildKit secret; set it in the `.env` file before building.
The recommended way to run the full stack (webapp + NL2DSL + MedCAT + Ollama) is via `docker-compose` from the `apps/cohorter/` root — see the root-level README and `.env.example` for details. The `NPM_TOKEN` is passed as a BuildKit secret; set it in the `.env` file before building.

### Environment variables

Expand Down Expand Up @@ -92,7 +92,7 @@ In Kubernetes these are set as env vars on the webapp container (via helm `cogst

### Run using Docker with random data

Set `RANDOM_DATA=true` in your `.env` file (or leave it unset — it defaults to `true`), then from the `apps/cogstack-cohorter/` root:
Set `RANDOM_DATA=true` in your `.env` file (or leave it unset — it defaults to `true`), then from the `apps/cohorter/` root:

```bash
docker compose up --build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It keeps the existing Alpine-style template/data model behaviour, while using Re

## Environment variables

A single `.env` file at the **`apps/cogstack-cohorter/` root** (one level up from `WebAPP/`) is shared between Vite and `docker-compose`. Copy `.env.example` there and fill in values:
A single `.env` file at the **`apps/cohorter/` root** (one level up from `WebAPP/`) is shared between Vite and `docker-compose`. Copy `.env.example` there and fill in values:

```bash
cp ../../.env.example ../../.env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react';
// Express server port (same origin in production; proxied in dev)
const API_ORIGIN = 'http://localhost:3000';

// Point Vite at the apps/cogstack-cohorter/ root so that it reads the same .env
// Point Vite at the apps/cohorter/ root so that it reads the same .env
// as docker-compose, eliminating the need for a separate client-react/.env.
// Both `npm run dev` (Vite) and `docker-compose build` resolve vars from one file.
const ENV_DIR = '../../';
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.
32 changes: 32 additions & 0 deletions apps/nifi/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Build from apps/nifi; include only metadata and image resources.
**
!Dockerfile
!pyproject.toml
!uv.lock
!__init__.py
!user_scripts/
!user_scripts/**
!user_python_extensions/
!user_python_extensions/**
!drivers/
!drivers/**
!user_schemas/
!user_schemas/**
!user_templates/
!user_templates/**
!docker/
!docker/healthcheck.sh

# Runtime state and local development artefacts never enter image layers.
user_scripts/logs/
user_scripts/db/
user_scripts/tmp/
user_scripts/extensions/
**/.venv/
**/__pycache__/
**/*.py[cod]
**/.DS_Store
**/.pytest_cache/
**/.ruff_cache/
**/.mypy_cache/
**/*.egg-info/
18 changes: 18 additions & 0 deletions apps/nifi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# NiFi and Py4J type stubs are maintained source files.
!typings/**/*.pyi

# Mutable host configuration and processor state.
conf/flow.json.gz
conf/archive/
user_scripts/db/*
!user_scripts/db/.gitignore
user_scripts/logs/*
!user_scripts/logs/.keep
!user_scripts/tmp/
user_scripts/tmp/*
!user_scripts/tmp/.gitignore
**devel
devel
**flow
**login
user_scripts/extensions/*
Loading
Loading