From 17408dadffcf1e1519ddfdb94d7c40a18627ebfc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:41:51 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/PyCQA/isort: 5.13.2 → 6.0.0](https://github.com/PyCQA/isort/compare/5.13.2...6.0.0) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.1) - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 25.1.0](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...25.1.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7f9757df..0d7d85d6f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # Sort package imports alphabetically - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 6.0.0 hooks: - id: isort args: ["--profile", "black", "--filter-files"] @@ -27,7 +27,7 @@ repos: # Find common spelling mistakes in comments and docstrings - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor,pris,Dezember,GuD,Modell'] # Ignore capital case words, e.g. country codes @@ -50,7 +50,7 @@ repos: # Formatting with "black" coding style - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.10.0 + rev: 25.1.0 hooks: # Format Python files - id: black From f8da00c3e9f6711c50c24e01ab5215909b4e4fad Mon Sep 17 00:00:00 2001 From: lkstrp Date: Tue, 25 Feb 2025 15:09:35 +0100 Subject: [PATCH 2/2] fix pre-commit --- .pre-commit-config.yaml | 2 +- scripts/build_powerplants.py | 2 +- scripts/pypsa-de/plot_ariadne_report.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d7d85d6f..f53543a33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: rev: v2.4.1 hooks: - id: codespell - args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor,pris,Dezember,GuD,Modell'] # Ignore capital case words, e.g. country codes + args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor,pris,Dezember,GuD,Modell,Juni,Juli,Produktion,WorstCase'] # Ignore capital case words, e.g. country codes types_or: [python, rst, markdown] files: ^(scripts|doc)/ diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 4c837c38f..568cfa416 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -45,7 +45,7 @@ Description ----------- -The configuration options ``electricity: powerplants_filter`` and ``electricity: custom_powerplants`` can be used to control whether data should be retrieved from the original powerplants database or from custom amendmends. These specify `pandas.query `_ commands. +The configuration options ``electricity: powerplants_filter`` and ``electricity: custom_powerplants`` can be used to control whether data should be retrieved from the original powerplants database or from custom amendments. These specify `pandas.query `_ commands. In addition the configuration option ``electricity: everywhere_powerplants`` can be used to place powerplants with zero-initial capacity of certain fuel types at all substations. 1. Adding all powerplants from custom: diff --git a/scripts/pypsa-de/plot_ariadne_report.py b/scripts/pypsa-de/plot_ariadne_report.py index 7d4e03bac..4be1fed48 100644 --- a/scripts/pypsa-de/plot_ariadne_report.py +++ b/scripts/pypsa-de/plot_ariadne_report.py @@ -432,7 +432,7 @@ def plot_nodal_elec_balance( if condense_groups is not None: nb = get_condense_sum(nb, condense_groups, condense_names) - ## summaris low contributing carriers acccording to their sum over the period (threshold in GWh) + ## summaris low contributing carriers according to their sum over the period (threshold in GWh) techs_below_threshold = nb.columns[nb.abs().sum() < threshold].tolist() if techs_below_threshold: other = {tech: "other" for tech in techs_below_threshold} @@ -2351,7 +2351,7 @@ def plot_elec_map_de( patch_kw=dict(facecolor="lightgrey"), legend_kw=legend_kw_circles, ) - # ensure cirlce is not outside the box + # ensure circle is not outside the box legend = ax.get_legend() legend.get_frame().set_boxstyle("square, pad=0.7") @@ -2859,7 +2859,7 @@ def plot_h2_trade( ] del _networks - # # for running with explicit networks not within repo structur (comment out load data and load regions) + # # for running with explicit networks not within repo structure (comment out load data and load regions) # diry = "postnetworks-folder" # file_list = os.listdir(diry) # file_list.sort()