-
Notifications
You must be signed in to change notification settings - Fork 123
enrich irve socket max output #2571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
8a63ea2
to
e60258e
Compare
50ea73e
to
0ffd8c2
Compare
Please, can you rework your PR in order to minimize code changes. Include only english comment to code. |
fd2a6f1
to
6ee895c
Compare
6ee895c
to
103f219
Compare
@frodrigo i updated the branch to minimize changes and translated comments in English |
) | ||
except Exception: | ||
return None | ||
return f"{self._normalize_number(v)} kW" |
There was a problem hiding this comment.
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.
return f"{self._normalize_number(v)} kW" | |
return f"{self._normalize_number(v)} kW" |
if raw is None: | ||
return None | ||
|
||
s = str(raw).strip() |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
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.