Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
# Run ruff to lint and format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.10
rev: v0.15.9
hooks:
# Run the linter.
- id: ruff
Expand All @@ -26,7 +26,7 @@ repos:

# Find common spelling mistakes in comments and docstrings
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor,pris,bund,ons,GuD,Dezember,Juni,Juli,Produktion,WorstCase'] # Ignore capital case words, e.g. country codes
Expand All @@ -42,14 +42,14 @@ repos:

# YAML formatting
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.15.0
rev: v2.16.0
hooks:
- id: pretty-format-yaml
exclude: (\.lock\.yaml)$
args: [--autofix, --indent, "2", --preserve-quotes]

# Format Snakemake rule / workflow files
- repo: https://github.com/snakemake/snakefmt
rev: v0.11.2
rev: v1.0.0
hooks:
- id: snakefmt
14 changes: 7 additions & 7 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ include: "rules/pypsa-de/reporting.smk"


rule all:
default_target: True
input:
expand(RESULTS + "graphs/costs.pdf", run=config["run"]["name"]),
expand(resources("maps/power-network.pdf"), run=config["run"]["name"]),
Expand Down Expand Up @@ -227,7 +228,6 @@ rule all:
),
lambda w: balance_map_paths("static", w),
lambda w: balance_map_paths("interactive", w),
default_target: True


rule create_scenarios:
Expand Down Expand Up @@ -278,15 +278,15 @@ rule dump_graph_config:

rule rulegraph:
"""Generates Rule DAG in DOT, PDF, PNG, and SVG formats using the final configuration."""
message:
"Creating RULEGRAPH dag in multiple formats using the final configuration."
input:
config_file=rules.dump_graph_config.output.config_file,
output:
dot=resources("dag_rulegraph.dot"),
pdf=resources("dag_rulegraph.pdf"),
png=resources("dag_rulegraph.png"),
svg=resources("dag_rulegraph.svg"),
message:
"Creating RULEGRAPH dag in multiple formats using the final configuration."
shell:
r"""
# Generate DOT file using nested snakemake with the dumped final config
Expand Down Expand Up @@ -315,15 +315,15 @@ rule rulegraph:

rule filegraph:
"""Generates File DAG in DOT, PDF, PNG, and SVG formats using the final configuration."""
message:
"Creating FILEGRAPH dag in multiple formats using the final configuration."
input:
config_file=rules.dump_graph_config.output.config_file,
output:
dot=resources("dag_filegraph.dot"),
pdf=resources("dag_filegraph.pdf"),
png=resources("dag_filegraph.png"),
svg=resources("dag_filegraph.svg"),
message:
"Creating FILEGRAPH dag in multiple formats using the final configuration."
shell:
r"""
# Generate DOT file using nested snakemake with the dumped final config
Expand All @@ -350,10 +350,10 @@ rule filegraph:


rule doc:
message:
"Build documentation."
output:
directory("doc/_build"),
message:
"Build documentation."
shell:
"pixi run build-docs {output} html"

Expand Down
Loading
Loading