>[!warning]
>This content has not been peer reviewed.
# Run all foundation scripts — Code
Script: `run_all_foundation_scripts.py` (in the **foundation/** folder).
## Purpose
- **Triggers** every `rst_*.py` in foundation subfolders (all 10 foundational topics have a script).
- Runs each script from its **own directory** so existing path logic (e.g. three levels up to `rst_engine`) still works.
- **Individual results stay next to the mapping**: each topic’s `.png` remains in that topic folder (e.g. `Information and Entropy/information_signal_noise.png`). There is no separate `run_results/` folder.
- **One combined file**: builds **`all_foundation_results.png`** in the foundation folder — a single image with all topic figures in a grid.
- Writes **`run_results_summary.md`** and **`run_results_summary.txt`** with run time, status per topic, links to each topic’s result, and the combined image.
## How to run
From the foundation folder:
```bash
python run_all_foundation_scripts.py
```
Or from workspace root:
```bash
python "expanded theory applied/foundation/run_all_foundation_scripts.py"
```
## Outputs
| File | Description |
|:---|:---|
| `run_results_summary.md` | Run time, table (topic, script, status, link to result in topic folder), and embedded combined image. |
| `run_results_summary.txt` | Plain log: run time, one line per script with OK/FAIL and any stdout. |
| `all_foundation_results.png` | One image with all topic figures in a grid (in foundation/). |
| `<Topic>/<name>.png` | Each topic’s result stays in its folder (e.g. `Information and Entropy/information_signal_noise.png`). |
## Links
- **Foundation index:** [[Foundation index]]
- **Aggregated results:** [[Foundation scripts — run results]]