Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

removes _fix_dates #233

wants to merge 6 commits into from

Conversation

essicolo
Copy link
Collaborator

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
  • (If applicable) Documentation has been added / updated (for bug fixes / features).
  • (If applicable) Tests have been added.
  • CHANGELOG.rst has been updated (with summary of main changes).
    • Link to issue (:issue:number) and pull request (:pull:number) has been added.

What kind of change does this PR introduce?

  • Removes _fix_dates from _hydrotel.py since it's not relevant and likely to generate errors

Does this PR introduce a breaking change?

No

Other information:

Copy link

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 AUTHORS.rst and .zenodo.json:

  • The relevant author information has been added to AUTHORS.rst and .zenodo.json.

Please make sure you've read our contributing guide. We look forward to reviewing your Pull Request shortly ✨

@github-actions github-actions bot added the docs label Nov 22, 2024
Copy link
Collaborator

@RondeauG RondeauG left a 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..

Comment on lines -599 to -604
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")
Copy link
Collaborator

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))
Copy link
Collaborator

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.

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

Successfully merging this pull request may close these issues.

Retirer _fix_dates de _hydrotel.py
3 participants