Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Jul 31, 2024
1 parent 2f78b8a commit bcfaf89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dev/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
p = Pathways(
datapackage="remind-SSP2-PkBudg1150-stem-SPS1.zip",
geography_mapping="geo_mapping_remind.yaml",
#activities_mapping="act_categories_agg.yaml",
# activities_mapping="act_categories_agg.yaml",
)

vars = [v for v in p.scenarios.coords["variables"].values if v.startswith("FE")]
Expand Down
4 changes: 1 addition & 3 deletions pathways/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
from .filesystem_constants import DATA_DIR, USER_LOGS_DIR
from .lca import _calculate_year, get_lca_matrices
from .lcia import get_lcia_method_names
from .stats import (
log_mc_parameters_to_excel,
)
from .stats import log_mc_parameters_to_excel
from .subshares import generate_samples
from .utils import (
_get_mapping,
Expand Down
12 changes: 3 additions & 9 deletions pathways/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,7 @@ def run_gsa(directory: [str, None] = STATS_DIR, method: str = "delta") -> None:

for file in Path(directory).rglob("*.xlsx"):
# load content of "Monte Carlo values" sheet into a pandas DataFrame
df_mc_vals = pd.read_excel(
file, sheet_name="Monte Carlo values"
)
df_mc_vals = pd.read_excel(file, sheet_name="Monte Carlo values")

# load content of "Technology shares" sheet into a pandas DataFrame
# if it exists
Expand All @@ -448,14 +446,10 @@ def run_gsa(directory: [str, None] = STATS_DIR, method: str = "delta") -> None:
df_technology_shares = None

# load content of "Total impacts" sheet into a pandas DataFrame
df_sum_impacts = pd.read_excel(
file, sheet_name="Total impacts"
)
df_sum_impacts = pd.read_excel(file, sheet_name="Total impacts")

# open Excel workbook
with pd.ExcelWriter(
file, engine="openpyxl", mode="a"
) as writer:
with pd.ExcelWriter(file, engine="openpyxl", mode="a") as writer:

df_GSA_results = run_GSA_delta(
total_impacts=df_sum_impacts,
Expand Down

0 comments on commit bcfaf89

Please sign in to comment.