# callowayproject/bump-my-version architecture

> Architecture diagram of the GitHub repository callowayproject/bump-my-version, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/callowayproject/bump-my-version
- Repository: https://github.com/callowayproject/bump-my-version

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Core Version Management
- Version Parsing Engine
- Version Serialization Engine
- Version Bumping Logic
- Version Component Handler

b) Configuration Management
- Config File Handlers (TOML, YAML, CFG)
- Configuration Validation
- Version Format Specifications

c) File Operations
- File Search and Replace
- SCM Integration (Git)
- File Pattern Matching

d) CLI Interface
- Command Processing
- User Input Validation
- Output Formatting

##### Component Relationships

**[CLI Interface] → [Configuration Management]**
- ↓
**[File Operations] ← [Core Version Management]**
- ↓
**[Source Control Management]**

##### Detailed Component Breakdown

For each major component, include these subcomponents:

a) Core Version Management:
- Version Parser (versioning/conventions.py)
- Version Models (versioning/models.py)
- Version Functions (versioning/functions.py)
- Serialization Handler (versioning/serialization.py)

b) Configuration Management:
- Config Creator (config/create.py)
- Config Models (config/models.py)
- File Handlers (config/files.py)
- Legacy Support (config/files_legacy.py)

c) File Operations:
- File Handlers (files.py)
- Pattern Matching (utils.py)
- Hook System (hooks.py)

d) CLI Interface:
- Command Processors (cli.py)
- UI Components (ui.py)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph CLI
        CLI_MAIN["Main Entry Point"]:::cli
        CLI_PROC["Command Processing"]:::cli
        UI["User Interface"]:::cli
        VIS["Visualization"]:::cli
        SHOW["Show Command"]:::cli
        BUMP["Bump Command"]:::cli
    end

    subgraph Core["Core Version Management"]
        VP["Version Parser"]:::core
        VM["Version Models"]:::core
        VF["Version Functions"]:::core
        VS["Version Serialization"]:::core
        VC["Version Configuration"]:::core
    end

    subgraph Config["Configuration Management"]
        CC["Config Creator"]:::config
        CM["Config Models"]:::config
        FH["File Handlers"]:::config
        LS["Legacy Support"]:::config
        CU["Config Utilities"]:::config
    end

    subgraph FileOps["File Operations"]
        FILES["File Handlers"]:::fileop
        SCM["Source Control Management"]:::fileop
        HOOKS["Hook System"]:::fileop
        UTILS["Utility Functions"]:::fileop
    end

    subgraph Additional["Additional Components"]
        CTX["Context Management"]:::additional
        EXC["Exception Handling"]:::additional
        LOG["Logging"]:::additional
        YAML["YAML Support"]:::additional
    end

    %% Relationships
    CLI_MAIN --> CLI_PROC
    CLI_PROC --> |Commands| SHOW
    CLI_PROC --> |Commands| BUMP
    CLI_PROC --> UI
    UI --> VIS

    SHOW --> Core
    BUMP --> Core
    
    Core --> Config
    Core --> FileOps
    
    FileOps --> SCM
    
    %% Additional Component Relations
    Core --> CTX
    FileOps --> CTX
    Config --> CTX
    
    CTX --> LOG
    CTX --> EXC
    Config --> YAML

    %% Click Events
    click CLI_MAIN "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/__main__.py"
    click CLI_PROC "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/cli.py"
    click UI "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/ui.py"
    click VIS "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/visualize.py"
    click SHOW "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/show.py"
    click BUMP "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/bump.py"
    
    click VP "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/versioning/conventions.py"
    click VM "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/versioning/models.py"
    click VF "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/versioning/functions.py"
    click VS "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/versioning/serialization.py"
    click VC "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/versioning/version_config.py"
    
    click CC "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/config/create.py"
    click CM "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/config/models.py"
    click FH "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/config/files.py"
    click LS "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/config/files_legacy.py"
    click CU "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/config/utils.py"
    
    click FILES "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/files.py"
    click SCM "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/scm.py"
    click HOOKS "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/hooks.py"
    click UTILS "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/utils.py"
    
    click CTX "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/context.py"
    click EXC "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/exceptions.py"
    click LOG "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/indented_logger.py"
    click YAML "https://github.com/callowayproject/bump-my-version/blob/master/bumpversion/yaml_dump.py"

    %% Styles
    classDef cli fill:#9370DB,stroke:#333,stroke-width:2px
    classDef core fill:#4169E1,stroke:#333,stroke-width:2px
    classDef config fill:#3CB371,stroke:#333,stroke-width:2px
    classDef fileop fill:#FFA500,stroke:#333,stroke-width:2px
    classDef additional fill:#CD853F,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["CLI Components"]:::cli
        L2["Core Components"]:::core
        L3["Config Components"]:::config
        L4["File Operations"]:::fileop
        L5["Additional Components"]:::additional
    end
```
