Skip to content
Merged
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
5 changes: 5 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ SPDX-License-Identifier: MIT

*

## [v0.9.1](https://github.com/PyPSA/powerplantmatching/releases/tag/v0.9.1) (7th October 2026)

* Bugfix: `pm.powerplants()` no longer drops entries that share name, fuel type and country. In v0.9.0, this removed all but one unit of each wind park in the Marktstammdatenregister. The operating wind capacity in Germany fell from 77 GW to 18 GW, and biogas from 7 GW to 3 GW. ([PR #328](https://github.com/PyPSA/powerplantmatching/pull/328))
* For OPSD EU, use the most specific fuel classification (`energy_source_level_3`) for `Fueltype` when available. Correct the capacity of Borssele 1 nuclear power plant to the net value of 485 MW. ([PR #288](https://github.com/PyPSA/powerplantmatching/pull/288))

## [v0.9.0](https://github.com/PyPSA/powerplantmatching/releases/tag/v0.9.0) (3rd October 2026)

* Updated BEYONDCOAL, IRENASTAT, ENTSOE, JRC, Marktstammdatenregister (August 2026), European Energy Storage Inventory and the Global Energy Monitor datasets (oil and gas, coal, geothermal, nuclear, hydropower) to the latest versions. ([PR #319](https://github.com/PyPSA/powerplantmatching/pull/319))
Expand Down
9 changes: 0 additions & 9 deletions powerplantmatching/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,6 @@ def powerplants(
else:
matched = matched[matched.lat.notnull()]

if isinstance(matched.columns, pd.MultiIndex):
matched = (
matched.stack(future_stack=True)
.drop_duplicates(["Name", "Fueltype", "Country"])
.unstack(-1)
)
else:
matched = matched.drop_duplicates(["Name", "Fueltype", "Country"])

matched.reset_index(drop=True).to_csv(fn, index_label="id", encoding="utf-8")

if extend_by_vres:
Expand Down
28 changes: 28 additions & 0 deletions test/test_collection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-FileCopyrightText: Contributors to powerplantmatching <https://github.com/pypsa/powerplantmatching>
#
# SPDX-License-Identifier: MIT

import pandas as pd

import powerplantmatching as pm
Comment thread
fneum marked this conversation as resolved.
Dismissed
from powerplantmatching import collection


def test_powerplants_keeps_units_with_same_name(monkeypatch):
turbines = pd.DataFrame(
{
"Name": ["Windpark Nord", "Windpark Nord"],
"Fueltype": "Wind",
"Country": "Germany",
"Capacity": [3.0, 4.0],
"lat": [54.0, 54.1],
"lon": [9.0, 9.1],
"projectID": [{"MASTR": {"SEE1"}}, {"MASTR": {"SEE2"}}],
}
)
monkeypatch.setattr(collection, "collect", lambda *args, **kwargs: turbines)
config = pm.get_config(fully_included_sources=[], variant="test-same-name")

df = pm.powerplants(config=config, update=True, fill_geopositions=False)

assert df.Capacity.sum() == turbines.Capacity.sum()
Loading