Summary
In Config.py (approximately line 193), the EmissionActivityRatio entry in PARAM_RULES has a missing comma between two string literals:
'EmissionActivityRatio': ['r', 'e''t', 'y', 'm']
In Python, adjacent string literals are automatically concatenated. So 'e''t' silently becomes 'et' — a single string. The actual list evaluates to ['r', 'et', 'y', 'm'] (4 elements) instead of the intended ['r', 'e', 't', 'y', 'm'] (5 elements).
This means the EmissionActivityRatio parameter is being parsed with the wrong dimension mapping — the 'e' (emission) and 't' (technology) dimensions are merged into one 'et' dimension. This could cause data to be loaded incorrectly, columns to be mislabeled, or silent data corruption in model runs.
Expected behavior
# Correct — 5 separate dimension codes
'EmissionActivityRatio': ['r', 'e', 't', 'y', 'm']
Additionally, all other entries in PARAM_RULES should be audited for the same type of bug (missing commas between adjacent strings).
Reproduction steps
- Clone the repo: git clone https://github.com/EAPD-DRB/MUIOGO.git
- Open Config.py
- Search for EmissionActivityRatio (approximately line 193)
- Observe: 'EmissionActivityRatio': ['r', 'e''t', 'y', 'm']
- Verify the bug in a Python shell:
>>> 'e''t'
'et'
>>> ['r', 'e''t', 'y', 'm']
['r', 'et', 'y', 'm']
>>> len(['r', 'e''t', 'y', 'm'])
4 # should be 5
- Compare with similar parameters that have 5 dimensions (e.g., InputActivityRatio, OutputActivityRatio) to confirm this should also have 5
Environment
- OS: Windows 11 / Ubuntu 22.04 / macOS (all affected — this is a Python logic bug)
- Python: 3.10+
- Branch: main
- File: Config.py
Logs or screenshots
# Current code (BUGGY) — 'e''t' concatenates to 'et'
'EmissionActivityRatio': ['r', 'e''t', 'y', 'm']
# Evaluates to: ['r', 'et', 'y', 'm'] — WRONG (4 elements)
# Fixed code — comma separates 'e' and 't'
'EmissionActivityRatio': ['r', 'e', 't', 'y', 'm']
# Evaluates to: ['r', 'e', 't', 'y', 'm'] — CORRECT (5 elements)
Summary
In Config.py (approximately line 193), the EmissionActivityRatio entry in PARAM_RULES has a missing comma between two string literals:
'EmissionActivityRatio': ['r', 'e''t', 'y', 'm']In Python, adjacent string literals are automatically concatenated. So 'e''t' silently becomes 'et' — a single string. The actual list evaluates to ['r', 'et', 'y', 'm'] (4 elements) instead of the intended ['r', 'e', 't', 'y', 'm'] (5 elements).
This means the EmissionActivityRatio parameter is being parsed with the wrong dimension mapping — the 'e' (emission) and 't' (technology) dimensions are merged into one 'et' dimension. This could cause data to be loaded incorrectly, columns to be mislabeled, or silent data corruption in model runs.
Expected behavior
Additionally, all other entries in PARAM_RULES should be audited for the same type of bug (missing commas between adjacent strings).
Reproduction steps
Environment
Logs or screenshots