# vtulus/aesamethods architecture

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

- Interactive diagram: https://gitdiagram.com/vtulus/aesamethods
- Repository: https://github.com/vtulus/aesamethods

## Overview

AESA-PBs is a Brightway life-cycle impact assessment methods package. Users install its supplied AESA characterization methods into a Brightway project; a separate nitrogen workflow helps adapt database activities for direct nitrogen-fertilizer quantification. The map also shows the packaged characterization data, conversion layer, biosphere prerequisite, and utility LCA solver. Edges reflect README statements and shown imports or calls; unsampled implementation details are not inferred.

Main entry points: [`src/aesa_pbs/aesa_pbs.py`](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/aesa_pbs.py) (Method installer), [`src/aesa_pbs/__init__.py`](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/__init__.py) (Package exports), [`src/aesa_pbs/n_direct_fixation.py`](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/n_direct_fixation.py) (Fertilizer exchange tools), [`src/aesa_pbs/biosphere.py`](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/biosphere.py) (Biosphere check)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public API"]
  node_api["Package exports<br/>[__init__.py]"]
end

subgraph group_methods["AESA Methods"]
  node_installer["Method installer<br/>[aesa_pbs.py]"]
  node_cf_data["AESA CF data"]
  node_converter["Data converter<br/>[data_converter.py]"]
  node_biosphere["Biosphere check<br/>[biosphere.py]"]
end

subgraph group_nitrogen["Nitrogen Workflow"]
  node_nitrogen_ops["Fertilizer exchange tools"]
end

subgraph group_support["Analysis Support"]
  node_lca_solver["LCA solver<br/>[utils.py]"]
end

node_user(("Brightway user"))
node_brightway[("Brightway project")]

node_user -->|"uses"| node_api
node_api -->|"exports"| node_installer
node_api -->|"exports"| node_nitrogen_ops
node_user -->|"installs methods"| node_installer
node_installer -->|"checks prerequisite"| node_biosphere
node_installer -->|"loads method data"| node_cf_data
node_installer -->|"converts YAML"| node_converter
node_installer -->|"registers methods"| node_brightway
node_biosphere -->|"checks database"| node_brightway
node_nitrogen_ops -->|"reads and edits"| node_brightway
node_user -->|"adapts activities"| node_nitrogen_ops
node_user -->|"runs calculations"| node_lca_solver

click node_api "https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/__init__.py"
click node_installer "https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/aesa_pbs.py"
click node_cf_data "https://github.com/vtulus/aesamethods/tree/main/src/aesa_pbs/data"
click node_converter "https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/data_converter.py"
click node_biosphere "https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/biosphere.py"
click node_nitrogen_ops "https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/n_direct_fixation.py"
click node_lca_solver "https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/utils/utils.py"

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_api,node_user toneBlue
class node_installer,node_cf_data,node_converter,node_biosphere,node_brightway toneAmber
class node_nitrogen_ops toneMint
class node_lca_solver toneRose
```

## Components

### Public API

- [Package exports](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/__init__.py): `src/aesa_pbs/__init__.py`

### AESA Methods

- [Method installer](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/aesa_pbs.py): `src/aesa_pbs/aesa_pbs.py`
- [AESA CF data](https://github.com/vtulus/aesamethods/tree/main/src/aesa_pbs/data): `src/aesa_pbs/data`
- [Data converter](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/data_converter.py): `src/aesa_pbs/data_converter.py`
- [Biosphere check](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/biosphere.py): `src/aesa_pbs/biosphere.py`

### Nitrogen Workflow

- [Fertilizer exchange tools](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/n_direct_fixation.py): `src/aesa_pbs/n_direct_fixation.py`

### Analysis Support

- [LCA solver](https://github.com/vtulus/aesamethods/blob/main/src/aesa_pbs/utils/utils.py): `src/aesa_pbs/utils/utils.py`

### Other components

- **Brightway user**
- **Brightway project**

## Connections

- Brightway user → Package exports: uses (evidence: `README.md`)
- Package exports → Method installer: exports (evidence: `src/aesa_pbs/__init__.py`)
- Package exports → Fertilizer exchange tools: exports (evidence: `src/aesa_pbs/__init__.py`)
- Brightway user → Method installer: installs methods (evidence: `README.md`)
- Method installer → Biosphere check: checks prerequisite (evidence: `src/aesa_pbs/aesa_pbs.py`)
- Method installer → AESA CF data: loads method data (evidence: `src/aesa_pbs/aesa_pbs.py`)
- Method installer → Data converter: converts YAML (evidence: `src/aesa_pbs/aesa_pbs.py`)
- Method installer → Brightway project: registers methods (evidence: `src/aesa_pbs/aesa_pbs.py`)
- Biosphere check → Brightway project: checks database (evidence: `src/aesa_pbs/biosphere.py`)
- Fertilizer exchange tools → Brightway project: reads and edits (evidence: `src/aesa_pbs/n_direct_fixation.py`)
- Brightway user → Fertilizer exchange tools: adapts activities (evidence: `README.md`)
- Brightway user → LCA solver: runs calculations (evidence: `src/aesa_pbs/utils/utils.py`)
