Skip to content

Commit

Permalink
feat(FT): add format date comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hlecuyer committed Jul 31, 2024
1 parent b32ed08 commit 0098f77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pipeline/dags/dag_utils/sources/france_travail.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ def same_values_every_day(formated_horaires: Dict[str, str]) -> bool:
def format_date_ft_to_open_street_map(
horaires: Optional[List[Dict[str, Any]]],
) -> Optional[str]:
"""Format horaires from France Travail to Open Street Map format
cf: https://francetravail.io/data/api/referentiel-agences?tabgroup-api=documentation&doc-section=api-doc-section-caracteristiques
cf: https://wiki.openstreetmap.org/wiki/Key:opening_hours
The object horaires also contains information on openning hours for appointment
only.
We could added it in this format for example:
"Mo 12:00-14:00 open "Sans RDv", Mo 14:00-16:00 open "Sur RDV seulement"; PH off"
Because of the complexity of the format, we will not implement it for now.
"""
if not horaires:
return None

Expand Down

0 comments on commit 0098f77

Please sign in to comment.