# galaxyproject/planemo architecture

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

- Interactive diagram: https://gitdiagram.com/galaxyproject/planemo
- Repository: https://github.com/galaxyproject/planemo

## Overview

##### Main Components Identification

The system should be divided into these major components:

a. Core Command Interface
- CLI Entry Point (planemo/cli.py)
- Command Modules (planemo/commands/)
- Options Handler (planemo/options.py)

b. Engine Layer
- Galaxy Engine (planemo/engine/galaxy.py)
- CWL Engine (planemo/engine/cwltool.py)
- Toil Engine (planemo/engine/toil.py)
- Engine Factory (planemo/engine/factory.py)

c. Tool Processing
- Linting System (planemo/linters/)
- Testing Framework (planemo/test/)
- XML Processing (planemo/xml/)
- Tool Building (planemo/tool_builder.py)

d. External Systems Integration
- Galaxy Integration (planemo/galaxy/)
- Conda Integration (planemo/conda.py)
- Docker Support (planemo/docker.py)
- Tool Shed Interface (planemo/shed/)

e. Training Material Support
- Training Modules (planemo/training/)
- Documentation Generation

##### Connection Types

- Double lines: Data flow

##### Key Workflows

Main workflows with numbered sequences:

##### Component Details

Specific elements:
- Command Registry
- Engine Factory
- Tool Processing Pipeline
- Testing Infrastructure
- External System Connectors

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef cli fill:#2196F3,stroke:#1565C0,color:white
    classDef engine fill:#FF9800,stroke:#F57C00,color:white
    classDef processing fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef external fill:#4CAF50,stroke:#388E3C,color:white
    classDef training fill:#795548,stroke:#5D4037,color:white
    classDef core fill:#607D8B,stroke:#455A64,color:white

    %% User Interface Layer
    subgraph CLI
        CLI_ENTRY["CLI Entry Point"]
        CMD_MOD["Command Modules"]
        OPT["Options Handler"]
    end

    %% Engine Layer
    subgraph Engines
        ENG_FAC["Engine Factory"]
        GAL_ENG["Galaxy Engine"]
        CWL_ENG["CWL Engine"]
        TOIL_ENG["Toil Engine"]
    end

    %% Tool Processing Layer
    subgraph Processing
        LINT["Linting System"]
        TEST["Testing Framework"]
        XML["XML Processing"]
        TOOL_BUILD["Tool Building"]
        WF_LINT["Workflow Linting"]
    end

    %% External Systems Layer
    subgraph External
        GAL_INT["Galaxy Integration"]
        CONDA["Conda Integration"]
        DOCKER["Docker Support"]
        SHED["Tool Shed Interface"]
    end

    %% Training Layer
    subgraph Training
        TRAIN["Training Modules"]
        DOCS["Documentation Generation"]
    end

    %% Core Components
    subgraph Core
        DB["Database Interface"]
        CONFIG["Configuration"]
        CONTEXT["Context Management"]
    end

    %% Relationships
    CLI_ENTRY --> CMD_MOD
    CLI_ENTRY --> OPT
    CMD_MOD --> ENG_FAC
    ENG_FAC --> GAL_ENG
    ENG_FAC --> CWL_ENG
    ENG_FAC --> TOIL_ENG
    CMD_MOD --> LINT
    CMD_MOD --> TEST
    CMD_MOD --> XML
    CMD_MOD --> TOOL_BUILD
    CMD_MOD --> WF_LINT
    CMD_MOD --> TRAIN
    CMD_MOD --> DOCS
    GAL_ENG --> GAL_INT
    TEST --> CONDA
    TEST --> DOCKER
    TOOL_BUILD --> SHED
    CMD_MOD --> DB
    CMD_MOD --> CONFIG
    CMD_MOD --> CONTEXT

    %% Click Events
    click CLI_ENTRY "https://github.com/galaxyproject/planemo/blob/master/planemo/cli.py"
    click CMD_MOD "https://github.com/galaxyproject/planemo/tree/master/planemo/commands/"
    click OPT "https://github.com/galaxyproject/planemo/blob/master/planemo/options.py"
    click GAL_ENG "https://github.com/galaxyproject/planemo/blob/master/planemo/engine/galaxy.py"
    click CWL_ENG "https://github.com/galaxyproject/planemo/blob/master/planemo/engine/cwltool.py"
    click TOIL_ENG "https://github.com/galaxyproject/planemo/blob/master/planemo/engine/toil.py"
    click ENG_FAC "https://github.com/galaxyproject/planemo/blob/master/planemo/engine/factory.py"
    click LINT "https://github.com/galaxyproject/planemo/tree/master/planemo/linters/"
    click TEST "https://github.com/galaxyproject/planemo/tree/master/planemo/test/"
    click XML "https://github.com/galaxyproject/planemo/tree/master/planemo/xml/"
    click TOOL_BUILD "https://github.com/galaxyproject/planemo/blob/master/planemo/tool_builder.py"
    click GAL_INT "https://github.com/galaxyproject/planemo/tree/master/planemo/galaxy/"
    click CONDA "https://github.com/galaxyproject/planemo/blob/master/planemo/conda.py"
    click DOCKER "https://github.com/galaxyproject/planemo/blob/master/planemo/docker.py"
    click SHED "https://github.com/galaxyproject/planemo/tree/master/planemo/shed/"
    click TRAIN "https://github.com/galaxyproject/planemo/tree/master/planemo/training/"
    click DOCS "https://github.com/galaxyproject/planemo/blob/master/planemo/commands/cmd_docs.py"
    click DB "https://github.com/galaxyproject/planemo/tree/master/planemo/database/"
    click CONFIG "https://github.com/galaxyproject/planemo/blob/master/planemo/config.py"
    click CONTEXT "https://github.com/galaxyproject/planemo/blob/master/planemo/context.py"
    click WF_LINT "https://github.com/galaxyproject/planemo/blob/master/planemo/workflow_lint.py"

    %% Style Applications
    class CLI_ENTRY,CMD_MOD,OPT cli
    class ENG_FAC,GAL_ENG,CWL_ENG,TOIL_ENG engine
    class LINT,TEST,XML,TOOL_BUILD,WF_LINT processing
    class GAL_INT,CONDA,DOCKER,SHED external
    class TRAIN,DOCS training
    class DB,CONFIG,CONTEXT core
```
