From 20b68b14043f572dd421b4ab312548f324f7c815 Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 22 Sep 2023 17:51:17 +0200 Subject: [PATCH 1/7] readthedocs: remove apt packages --- .readthedocs.yml | 2 -- doc/requirements.txt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 900dba1e..35eff5de 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,8 +8,6 @@ build: os: ubuntu-22.04 tools: python: "3.11" - apt_packages: - - graphviz python: install: diff --git a/doc/requirements.txt b/doc/requirements.txt index 3e760c81..de3ed4e8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,6 +7,7 @@ sphinx sphinx_book_theme sphinxcontrib-bibtex myst-parser # recommark is deprecated, https://stackoverflow.com/a/71660856/13573820 +graphviz pypsa powerplantmatching>=0.5.5 From 713cb1a7fc92c0757eb82b66654606c6bb5b0de6 Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 22 Sep 2023 18:08:06 +0200 Subject: [PATCH 2/7] follow up --- .readthedocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 35eff5de..ef3c4b0c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -12,4 +12,3 @@ build: python: install: - requirements: doc/requirements.txt - system_packages: false From 58aa3c03dc929391992b5172e1791fdb253346b4 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 4 Oct 2023 17:23:32 +0200 Subject: [PATCH 3/7] revert removal of apt_packages --- .readthedocs.yml | 2 ++ doc/requirements.txt | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index ef3c4b0c..30684052 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,8 @@ build: os: ubuntu-22.04 tools: python: "3.11" + apt_packages: + - graphviz python: install: diff --git a/doc/requirements.txt b/doc/requirements.txt index de3ed4e8..3e760c81 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,7 +7,6 @@ sphinx sphinx_book_theme sphinxcontrib-bibtex myst-parser # recommark is deprecated, https://stackoverflow.com/a/71660856/13573820 -graphviz pypsa powerplantmatching>=0.5.5 From f5fb307f8947e3515b475855db1a50bcf53819f2 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 4 Oct 2023 17:31:46 +0200 Subject: [PATCH 4/7] fix type, expand codespell ignore list --- .pre-commit-config.yaml | 2 +- scripts/build_line_rating.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 803eb61f..94a332b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: rev: v2.2.6 hooks: - id: codespell - args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore'] # 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'] # Ignore capital case words, e.g. country codes types_or: [python, rst, markdown] files: ^(scripts|doc)/ diff --git a/scripts/build_line_rating.py b/scripts/build_line_rating.py index 7f842d43..d3a970bd 100755 --- a/scripts/build_line_rating.py +++ b/scripts/build_line_rating.py @@ -41,7 +41,7 @@ The following heat gains and losses are considered: - heat gain through resistive losses - heat gain through solar radiation -- heat loss through radiation of the trasnmission line +- heat loss through radiation of the transmission line - heat loss through forced convection with wind - heat loss through natural convection From 608faf773ae0e9730323be5b22bd4c0b6288dbe8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 4 Oct 2023 18:19:08 +0200 Subject: [PATCH 5/7] renew dag for tutorial.rst --- doc/tutorial.rst | 159 ++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 83 deletions(-) diff --git a/doc/tutorial.rst b/doc/tutorial.rst index f0ded3fb..40c1907c 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -133,89 +133,82 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i graph[bgcolor=white, margin=0]; node[shape=box, style=rounded, fontname=sans, fontsize=10, penwidth=2]; edge[penwidth=2, color=grey]; - 0[label = "solve_network", color = "0.21 0.6 0.85", style="rounded"]; - 1[label = "prepare_network\nll: copt\nopts: Co2L-24H", color = "0.02 0.6 0.85", style="rounded"]; - 2[label = "add_extra_components", color = "0.37 0.6 0.85", style="rounded"]; - 3[label = "cluster_network\nclusters: 6", color = "0.39 0.6 0.85", style="rounded"]; - 4[label = "simplify_network\nsimpl: ", color = "0.11 0.6 0.85", style="rounded"]; - 5[label = "add_electricity", color = "0.23 0.6 0.85", style="rounded"]; - 6[label = "build_renewable_profiles\ntechnology: onwind", color = "0.57 0.6 0.85", style="rounded"]; - 7[label = "base_network", color = "0.09 0.6 0.85", style="rounded"]; - 8[label = "build_shapes", color = "0.41 0.6 0.85", style="rounded"]; - 9[label = "retrieve_databundle", color = "0.28 0.6 0.85", style="rounded"]; - 10[label = "retrieve_natura_raster", color = "0.62 0.6 0.85", style="rounded"]; - 11[label = "build_bus_regions", color = "0.53 0.6 0.85", style="rounded"]; - 12[label = "retrieve_cutout\ncutout: europe-2013-era5", color = "0.05 0.6 0.85", style="rounded,dashed"]; - 13[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.57 0.6 0.85", style="rounded"]; - 14[label = "build_ship_raster", color = "0.64 0.6 0.85", style="rounded"]; - 15[label = "retrieve_ship_raster", color = "0.07 0.6 0.85", style="rounded,dashed"]; - 16[label = "retrieve_cutout\ncutout: europe-2013-sarah", color = "0.05 0.6 0.85", style="rounded,dashed"]; - 17[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.57 0.6 0.85", style="rounded"]; - 18[label = "build_renewable_profiles\ntechnology: solar", color = "0.57 0.6 0.85", style="rounded"]; - 19[label = "build_hydro_profile", color = "0.44 0.6 0.85", style="rounded"]; - 20[label = "retrieve_cost_data", color = "0.30 0.6 0.85", style="rounded"]; - 21[label = "build_powerplants", color = "0.16 0.6 0.85", style="rounded"]; - 22[label = "build_electricity_demand", color = "0.00 0.6 0.85", style="rounded"]; - 23[label = "retrieve_electricity_demand", color = "0.34 0.6 0.85", style="rounded,dashed"]; - 1 -> 0 - 2 -> 1 - 20 -> 1 - 3 -> 2 - 20 -> 2 - 4 -> 3 - 20 -> 3 - 5 -> 4 - 20 -> 4 - 11 -> 4 - 6 -> 5 - 13 -> 5 - 17 -> 5 - 18 -> 5 - 19 -> 5 - 7 -> 5 - 20 -> 5 - 11 -> 5 - 21 -> 5 - 9 -> 5 - 22 -> 5 - 8 -> 5 - 7 -> 6 - 9 -> 6 - 10 -> 6 - 8 -> 6 - 11 -> 6 - 12 -> 6 - 8 -> 7 - 9 -> 8 - 8 -> 11 - 7 -> 11 - 7 -> 13 - 9 -> 13 - 10 -> 13 - 14 -> 13 - 8 -> 13 - 11 -> 13 - 12 -> 13 - 15 -> 14 - 12 -> 14 - 16 -> 14 - 7 -> 17 - 9 -> 17 - 10 -> 17 - 14 -> 17 - 8 -> 17 - 11 -> 17 - 12 -> 17 - 7 -> 18 - 9 -> 18 - 10 -> 18 - 8 -> 18 - 11 -> 18 - 16 -> 18 - 8 -> 19 - 12 -> 19 - 7 -> 21 - 23 -> 22 + 0[label = "solve_network", color = "0.33 0.6 0.85", style="rounded"]; + 1[label = "prepare_network\nll: copt\nopts: Co2L-24H", color = "0.03 0.6 0.85", style="rounded"]; + 2[label = "add_extra_components", color = "0.45 0.6 0.85", style="rounded"]; + 3[label = "cluster_network\nclusters: 6", color = "0.46 0.6 0.85", style="rounded"]; + 4[label = "simplify_network\nsimpl: ", color = "0.52 0.6 0.85", style="rounded"]; + 5[label = "add_electricity", color = "0.55 0.6 0.85", style="rounded"]; + 6[label = "build_renewable_profiles\ntechnology: solar", color = "0.15 0.6 0.85", style="rounded"]; + 7[label = "base_network", color = "0.37 0.6 0.85", style="rounded,dashed"]; + 8[label = "build_shapes", color = "0.07 0.6 0.85", style="rounded,dashed"]; + 9[label = "retrieve_databundle", color = "0.60 0.6 0.85", style="rounded"]; + 10[label = "retrieve_natura_raster", color = "0.42 0.6 0.85", style="rounded"]; + 11[label = "build_bus_regions", color = "0.09 0.6 0.85", style="rounded,dashed"]; + 12[label = "build_renewable_profiles\ntechnology: onwind", color = "0.15 0.6 0.85", style="rounded"]; + 13[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.15 0.6 0.85", style="rounded"]; + 14[label = "build_ship_raster", color = "0.02 0.6 0.85", style="rounded"]; + 15[label = "retrieve_ship_raster", color = "0.40 0.6 0.85", style="rounded"]; + 16[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.15 0.6 0.85", style="rounded"]; + 17[label = "build_line_rating", color = "0.32 0.6 0.85", style="rounded"]; + 18[label = "retrieve_cost_data\nyear: 2030", color = "0.50 0.6 0.85", style="rounded"]; + 19[label = "build_powerplants", color = "0.64 0.6 0.85", style="rounded,dashed"]; + 20[label = "build_electricity_demand", color = "0.13 0.6 0.85", style="rounded,dashed"]; + 21[label = "retrieve_electricity_demand", color = "0.31 0.6 0.85", style="rounded"]; + 22[label = "copy_config", color = "0.23 0.6 0.85", style="rounded"]; + 1 -> 0 + 22 -> 0 + 2 -> 1 + 18 -> 1 + 3 -> 2 + 18 -> 2 + 4 -> 3 + 18 -> 3 + 5 -> 4 + 18 -> 4 + 11 -> 4 + 6 -> 5 + 12 -> 5 + 13 -> 5 + 16 -> 5 + 7 -> 5 + 17 -> 5 + 18 -> 5 + 11 -> 5 + 19 -> 5 + 9 -> 5 + 20 -> 5 + 8 -> 5 + 7 -> 6 + 9 -> 6 + 10 -> 6 + 8 -> 6 + 11 -> 6 + 8 -> 7 + 9 -> 8 + 8 -> 11 + 7 -> 11 + 7 -> 12 + 9 -> 12 + 10 -> 12 + 8 -> 12 + 11 -> 12 + 7 -> 13 + 9 -> 13 + 10 -> 13 + 14 -> 13 + 8 -> 13 + 11 -> 13 + 15 -> 14 + 7 -> 16 + 9 -> 16 + 10 -> 16 + 14 -> 16 + 8 -> 16 + 11 -> 16 + 7 -> 17 + 7 -> 19 + 21 -> 20 } | From 345331c301a49087812d00ee760a8709105d7bea Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 4 Oct 2023 18:21:13 +0200 Subject: [PATCH 6/7] reinsert graphviz to requirements.txt --- .readthedocs.yml | 2 -- doc/requirements.txt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 30684052..ef3c4b0c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,8 +8,6 @@ build: os: ubuntu-22.04 tools: python: "3.11" - apt_packages: - - graphviz python: install: diff --git a/doc/requirements.txt b/doc/requirements.txt index 3e760c81..de3ed4e8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,6 +7,7 @@ sphinx sphinx_book_theme sphinxcontrib-bibtex myst-parser # recommark is deprecated, https://stackoverflow.com/a/71660856/13573820 +graphviz pypsa powerplantmatching>=0.5.5 From 18e4099ece6420c12ba108093de993381080d419 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 5 Oct 2023 09:58:25 +0200 Subject: [PATCH 7/7] re-reconvert graphviz installation --- .readthedocs.yml | 2 ++ doc/requirements.txt | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index ef3c4b0c..30684052 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,8 @@ build: os: ubuntu-22.04 tools: python: "3.11" + apt_packages: + - graphviz python: install: diff --git a/doc/requirements.txt b/doc/requirements.txt index de3ed4e8..3e760c81 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,7 +7,6 @@ sphinx sphinx_book_theme sphinxcontrib-bibtex myst-parser # recommark is deprecated, https://stackoverflow.com/a/71660856/13573820 -graphviz pypsa powerplantmatching>=0.5.5