# jackjamesdawson/fatigue-cycle-counting architecture

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

- Interactive diagram: https://gitdiagram.com/jackjamesdawson/fatigue-cycle-counting
- Repository: https://github.com/jackjamesdawson/fatigue-cycle-counting

## Overview

This is an early-stage C++ fatigue-cycle-counting library with a typed Python interface. The current user-to-result path exposes reversal extraction: Python calls the native binding, which validates and converts the input, invokes the C++ preprocessing algorithm, and returns a NumPy array. The README also documents counting methods as planned scope; they are not represented as implemented runtime components. The graph reflects the sampled sources and README, so it omits unverified links and unsampled implementation details.

Main entry points: [`src/bindings/python/_core.cpp`](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/_core.cpp) (Native module), [`src/bindings/python/preprocessing/_reversals_binding.cpp`](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/_reversals_binding.cpp) (Reversal binding), [`python/fatigue_cycle_counting/__init__.py`](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/python/fatigue_cycle_counting/__init__.py) (Python package API), [`src/bindings/python/preprocessing/binding.cpp`](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/binding.cpp) (Preprocessing registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_python["Python interface"]
  node_python_api["Python package API<br/>[__init__.py]"]
  node_python_preprocessing["Preprocessing API<br/>[__init__.py]"]
end

subgraph group_native["Native runtime"]
  node_core_module["Native module<br/>[_core.cpp]"]
  node_preprocessing_registration["Preprocessing registration<br/>[binding.cpp]"]
  node_reversals_binding["Reversal binding"]
  node_reversal_algorithm["Reversal extraction<br/>[reversals.cpp]"]
  node_numpy_conversion["NumPy output conversion<br/>[numpy.hpp]"]
  node_reversal_api["Reversal API declaration<br/>[reversals.hpp]"]
  node_binding_declarations["Binding declarations<br/>[binding.hpp]"]
  node_reversal_binding_declaration["Reversal binding declaration"]
  node_version["Version provider<br/>[version.cpp]"]
end

subgraph group_planned["Planned capabilities"]
  node_planned_methods["Planned counting methods<br/>[README.md]"]
end

node_engineer(("Engineer"))

node_engineer -->|"uses"| node_python_api
node_python_api -->|"exports"| node_python_preprocessing
node_python_api -->|"imports version"| node_core_module
node_python_preprocessing -->|"exposes native function"| node_reversals_binding
node_core_module -->|"registers"| node_preprocessing_registration
node_preprocessing_registration -->|"registers"| node_reversals_binding
node_reversals_binding -->|"calls"| node_reversal_algorithm
node_reversals_binding -->|"converts result"| node_numpy_conversion
node_reversal_algorithm -->|"implements"| node_reversal_api
node_core_module -->|"includes"| node_binding_declarations
node_preprocessing_registration -->|"includes"| node_reversal_binding_declaration
node_core_module -->|"reads version"| node_version

click node_python_api "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/python/fatigue_cycle_counting/__init__.py"
click node_python_preprocessing "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/python/fatigue_cycle_counting/preprocessing/__init__.py"
click node_core_module "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/_core.cpp"
click node_preprocessing_registration "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/binding.cpp"
click node_reversals_binding "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/_reversals_binding.cpp"
click node_reversal_algorithm "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/preprocessing/reversals.cpp"
click node_numpy_conversion "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/detail/numpy.hpp"
click node_reversal_api "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/include/fatigue_cycle_counting/preprocessing/reversals.hpp"
click node_binding_declarations "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/binding.hpp"
click node_reversal_binding_declaration "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/_reversals_binding.hpp"
click node_planned_methods "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/README.md"
click node_version "https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/version.cpp"

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_python_api,node_python_preprocessing toneBlue
class node_core_module,node_preprocessing_registration,node_reversals_binding,node_reversal_algorithm,node_numpy_conversion,node_reversal_api,node_binding_declarations,node_reversal_binding_declaration,node_version toneAmber
class node_planned_methods toneMint
class node_engineer toneIndigo
```

## Components

### Python interface

- [Python package API](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/python/fatigue_cycle_counting/__init__.py): `python/fatigue_cycle_counting/__init__.py`
- [Preprocessing API](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/python/fatigue_cycle_counting/preprocessing/__init__.py): `python/fatigue_cycle_counting/preprocessing/__init__.py`

### Native runtime

- [Native module](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/_core.cpp): `src/bindings/python/_core.cpp`
- [Preprocessing registration](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/binding.cpp): `src/bindings/python/preprocessing/binding.cpp`
- [Reversal binding](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/_reversals_binding.cpp): `src/bindings/python/preprocessing/_reversals_binding.cpp`
- [Reversal extraction](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/preprocessing/reversals.cpp): `src/preprocessing/reversals.cpp`
- [NumPy output conversion](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/detail/numpy.hpp): `src/bindings/python/detail/numpy.hpp`
- [Reversal API declaration](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/include/fatigue_cycle_counting/preprocessing/reversals.hpp): `include/fatigue_cycle_counting/preprocessing/reversals.hpp`
- [Binding declarations](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/binding.hpp): `src/bindings/python/preprocessing/binding.hpp`
- [Reversal binding declaration](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/bindings/python/preprocessing/_reversals_binding.hpp): `src/bindings/python/preprocessing/_reversals_binding.hpp`
- [Version provider](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/src/version.cpp): `src/version.cpp`

### Planned capabilities

- [Planned counting methods](https://github.com/jackjamesdawson/fatigue-cycle-counting/blob/master/README.md): `README.md`

### Other components

- **Engineer**

## Connections

- Engineer → Python package API: uses (evidence: `README.md`)
- Python package API → Preprocessing API: exports (evidence: `python/fatigue_cycle_counting/__init__.py`)
- Python package API → Native module: imports version (evidence: `python/fatigue_cycle_counting/__init__.py`)
- Preprocessing API → Reversal binding: exposes native function (evidence: `python/fatigue_cycle_counting/preprocessing/__init__.py`)
- Native module → Preprocessing registration: registers (evidence: `src/bindings/python/_core.cpp`)
- Preprocessing registration → Reversal binding: registers (evidence: `src/bindings/python/preprocessing/binding.cpp`)
- Reversal binding → Reversal extraction: calls (evidence: `src/bindings/python/preprocessing/_reversals_binding.cpp`)
- Reversal binding → NumPy output conversion: converts result (evidence: `src/bindings/python/preprocessing/_reversals_binding.cpp`)
- Reversal extraction → Reversal API declaration: implements (evidence: `src/preprocessing/reversals.cpp`)
- Native module → Binding declarations: includes (evidence: `src/bindings/python/_core.cpp`)
- Preprocessing registration → Reversal binding declaration: includes (evidence: `src/bindings/python/preprocessing/binding.cpp`)
- Native module → Version provider: reads version (evidence: `src/bindings/python/_core.cpp`)
