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
1 change: 1 addition & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SPDX-PackageDownloadLocation = "https://github.com/pypsa/powerplantmatching"
path = [
"powerplants.csv",
"docs/assets/images/powerplants.png",
"docs/powerplants.png",
"docs/examples/example.ipynb",
]
SPDX-FileCopyrightText = "Contributors to powerplantmatching <https://github.com/pypsa/powerplantmatching>"
Expand Down
4 changes: 2 additions & 2 deletions powerplantmatching/cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def clean_name(df, config=None):
# do not remove block letters for fuel types with blocks; the regular
# regex \w would remove standalone letters, this one is skipped for
# fueltypes in mask
elif key == "" and "\w" in pattern:
elif key == "" and r"\w" in pattern:
pattern_keep = r"(?i)" + "|".join(
[rf"\b{p}\b" for p in pattern if p != "\w"]
[rf"\b{p}\b" for p in pattern if p != r"\w"]
)
pattern_default = r"(?i)" + "|".join([rf"\b{p}\b" for p in pattern])
name.loc[mask] = name.loc[mask].str.replace(pattern_keep, key, regex=True)
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers=[
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
Expand All @@ -32,7 +33,7 @@ requires-python = ">=3.10"
dependencies = [
"numpy",
"scipy",
"pandas>=0.24.0",
"pandas>=0.24.0,<3",
"networkx>=1.10",
"pycountry",
"country_converter",
Expand Down