# danylevych/momo architecture

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

- Interactive diagram: https://gitdiagram.com/danylevych/momo
- Repository: https://github.com/danylevych/momo

## Overview

##### Project type and purpose
- This is a Python library (the `momo` package) for morphological modeling.
- It provides classes to define individual system models (`SystemModel`), combine them (`MultiSystemModel`), create a prototype representation (`Prototype`), and compute similarity measures across model‐alternative combinations (`MoMoModel`).

##### File structure
- Top-level package: `momo/`
- `model.py` defines `MoMoModel`
- `prototype.py` defines `Prototype` (subclass of `pandas.Series`)
- `system_models/` contains `system_models.py` (defines `SystemModel` and `MultiSystemModel`)
- Supporting files: `requirements.txt` (pandas), `setup.py` (packaging), `tests/` (unit tests for each class)

##### README for insights
- The README describes module responsibilities and usage examples.
- It shows how `SystemModel` holds feature×alternative matrices, how `MultiSystemModel` combines them, how `Prototype` captures the zero‐initialized template, and how `MoMoModel` ties everything together to compute similarities.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "momo package"
        direction TB
        SM["momo.system_models.SystemModel"]:::internal
        MSM["momo.system_models.MultiSystemModel"]:::internal
        P["momo.prototype.Prototype"]:::prototype
        MM["momo.model.MoMoModel"]:::internal
    end

    SM -->|"composed in"| MSM
    MSM -->|"get_prototype() returns Prototype"| P
    MSM -->|"get_all_combinations() : DataFrame"| PD["DataFrame"]:::external
    PD -->|"input for get_similarity_measures()"| MM
    MM -->|"uses Prototype"| P
    MM -->|"uses MultiSystemModel"| MSM

    pandas["pandas (DataFrame/Series)"]:::external
    PD -->|"external operations"| pandas
    P -->|"inherits Series"| pandas

    Tests["momo/tests/"]:::test
    Requirements["requirements.txt"]:::config
    Setup["setup.py"]:::config

    click SM "https://github.com/danylevych/momo/blob/main/momo/system_models/system_models.py"
    click MSM "https://github.com/danylevych/momo/blob/main/momo/system_models/system_models.py"
    click P "https://github.com/danylevych/momo/blob/main/momo/prototype.py"
    click MM "https://github.com/danylevych/momo/blob/main/momo/model.py"
    click Tests "https://github.com/danylevych/momo/tree/main/momo/tests/"
    click Requirements "https://github.com/danylevych/momo/blob/main/requirements.txt"
    click Setup "https://github.com/danylevych/momo/blob/main/setup.py"

    classDef internal fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef external fill:#C5E1A5,stroke:#000,stroke-width:1px
    classDef prototype fill:#FFD54F,stroke:#000,stroke-width:1px
    classDef test fill:#FFFFFF,stroke:#000,stroke-dasharray: 5 5,stroke-width:1px
    classDef config fill:#E0E0E0,stroke:#000,stroke-width:1px
```
