Skip to content

Commit

Permalink
code qualy
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Nov 18, 2024
1 parent 2ecf807 commit c3e55c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ def filter_results_that_failed_to_heat_or_cool_building_sufficiently(
except Exception as exc:
content = data_info_file.read()
if content.strip() == "":
raise ValueError("The json file is empty. Maybe run the simulation again. "
f"The concerned folder is {folder}") from exc
raise ValueError(
"The json file is empty. Maybe run the simulation again. "
f"The concerned folder is {folder}"
) from exc
component_entries = kpi_data["componentEntries"]
for component in component_entries:
if "Building" in component["componentName"]:
Expand Down Expand Up @@ -568,7 +570,9 @@ def store_scenario_data_with_the_right_name_and_in_the_right_path(
if os.path.exists(path_for_file) is False:
os.makedirs(path_for_file)

filename = os.path.join(path_for_file, f"result_df_{kind_of_data_set}_{scenario_analysis_config_name}.{data_format_type}",)
filename = os.path.join(
path_for_file, f"result_df_{kind_of_data_set}_{scenario_analysis_config_name}.{data_format_type}",
)
return filename

def get_default_config(self, path_to_default_config: Optional[str]) -> Any:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,10 @@ def make_bar_plot(self, x_and_y_plot_data: pd.DataFrame, unit: str, y_axis_label
)
# if no scenarios chosen, make artificial x ticks
# if self.data_processing_mode == ResultDataProcessingModeEnum.PROCESS_ALL_DATA.name:
# x_data = np.arange(0, len(y_data) * 2, step=2)
# rotate_x_ticks = False
# x_axis_label = ""
# show_x_ticks = False
# x_data = np.arange(0, len(y_data) * 2, step=2)
# rotate_x_ticks = False
# x_axis_label = ""
# show_x_ticks = False
# # otherwise choose scenarios as x-ticks
# else:
x_data = bar_labels_sorted
Expand Down

0 comments on commit c3e55c3

Please sign in to comment.