Skip to content

Commit

Permalink
Merge pull request #1172 from openego/fixes/#343-scenarios-Parameter-…
Browse files Browse the repository at this point in the history
…Causes-Broken-DAGs

Fixes/#343 scenarios parameter causes broken dags
  • Loading branch information
khelfen authored Nov 22, 2024
2 parents 374f0f3 + 84b403f commit eefbb3b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ Bug Fixes
`#1159 <https://github.com/openego/eGon-data/issues/1159>`_
* Fix depricated python-operator import
`#183 <https://github.com/openego/powerd-data/issues/183>`_
* Fix incorrect YAML serialization of the --scenarios CLI
parameter that caused broken DAGs in the pipeline.
`#343 <https://github.com/openego/powerd-data/issues/343>`_


.. _PR #692: https://github.com/openego/eGon-data/pull/692
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/airflow/dags/pipeline_status_quo.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@

# Deal with electrical neighbours
foreign_lines = ElectricalNeighbours(
dependencies=[prepare_pypsa_eur, tyndp_data]
dependencies=[prepare_pypsa_eur, tyndp_data, osmtgmod, fix_subnetworks]
)

# Import NEP (Netzentwicklungsplan) data
Expand Down
1 change: 1 addition & 0 deletions src/egon/data/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
default=["status2023", "eGon2035"],
metavar="SCENARIOS",
help=("List of scenario names for which a data model shall be created."),
multiple=True,
show_default=True,
)
@click.option(
Expand Down
1 change: 1 addition & 0 deletions src/egon/data/datasets/electrical_neighbours.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ def cross_border_lines(scenario, sources, targets, central_buses):

new_lines = new_lines[new_lines.bus0 != new_lines.bus1]

new_lines["cables"] = new_lines["cables"].apply(int)

# Insert lines to the database
new_lines.to_postgis(
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/datasets/osmtgmod/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def to_pypsa():
branch_id AS trafo_id,
f_bus AS bus0,
t_bus AS bus1,
br_x/100 AS x, --- change base from 100MVA (osmtgmod) to 1 MVA (pypsa)
br_x/(100 * rate_a) AS x, --- change base from 100MVA (osmtgmod) to the its individual s_nom (pypsa)
rate_a as s_nom,
rate_a as s_nom_min,
TRUE,
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/datasets/storages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def allocate_storage_units_sq(scn_name, storage_types):
for storage_type in storage_types:
# Read-in data from MaStR
mastr_ph = pd.read_csv(
WORKING_DIR_MASTR_NEW / sources["mastr_storage"],
WORKING_DIR_MASTR_OLD / sources["mastr_storage"],
delimiter=",",
usecols=[
"Nettonennleistung",
Expand Down

0 comments on commit eefbb3b

Please sign in to comment.