# kornealex/notebooks architecture

> Architecture diagram of the GitHub repository kornealex/notebooks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kornealex/notebooks
- Repository: https://github.com/kornealex/notebooks

## Overview

OpenDataHub Notebooks provides containerized workbench images for data science, machine learning, research, and coding, intended to be launched through the ODH Notebook Controller. The user-facing path is selecting and launching a workbench image, then working in its notebook environment; README also documents local container execution. The graph preserves major image families and substantial repository tooling. Some image internals and unsampled subsystems are represented only at their exact tree paths; edges are limited to README statements or SOURCE INDEX references.

Main entry points: [`base-images/copr/src/copr_rebuild/rebuild.py`](https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/rebuild.py) (Copr rebuild workflow), [`ci/cached-builds/konflux_generate_component_build_pipelines.py`](https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/konflux_generate_component_build_pipelines.py) (Konflux pipelines), [`ci/cached-builds/gen_gha_matrix_jobs.py`](https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/gen_gha_matrix_jobs.py) (Cached build matrix), [`manifests/tools/generate_kustomization.py`](https://github.com/kornealex/notebooks/blob/main/manifests/tools/generate_kustomization.py) (Kustomization generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_images["Workbench images"]
  node_jupyter["Jupyter workbenches"]
  node_codeserver["Code-server workbench<br/>[pyproject.toml]"]
  node_runtimes["Runtime images"]
end

subgraph group_ci["Build coordination"]
  node_cached_matrix["Cached build matrix"]
  node_changed_files["Changed-file analysis"]
  node_make_helper["Makefile queries<br/>[makefile_helper.py]"]
  node_konflux["Konflux pipelines"]
  node_logging["CI logging<br/>[logging_config.py]"]
  node_buildinputs["Build input discovery"]
end

subgraph group_manifests["Manifest tooling"]
  node_manifest_generator["Kustomization generator"]
  node_commit_refs["Commit env mapping<br/>[commit_env_refs.py]"]
  node_image_annotations["ImageStream annotations"]
end

subgraph group_shared["Shared utilities"]
  node_ntb_strings["Template string utilities<br/>[strings.py]"]
end

subgraph group_operations["Operations tools"]
  node_copr_rebuild["Copr rebuild workflow<br/>[rebuild.py]"]
  node_copr_client["Copr build client<br/>[copr_client.py]"]
  node_dependency_resolver["Dependency resolver"]
  node_koji_client["Koji metadata client<br/>[koji_client.py]"]
  node_package_models["Package metadata<br/>[models.py]"]
  node_sandbox["Sandbox runner<br/>[sandbox.py]"]
  node_jira_client["Jira client<br/>[jira_client.py]"]
  node_jira_auth["Jira authentication<br/>[jira_auth.py]"]
  node_image_availability["Image availability check"]
end

node_controller(("ODH Notebook Controller"))

node_controller -->|"launches"| node_jupyter
node_controller -.->|"launches"| node_codeserver
node_controller -.->|"launches"| node_runtimes
node_cached_matrix -->|"uses"| node_changed_files
node_cached_matrix -->|"queries"| node_make_helper
node_changed_files -->|"uses"| node_buildinputs
node_konflux -->|"enumerates targets"| node_cached_matrix
node_konflux -->|"finds Dockerfiles"| node_changed_files
node_konflux -->|"reads release"| node_make_helper
node_manifest_generator -->|"uses"| node_commit_refs
node_manifest_generator -->|"uses"| node_ntb_strings
node_image_annotations -->|"uses"| node_commit_refs
node_image_annotations -->|"uses"| node_manifest_generator
node_copr_rebuild -->|"submits builds"| node_copr_client
node_copr_rebuild -->|"resolves dependencies"| node_dependency_resolver
node_copr_rebuild -->|"queries metadata"| node_koji_client
node_copr_rebuild -->|"uses metadata"| node_package_models
node_koji_client -->|"returns metadata"| node_package_models
node_sandbox -->|"uses"| node_buildinputs
node_sandbox -->|"uses"| node_logging
node_jira_client -->|"uses"| node_jira_auth
node_image_availability -->|"uses"| node_logging
node_image_availability -->|"uses"| node_commit_refs

click node_jupyter "https://github.com/kornealex/notebooks/tree/main/jupyter"
click node_codeserver "https://github.com/kornealex/notebooks/blob/main/codeserver/ubi9-python-3.12/pyproject.toml"
click node_runtimes "https://github.com/kornealex/notebooks/tree/main/runtimes"
click node_cached_matrix "https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/gen_gha_matrix_jobs.py"
click node_changed_files "https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/gha_pr_changed_files.py"
click node_make_helper "https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/makefile_helper.py"
click node_konflux "https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/konflux_generate_component_build_pipelines.py"
click node_logging "https://github.com/kornealex/notebooks/blob/main/ci/logging_config.py"
click node_buildinputs "https://github.com/kornealex/notebooks/blob/main/scripts/buildinputs_runner.py"
click node_manifest_generator "https://github.com/kornealex/notebooks/blob/main/manifests/tools/generate_kustomization.py"
click node_commit_refs "https://github.com/kornealex/notebooks/blob/main/manifests/tools/commit_env_refs.py"
click node_image_annotations "https://github.com/kornealex/notebooks/blob/main/manifests/tools/update_imagestream_annotations_from_pylock.py"
click node_ntb_strings "https://github.com/kornealex/notebooks/blob/main/ntb/strings.py"
click node_copr_rebuild "https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/rebuild.py"
click node_copr_client "https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/copr_client.py"
click node_dependency_resolver "https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/dependency_resolver.py"
click node_koji_client "https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/koji_client.py"
click node_package_models "https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/models.py"
click node_sandbox "https://github.com/kornealex/notebooks/blob/main/scripts/sandbox.py"
click node_jira_client "https://github.com/kornealex/notebooks/blob/main/scripts/cve/jira_client.py"
click node_jira_auth "https://github.com/kornealex/notebooks/blob/main/scripts/cve/jira_auth.py"
click node_image_availability "https://github.com/kornealex/notebooks/blob/main/ci/check-image-availability.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_jupyter,node_codeserver,node_runtimes toneBlue
class node_cached_matrix,node_changed_files,node_make_helper,node_konflux,node_logging,node_buildinputs toneAmber
class node_manifest_generator,node_commit_refs,node_image_annotations toneMint
class node_ntb_strings toneRose
class node_copr_rebuild,node_copr_client,node_dependency_resolver,node_koji_client,node_package_models,node_sandbox,node_jira_client,node_jira_auth,node_image_availability,node_controller toneIndigo
```

## Components

### Workbench images

- [Jupyter workbenches](https://github.com/kornealex/notebooks/tree/main/jupyter): `jupyter`
- [Code-server workbench](https://github.com/kornealex/notebooks/blob/main/codeserver/ubi9-python-3.12/pyproject.toml): `codeserver/ubi9-python-3.12/pyproject.toml`
- [Runtime images](https://github.com/kornealex/notebooks/tree/main/runtimes): `runtimes`

### Build coordination

- [Cached build matrix](https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/gen_gha_matrix_jobs.py): `ci/cached-builds/gen_gha_matrix_jobs.py`
- [Changed-file analysis](https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/gha_pr_changed_files.py): `ci/cached-builds/gha_pr_changed_files.py`
- [Makefile queries](https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/makefile_helper.py): `ci/cached-builds/makefile_helper.py`
- [Konflux pipelines](https://github.com/kornealex/notebooks/blob/main/ci/cached-builds/konflux_generate_component_build_pipelines.py): `ci/cached-builds/konflux_generate_component_build_pipelines.py`
- [CI logging](https://github.com/kornealex/notebooks/blob/main/ci/logging_config.py): `ci/logging_config.py`
- [Build input discovery](https://github.com/kornealex/notebooks/blob/main/scripts/buildinputs_runner.py): `scripts/buildinputs_runner.py`

### Manifest tooling

- [Kustomization generator](https://github.com/kornealex/notebooks/blob/main/manifests/tools/generate_kustomization.py): `manifests/tools/generate_kustomization.py`
- [Commit env mapping](https://github.com/kornealex/notebooks/blob/main/manifests/tools/commit_env_refs.py): `manifests/tools/commit_env_refs.py`
- [ImageStream annotations](https://github.com/kornealex/notebooks/blob/main/manifests/tools/update_imagestream_annotations_from_pylock.py): `manifests/tools/update_imagestream_annotations_from_pylock.py`

### Shared utilities

- [Template string utilities](https://github.com/kornealex/notebooks/blob/main/ntb/strings.py): `ntb/strings.py`

### Operations tools

- [Copr rebuild workflow](https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/rebuild.py): `base-images/copr/src/copr_rebuild/rebuild.py`
- [Copr build client](https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/copr_client.py): `base-images/copr/src/copr_rebuild/copr_client.py`
- [Dependency resolver](https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/dependency_resolver.py): `base-images/copr/src/copr_rebuild/dependency_resolver.py`
- [Koji metadata client](https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/koji_client.py): `base-images/copr/src/copr_rebuild/koji_client.py`
- [Package metadata](https://github.com/kornealex/notebooks/blob/main/base-images/copr/src/copr_rebuild/models.py): `base-images/copr/src/copr_rebuild/models.py`
- [Sandbox runner](https://github.com/kornealex/notebooks/blob/main/scripts/sandbox.py): `scripts/sandbox.py`
- [Jira client](https://github.com/kornealex/notebooks/blob/main/scripts/cve/jira_client.py): `scripts/cve/jira_client.py`
- [Jira authentication](https://github.com/kornealex/notebooks/blob/main/scripts/cve/jira_auth.py): `scripts/cve/jira_auth.py`
- [Image availability check](https://github.com/kornealex/notebooks/blob/main/ci/check-image-availability.py): `ci/check-image-availability.py`

### Other components

- **ODH Notebook Controller**

## Connections

- ODH Notebook Controller → Jupyter workbenches: launches (evidence: `README.md`)
- ODH Notebook Controller → Code-server workbench: launches
- ODH Notebook Controller → Runtime images: launches
- Cached build matrix → Changed-file analysis: uses (evidence: `ci/cached-builds/gen_gha_matrix_jobs.py`)
- Cached build matrix → Makefile queries: queries (evidence: `ci/cached-builds/gen_gha_matrix_jobs.py`)
- Changed-file analysis → Build input discovery: uses (evidence: `ci/cached-builds/gha_pr_changed_files.py`)
- Konflux pipelines → Cached build matrix: enumerates targets (evidence: `ci/cached-builds/konflux_generate_component_build_pipelines.py`)
- Konflux pipelines → Changed-file analysis: finds Dockerfiles (evidence: `ci/cached-builds/konflux_generate_component_build_pipelines.py`)
- Konflux pipelines → Makefile queries: reads release (evidence: `ci/cached-builds/konflux_generate_component_build_pipelines.py`)
- Kustomization generator → Commit env mapping: uses (evidence: `manifests/tools/generate_kustomization.py`)
- Kustomization generator → Template string utilities: uses (evidence: `manifests/tools/generate_kustomization.py`)
- ImageStream annotations → Commit env mapping: uses (evidence: `manifests/tools/update_imagestream_annotations_from_pylock.py`)
- ImageStream annotations → Kustomization generator: uses (evidence: `manifests/tools/update_imagestream_annotations_from_pylock.py`)
- Copr rebuild workflow → Copr build client: submits builds (evidence: `base-images/copr/src/copr_rebuild/rebuild.py`)
- Copr rebuild workflow → Dependency resolver: resolves dependencies (evidence: `base-images/copr/src/copr_rebuild/rebuild.py`)
- Copr rebuild workflow → Koji metadata client: queries metadata (evidence: `base-images/copr/src/copr_rebuild/rebuild.py`)
- Copr rebuild workflow → Package metadata: uses metadata (evidence: `base-images/copr/src/copr_rebuild/rebuild.py`)
- Koji metadata client → Package metadata: returns metadata (evidence: `base-images/copr/src/copr_rebuild/koji_client.py`)
- Sandbox runner → Build input discovery: uses (evidence: `scripts/sandbox.py`)
- Sandbox runner → CI logging: uses (evidence: `scripts/sandbox.py`)
- Jira client → Jira authentication: uses (evidence: `scripts/cve/jira_client.py`)
- Image availability check → CI logging: uses (evidence: `ci/check-image-availability.py`)
- Image availability check → Commit env mapping: uses (evidence: `ci/check-image-availability.py`)
