diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 080f4cd3e..85560f601 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -767,6 +767,9 @@ Bug Fixes `#1159 `_ * Fix depricated python-operator import `#183 `_ +* Fix incorrect YAML serialization of the --scenarios CLI + parameter that caused broken DAGs in the pipeline. + `#343 `_ .. _PR #692: https://github.com/openego/eGon-data/pull/692 diff --git a/src/egon/data/airflow/dags/pipeline_status_quo.py b/src/egon/data/airflow/dags/pipeline_status_quo.py index 02944af16..cfc886d26 100755 --- a/src/egon/data/airflow/dags/pipeline_status_quo.py +++ b/src/egon/data/airflow/dags/pipeline_status_quo.py @@ -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 diff --git a/src/egon/data/cli.py b/src/egon/data/cli.py index 8941ce1a5..d77928cc8 100644 --- a/src/egon/data/cli.py +++ b/src/egon/data/cli.py @@ -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( diff --git a/src/egon/data/datasets/electrical_neighbours.py b/src/egon/data/datasets/electrical_neighbours.py index bc1d2298c..bf48c9ea7 100644 --- a/src/egon/data/datasets/electrical_neighbours.py +++ b/src/egon/data/datasets/electrical_neighbours.py @@ -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( diff --git a/src/egon/data/datasets/osmtgmod/__init__.py b/src/egon/data/datasets/osmtgmod/__init__.py index 4cbe64b13..c537dc88b 100644 --- a/src/egon/data/datasets/osmtgmod/__init__.py +++ b/src/egon/data/datasets/osmtgmod/__init__.py @@ -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, diff --git a/src/egon/data/datasets/storages/__init__.py b/src/egon/data/datasets/storages/__init__.py index 5306f051f..355c55620 100755 --- a/src/egon/data/datasets/storages/__init__.py +++ b/src/egon/data/datasets/storages/__init__.py @@ -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",