# open-cluster-tools/qconda architecture

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

- Interactive diagram: https://gitdiagram.com/open-cluster-tools/qconda
- Repository: https://github.com/open-cluster-tools/qconda

## Overview

qConda is an interactive HPC command-line utility for managing Conda environments and generating PBS job scripts. The user launches the shell wrapper, chooses an environment operation and packages, configures CPU/GPU resources and a command, then may submit the generated script. Environment operations invoke Conda; the generated PBS file is the artifact for the optional scheduler handoff. The README documents wrapper-based Anaconda selection and submission; the wrapper source was not sampled, so those relationships are documented rather than source-verified.

Main entry points: [`qConda.py`](https://github.com/open-cluster-tools/qconda/blob/main/qConda.py) (Interactive CLI), [`run.sh`](https://github.com/open-cluster-tools/qconda/blob/main/run.sh) (Shell wrapper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and interface"]
  node_wrapper["Shell wrapper<br/>[run.sh]"]
  node_interface["Interactive CLI<br/>[qConda.py]"]
  node_animation["ASCII animation<br/>[qConda.py]"]
end

subgraph group_environment["Environment management"]
  node_conda_ops["Environment operations<br/>[qConda.py]"]
  node_conda["Conda"]
end

subgraph group_jobs["PBS job workflow"]
  node_job_config["Resource and command choices<br/>[qConda.py]"]
  node_pbs_writer["PBS script generation<br/>[qConda.py]"]
  node_pbs_file["Generated PBS script"]
  node_scheduler["PBS scheduler"]
end

node_user(("HPC user"))

node_user -->|"launches"| node_wrapper
node_wrapper -->|"starts"| node_interface
node_wrapper -.->|"selects module"| node_conda
node_interface -->|"displays"| node_animation
node_interface -->|"prompts operations"| node_conda_ops
node_conda_ops -->|"runs commands"| node_conda
node_interface -->|"collects choices"| node_job_config
node_job_config -->|"configures"| node_pbs_writer
node_pbs_writer -->|"writes"| node_pbs_file
node_interface -.->|"optionally submits"| node_scheduler
node_pbs_file -.->|"submitted to"| node_scheduler

click node_wrapper "https://github.com/open-cluster-tools/qconda/blob/main/run.sh"
click node_interface "https://github.com/open-cluster-tools/qconda/blob/main/qConda.py"
click node_animation "https://github.com/open-cluster-tools/qconda/blob/main/qConda.py"
click node_conda_ops "https://github.com/open-cluster-tools/qconda/blob/main/qConda.py"
click node_job_config "https://github.com/open-cluster-tools/qconda/blob/main/qConda.py"
click node_pbs_writer "https://github.com/open-cluster-tools/qconda/blob/main/qConda.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_wrapper,node_interface,node_animation,node_user toneBlue
class node_conda_ops,node_conda toneAmber
class node_job_config,node_pbs_writer,node_pbs_file,node_scheduler toneMint
```

## Components

### Launch and interface

- [Shell wrapper](https://github.com/open-cluster-tools/qconda/blob/main/run.sh): `run.sh`
- [Interactive CLI](https://github.com/open-cluster-tools/qconda/blob/main/qConda.py): `qConda.py`
- [ASCII animation](https://github.com/open-cluster-tools/qconda/blob/main/qConda.py): `qConda.py`

### Environment management

- [Environment operations](https://github.com/open-cluster-tools/qconda/blob/main/qConda.py): `qConda.py`
- **Conda**

### PBS job workflow

- [Resource and command choices](https://github.com/open-cluster-tools/qconda/blob/main/qConda.py): `qConda.py`
- [PBS script generation](https://github.com/open-cluster-tools/qconda/blob/main/qConda.py): `qConda.py`
- **Generated PBS script**
- **PBS scheduler**

### Other components

- **HPC user**

## Connections

- HPC user → Shell wrapper: launches (evidence: `README.md`)
- Shell wrapper → Interactive CLI: starts (evidence: `README.md`)
- Shell wrapper → Conda: selects module (evidence: `README.md`)
- Interactive CLI → ASCII animation: displays (evidence: `qConda.py`)
- Interactive CLI → Environment operations: prompts operations (evidence: `qConda.py`)
- Environment operations → Conda: runs commands (evidence: `qConda.py`)
- Interactive CLI → Resource and command choices: collects choices (evidence: `qConda.py`)
- Resource and command choices → PBS script generation: configures (evidence: `qConda.py`)
- PBS script generation → Generated PBS script: writes (evidence: `qConda.py`)
- Interactive CLI → PBS scheduler: optionally submits (evidence: `README.md`)
- Generated PBS script → PBS scheduler: submitted to (evidence: `README.md`)
