Skip to content

Commit 93442d6

Browse files
committed
Rename function to avoid name confusion
1 parent 3a25100 commit 93442d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/osemosys2iamc/resultify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def filter_technologies(df: pd.DataFrame, technologies: List[str]) -> pd.DataFra
6565
"""
6666
return filter_regex(df, technologies, 'TECHNOLOGY')
6767

68-
def filter_fuel(df: pd.DataFrame, technologies: List, fuels: List) -> pd.DataFrame:
68+
def filter_technology_fuel(df: pd.DataFrame, technologies: List, fuels: List) -> pd.DataFrame:
6969
"""Return rows which match ``technologies`` and ``fuels``
7070
"""
7171
df = filter_technologies(df, technologies)
@@ -290,7 +290,7 @@ def main(config: Dict, inputs_path: str, results_path: str) -> pyam.IamDataFrame
290290
unit = result['unit']
291291
if 'fuel' in result.keys():
292292
fuels = result['fuel']
293-
data = filter_fuel(results, technologies, fuels)
293+
data = filter_technology_fuel(results, technologies, fuels)
294294
elif 'emissions' in result.keys():
295295
if 'tech_emi' in result.keys():
296296
emission = result['emissions']

tests/test_resultify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pandas as pd
33
import os
44
import pytest
5-
from osemosys2iamc.resultify import (filter_fuel,
5+
from osemosys2iamc.resultify import (filter_technology_fuel,
66
filter_emission_tech,
77
filter_final_energy,
88
filter_capacity,
@@ -107,7 +107,7 @@ def test_filter_fuel(self):
107107

108108
technologies = ['ALUPLANT']
109109
fuels = ['C1_P_HCO']
110-
actual = filter_fuel(input_data, technologies, fuels)
110+
actual = filter_technology_fuel(input_data, technologies, fuels)
111111

112112
data = [
113113
["Globe", 2010, 0.828098],

0 commit comments

Comments
 (0)