tataille / node-red-french-holidays

A node-red component for French Holiday
Apache License 2.0
7 stars 3 forks source link

Erreur zone Toulouse #17

Closed malys closed 10 hours ago

malys commented 20 hours ago

Bonjour, Tout d'abord merci pour ce développement. Je l'utilise depuis plusieurs années mais dernièrement, j'ai régulièrement des problèmes et les données ne sont plus fiables du tout.

Ex: Toulouse 4/11/24, reprise après les vacances de la Toussaint: "isSchoolHolidays":true

{"day":1,"isPublicHoliday":false,"isTomorrowPublicHoliday":false,"publicHolidayName":null,"nextPublicHolidayName":"11 novembre","nextPublicHolidayDate":"11/11/2024","isSchoolHolidays":true,"isTomorrowSchoolHolidays":false,"schoolHolidaysName":"Vacances de la Toussaint","schoolHolidaysEndDate":"04/11/2024","nextSchoolHolidaysCoutdownInDays":47,"nextSchoolHolidaysName":"Vacances de Noël","nextSchoolHolidaysStartDate":"21/12/2024","nextSchoolHolidaysEndDate":"06/01/2025","schoolPeriod":"2024-2025","year":2024,"region":"Métropole","academy":"Toulouse","zones":"Zone C","version":"1.2.4"}

Pendant les vacances, c'était faux également. Version: @tataille/node-red-french-holidays 1.2.4 nodered 4.0.5

malys commented 20 hours ago

La requête https://data.education.gouv.fr/api/records/1.0/search/?dataset=fr-en-calendrier-scolaire&q=&rows=100&facet=description&facet=start_date&facet=end_date&facet=location&facet=zones&refine.location=Toulouse&refine.annee_scolaire=2024-2025 renvoie les bonnes données

{"nhits": 7, "parameters": {"dataset": "fr-en-calendrier-scolaire", "rows": 100, "start": 0, "facet": ["description", "start_date", "end_date", "location", "zones"], "refine": {"annee_scolaire": "2024-2025"}, "format": "json", "timezone": "UTC"}, "records": [{"datasetid": "fr-en-calendrier-scolaire", "recordid": "157245ca4425705d92c86302aa530bbfa6166988", "fields": {"end_date": "2024-11-03T23:00:00+00:00", "start_date": "2024-10-18T22:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Vacances de la Toussaint", "zones": "Zone C", "population": "-"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}, {"datasetid": "fr-en-calendrier-scolaire", "recordid": "5ff04d4c095798ce255a84781952b8c8467af0dc", "fields": {"end_date": "2025-04-27T22:00:00+00:00", "start_date": "2025-04-11T22:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Vacances de Printemps", "zones": "Zone C", "population": "-"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}, {"datasetid": "fr-en-calendrier-scolaire", "recordid": "e2eb26e9d88b008d05cf19891ec95130d491bb2f", "fields": {"end_date": "2025-08-31T22:00:00+00:00", "start_date": "2025-07-04T22:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Vacances d'\u00c9t\u00e9", "zones": "Zone C", "population": "\u00c9l\u00e8ves"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}, {"datasetid": "fr-en-calendrier-scolaire", "recordid": "c8285853495b3cfaa0ae365b7ee47dcd9119f361", "fields": {"end_date": "2025-06-01T22:00:00+00:00", "start_date": "2025-05-28T22:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Pont de l'Ascension", "zones": "Zone C", "population": "-"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}, {"datasetid": "fr-en-calendrier-scolaire", "recordid": "fa20f168423aecf9839a1ccb51fcb07d20bbb193", "fields": {"end_date": "2025-08-28T22:00:00+00:00", "start_date": "2025-07-04T22:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Vacances d'\u00c9t\u00e9", "zones": "Zone C", "population": "Enseignants"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}, {"datasetid": "fr-en-calendrier-scolaire", "recordid": "8f82ad91334ddf7df52821142664a1f1b7dcec33", "fields": {"end_date": "2025-01-05T23:00:00+00:00", "start_date": "2024-12-20T23:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Vacances de No\u00ebl", "zones": "Zone C", "population": "-"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}, {"datasetid": "fr-en-calendrier-scolaire", "recordid": "cdcc0f74aa2aa984334d03c554f4f1901ceb5cde", "fields": {"end_date": "2025-03-02T23:00:00+00:00", "start_date": "2025-02-14T23:00:00+00:00", "location": "Toulouse", "annee_scolaire": "2024-2025", "description": "Vacances d'Hiver", "zones": "Zone C", "population": "-"}, "record_timestamp": "2024-07-25T12:01:26.929Z"}], "facet_groups": [{"name": "description", "facets": [{"name": "Vacances d'\u00c9t\u00e9", "count": 2, "state": "displayed", "path": "Vacances d'\u00c9t\u00e9"}, {"name": "Pont de l'Ascension", "count": 1, "state": "displayed", "path": "Pont de l'Ascension"}, {"name": "Vacances d'Hiver", "count": 1, "state": "displayed", "path": "Vacances d'Hiver"}, {"name": "Vacances de No\u00ebl", "count": 1, "state": "displayed", "path": "Vacances de No\u00ebl"}, {"name": "Vacances de Printemps", "count": 1, "state": "displayed", "path": "Vacances de Printemps"}, {"name": "Vacances de la Toussaint", "count": 1, "state": "displayed", "path": "Vacances de la Toussaint"}]}, {"name": "start_date", "facets": [{"name": "2024", "count": 2, "state": "displayed", "path": "2024"}, {"name": "2025", "count": 5, "state": "displayed", "path": "2025"}]}, {"name": "end_date", "facets": [{"name": "2024", "count": 1, "state": "displayed", "path": "2024"}, {"name": "2025", "count": 6, "state": "displayed", "path": "2025"}]}, {"name": "location", "facets": [{"name": "Toulouse", "count": 7, "state": "refined", "path": "Toulouse"}]}, {"name": "zones", "facets": [{"name": "Zone C", "count": 7, "state": "displayed", "path": "Zone C"}]}, {"name": "annee_scolaire", "facets": [{"name": "2024-2025", "count": 7, "state": "refined", "path": "2024-2025"}]}]}

Il doit y avoir un bug?

malys commented 12 hours ago

See https://github.com/tataille/node-red-french-holidays/pull/18

tataille commented 10 hours ago

Code under review. I made some comments. But the rest is good.

tataille commented 10 hours ago

Fixed in version 1.2.5