# samperd/archimate-py architecture

> Architecture diagram of the GitHub repository samperd/archimate-py, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samperd/archimate-py
- Repository: https://github.com/samperd/archimate-py

## Overview

archimate-py automates turning source documents—initially Government of Canada open data—into reusable ArchiMate components. The documented workflow is to obtain and decompress dataset inputs, run an XSLT 2.0 transformation with a compatible processor, and use the resulting ArchiMate-format documents in architecture repositories. The tree shows separate transformation families for legislation, bulk acts and regulations, and departments. The Python excerpts are placeholders rather than evidence of a processing pipeline; the detailed stylesheet implementations and script wiring were not sampled, so those links are not inferred.

Main entry points: [`data/resources.csv`](https://github.com/samperd/archimate-py/blob/master/data/resources.csv) (Dataset resources), [`xslt/acts-and-regs`](https://github.com/samperd/archimate-py/tree/master/xslt/acts-and-regs) (Legislation transforms), [`xslt/acts-and-regs-bulk`](https://github.com/samperd/archimate-py/tree/master/xslt/acts-and-regs-bulk) (Bulk transforms), [`xslt/min-dept/mindep2archi.xslt`](https://github.com/samperd/archimate-py/blob/master/xslt/min-dept/mindep2archi.xslt) (Department transform)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Source data"]
  node_source_docs["Source documents"]
  node_resources["Dataset resources<br/>[resources.csv]"]
end

subgraph group_transforms["XSLT transformations"]
  node_legislation["Legislation transforms"]
  node_bulk["Bulk transforms"]
  node_department["Department transform<br/>[mindep2archi.xslt]"]
end

subgraph group_models["Architecture models"]
  node_exchange["ArchiMate documents"]
  node_model_files["Model repository"]
end

node_architect(("Architect"))
node_saxon["XSLT processor"]
node_architecture_repo(("Architecture repository"))

node_architect -->|"selects datasets"| node_resources
node_source_docs -->|"provides XML"| node_saxon
node_architect -->|"runs transformation"| node_saxon
node_saxon -->|"executes stylesheet"| node_legislation
node_saxon -->|"executes stylesheet"| node_bulk
node_saxon -->|"executes stylesheet"| node_department
node_saxon -->|"writes output"| node_exchange
node_exchange -->|"imported into"| node_architecture_repo
node_architecture_repo -.->|"stores models"| node_model_files

click node_resources "https://github.com/samperd/archimate-py/blob/master/data/resources.csv"
click node_legislation "https://github.com/samperd/archimate-py/tree/master/xslt/acts-and-regs"
click node_bulk "https://github.com/samperd/archimate-py/tree/master/xslt/acts-and-regs-bulk"
click node_department "https://github.com/samperd/archimate-py/blob/master/xslt/min-dept/mindep2archi.xslt"
click node_model_files "https://github.com/samperd/archimate-py/tree/master/model"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_source_docs,node_resources toneBlue
class node_legislation,node_bulk,node_department toneAmber
class node_exchange,node_model_files toneMint
class node_architect,node_saxon,node_architecture_repo toneIndigo
```

## Components

### Source data

- **Source documents**
- [Dataset resources](https://github.com/samperd/archimate-py/blob/master/data/resources.csv): `data/resources.csv`

### XSLT transformations

- [Legislation transforms](https://github.com/samperd/archimate-py/tree/master/xslt/acts-and-regs): `xslt/acts-and-regs`
- [Bulk transforms](https://github.com/samperd/archimate-py/tree/master/xslt/acts-and-regs-bulk): `xslt/acts-and-regs-bulk`
- [Department transform](https://github.com/samperd/archimate-py/blob/master/xslt/min-dept/mindep2archi.xslt): `xslt/min-dept/mindep2archi.xslt`

### Architecture models

- **ArchiMate documents**
- [Model repository](https://github.com/samperd/archimate-py/tree/master/model): `model`

### Other components

- **Architect**
- **XSLT processor**
- **Architecture repository**

## Connections

- Architect → Dataset resources: selects datasets
- Source documents → XSLT processor: provides XML
- Architect → XSLT processor: runs transformation
- XSLT processor → Legislation transforms: executes stylesheet
- XSLT processor → Bulk transforms: executes stylesheet
- XSLT processor → Department transform: executes stylesheet
- XSLT processor → ArchiMate documents: writes output
- ArchiMate documents → Architecture repository: imported into
- Architecture repository → Model repository: stores models
