Skip to content

Conversation

tykayn
Copy link

@tykayn tykayn commented Aug 5, 2025

removes values that are more than the max known of 400kW to be set as the max power output of a charging station, adds a tag to correct values.
Also handles enumerations of this values to keep the maximum value.

The column evaluated in the dataset of French IRVE is "puissance_nominale" by the function "getPuissanceNominaleInKw".

Tested locally with docker on Monaco and Ile de France zones, returns proposals for the "charging_station:output" tag as "n kW" when finding good values.

@tykayn tykayn force-pushed the feat/irve-enrich-2 branch 2 times, most recently from 8a63ea2 to e60258e Compare August 5, 2025 14:05
@tykayn tykayn marked this pull request as ready for review August 11, 2025 20:59
@tykayn tykayn force-pushed the feat/irve-enrich-2 branch from 50ea73e to 0ffd8c2 Compare August 11, 2025 21:03
@frodrigo
Copy link
Contributor

Please, can you rework your PR in order to minimize code changes. Include only english comment to code.

@tykayn tykayn force-pushed the feat/irve-enrich-2 branch from fd2a6f1 to 6ee895c Compare September 2, 2025 09:04
@tykayn tykayn force-pushed the feat/irve-enrich-2 branch from 6ee895c to 103f219 Compare September 2, 2025 09:20
@tykayn
Copy link
Author

tykayn commented Sep 2, 2025

@frodrigo i updated the branch to minimize changes and translated comments in English

)
except Exception:
return None
return f"{self._normalize_number(v)} kW"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the f-string to _normalize_number function, to simplify the code.

Suggested change
return f"{self._normalize_number(v)} kW"
return f"{self._normalize_number(v)} kW"

if raw is None:
return None

s = str(raw).strip()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raw is not alredy a string ?

if s == "":
return None

max_kw = getattr(self, "MAX_POWER_KW", 500)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It s class attrib, will be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants