-
Notifications
You must be signed in to change notification settings - Fork 4
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
removes _fix_dates #233
base: main
Are you sure you want to change the base?
removes _fix_dates #233
Conversation
Welcome, new contributor! It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the
Please make sure you've read our contributing guide. We look forward to reviewing your Pull Request shortly ✨ |
for more information, see https://pre-commit.ci
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.
En plus de mes commentaires, on pourrait aussi profiter de cette PR pour changer la valeur par défaut de use_defaults
dans le __init__
d'Hydrotel à False.
.
def _fix_dates(d: dict): | ||
"""Convert dates to the formatting required by HYDROTEL.""" | ||
# Reformat dates | ||
for key in ["DATE DEBUT", "DATE FIN"]: | ||
if len(d.get(key, "")) > 0: | ||
d[key] = pd.to_datetime(d[key]).strftime("%Y-%m-%d %H:%M") |
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.
Il faut garder cette partie. C'est LECTURE/ECRITURE seulement qu'on veut enlever.
simulation_config = deepcopy(_fix_os_paths(_fix_dates(simulation_config))) | ||
simulation_config = deepcopy(_fix_os_paths(simulation_config)) |
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.
En lien avec l'autre commentaire, cet appel demeure correct.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
Does this PR introduce a breaking change?
No
Other information: