# raoulcollenteur/python-hydrology-tools architecture

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

- Interactive diagram: https://gitdiagram.com/raoulcollenteur/python-hydrology-tools
- Repository: https://github.com/raoulcollenteur/python-hydrology-tools

## Overview

##### Project type and purpose
- This is a small automation / data‐pipeline utility that maintains a curated list of open-source Python hydrology packages.
- It uses a JSON data source (`list.json`) as the single source of truth, and Python scripts to transform, validate, and render that data into a Markdown README.
- Two GitHub Actions workflows orchestrate URL checking and README regeneration on schedule or on demand.

##### File structure
- Top level:
- `.github/workflows/`
– `check_urls.yml`: CI job that runs `check_urls.py` to validate links in the JSON or README.
– `update_readme.yml`: CI job that runs `generate_list.py` (or `update_list.py`) and commits the updated README.
- `README.md`: generated documentation output, listing all packages in Markdown tables.
- `list.json`: the structured data file that drives the generation.
- `check_urls.py`, `generate_list.py`, `update_list.py`: the core Python scripts.
- `scripts/rename_field.py`: helper script, likely to massage data fields in `list.json` before generation.
- No “frontend” or “backend” in the web‐app sense; this is a CLI/data transformation tool.

##### README for additional insights
- The README itself is entirely generated, with tables grouped by categories.
- The README description highlights that the system automatically:
1) tracks package metadata (version, last update)
2) checks link health (CI)
3) regenerates the list on CI runs

## Diagram (Mermaid)

```mermaid
flowchart TB
  subgraph "Data Artifacts"
    DS["list.json"]:::data
    MD["README.md"]:::data
  end

  subgraph "Processing Scripts"
    GL["generate_list.py"]:::script
    UL["update_list.py"]:::script
    HF["rename_field.py"]:::script
    UC["check_urls.py"]:::script
  end

  subgraph "CI Workflows"
    CW1["Check URLs Workflow"]:::ci
    CW2["Update README Workflow"]:::ci
  end

  GH["GitHub Repo"]:::external

  DS --> GL
  GL --> MD
  DS --> UL
  HF --> UL
  UL --> DS
  DS --> UC
  MD --> UC
  CW1 --> UC
  UC --> CW1
  GH --> CW1
  GH --> CW2
  CW2 --> GL
  MD --> GH

  click DS "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/list.json"
  click GL "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/generate_list.py"
  click UL "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/update_list.py"
  click HF "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/scripts/rename_field.py"
  click UC "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/check_urls.py"
  click MD "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/README.md"
  click CW1 "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/.github/workflows/check_urls.yml"
  click CW2 "https://github.com/raoulcollenteur/python-hydrology-tools/blob/master/.github/workflows/update_readme.yml"

  classDef data fill:#cce5ff,stroke:#339,stroke-width:1px;
  classDef script fill:#d4edda,stroke:#2a7,stroke-width:1px;
  classDef ci fill:#fff3cd,stroke:#e6b800,stroke-width:1px;
  classDef external fill:#e2e3e5,stroke:#999,stroke-width:1px;
```
