# ssi-dk/calc-script-find_run_diff architecture

> Architecture diagram of the GitHub repository ssi-dk/calc-script-find_run_diff, 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/ssi-dk/calc-script-find_run_diff
- Repository: https://github.com/ssi-dk/calc-script-find_run_diff

## Overview

##### Main Components

a) Input Processing Layer
- Input directory structure with source and destination folders
- Example folder structure pattern

b) Core Processing Component (Jupyter Notebook)
- The find_run_diff.ipynb as the central processing unit
- Conda environment dependencies
- Papermill execution wrapper

c) Output Generation Layer
- Output directory for storing results
- Stdout/stderr streams for CLI operation

**[Input Layer] → [Processing Layer] → [Output Layer]**

##### Additional Notes

- Notes about the papermill CLI execution option
- Relationship between the conda environment and the notebook execution

##### Technical Details to Highlight

- Conda environment dependencies
- Papermill integration for parameterization
- Service automation capabilities
- Input/Output folder conventions

This design will help developers understand both the high-level architecture and the specific implementation details necessary for maintaining and extending the system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        ID[Input Directory]
        IS[Source Directory]
        IDest[Destination Directory]
        IEx[Example Structure]
        
        ID --> IS
        ID --> IDest
        ID --> IEx
    end

    subgraph Processing
        NB[Jupyter Notebook Engine]
        PM[Papermill Execution]
        CE[Conda Environment]
        FRD[find_run_diff.ipynb]
        EC[Environment Config]
        
        PM --> NB
        CE --> NB
        NB --> FRD
        EC --> FRD
    end

    subgraph Service
        ST[Service Template]
        TT[Timer Template]
        
        ST --> TT
    end

    subgraph Output
        OD[Output Directory]
        SO[Stream Output]
        stderr[stderr]
        stdout[stdout]
        
        SO --> stderr
        SO --> stdout
    end

    Input --> Processing
    Processing --> Output
    Service -.-> Processing

    classDef input fill:#a8d1ff
    classDef processing fill:#90EE90
    classDef output fill:#ffb366
    classDef service fill:#d3d3d3
    classDef config fill:#e6e6e6

    class ID,IS,IDest,IEx input
    class NB,PM,FRD processing
    class OD,SO,stderr,stdout output
    class ST,TT service
    class CE,EC config

    click ID "https://github.com/ssi-dk/calc-script-find_run_diff/tree/master/input"
    click IEx "https://github.com/ssi-dk/calc-script-find_run_diff/tree/master/input/example"
    click IS "https://github.com/ssi-dk/calc-script-find_run_diff/tree/master/input/example/source"
    click IDest "https://github.com/ssi-dk/calc-script-find_run_diff/tree/master/input/example/destination"
    click FRD "https://github.com/ssi-dk/calc-script-find_run_diff/blob/master/notebooks/find_run_diff.ipynb"
    click CE "https://github.com/ssi-dk/calc-script-find_run_diff/blob/master/notebooks/conda.env.yml"
    click EC "https://github.com/ssi-dk/calc-script-find_run_diff/blob/master/notebooks/find_run_diff.default.env"
    click OD "https://github.com/ssi-dk/calc-script-find_run_diff/tree/master/output"
    click ST "https://github.com/ssi-dk/calc-script-find_run_diff/blob/master/services/find_run_diff.TEMPLATE.service"
    click TT "https://github.com/ssi-dk/calc-script-find_run_diff/blob/master/services/find_run_diff.TEMPLATE.timer"

    %% Legend
    subgraph Legend
        L1[Input Components]:::input
        L2[Processing Components]:::processing
        L3[Output Components]:::output
        L4[Service Components]:::service
        L5[Configuration Components]:::config
    end
```
