From 70be60322ed6b9a7cf5d92ebd6baefa9be830fe3 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 15:15:49 +0300 Subject: [PATCH 01/10] resolve bug --- .../services/daily_notices_metadata_services.py | 7 ++++--- tests/e2e/conftest.py | 5 +++++ .../test_notices_metadata_services.py | 14 +++++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py b/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py index 04474568..dda6327e 100644 --- a/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py +++ b/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py @@ -89,11 +89,12 @@ def update_daily_notices_metadata_from_ted(start_date: date = None, # Getting from TED API dates that are not in the repository from date range for day in dates_not_in_repository: - ted_api_query = DAILY_NOTICES_METADATA_TED_API_QUERY + ted_api_query = DAILY_NOTICES_METADATA_TED_API_QUERY.copy() ted_api_query[TED_API_QUERY_FIELD] = ted_api_query[TED_API_QUERY_FIELD].format( aggregation_date=day.strftime(TED_API_WILDCARD_DATE_FORMAT)) - notice_ids = ted_api.get_by_query(ted_api_query, - result_fields=DAILY_NOTICES_METADATA_TED_API_QUERY_RESULT_FIELDS) + notice_ids = ted_api.get_by_query(ted_api_query, result_fields=DAILY_NOTICES_METADATA_TED_API_QUERY_RESULT_FIELDS) + if not notice_ids: + continue daily_notices_metadata = DailyNoticesMetadata(aggregation_date=day) daily_notices_metadata.ted_api_notice_ids = [notice[TED_API_NOTICE_ID_FIELD] for notice in notice_ids] daily_notices_metadata_repo.add(daily_notices_metadata) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index a0fee080..4499a05b 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -85,3 +85,8 @@ def fake_notice_repository(fake_mongodb_client): @pytest.fixture def example_date(): return date(2021, 1, 7) + + +@pytest.fixture +def example_date_without_notices(): + return date(2021, 1, 9) \ No newline at end of file diff --git a/tests/e2e/supra_notice_manager/test_notices_metadata_services.py b/tests/e2e/supra_notice_manager/test_notices_metadata_services.py index f1f92064..7874238f 100644 --- a/tests/e2e/supra_notice_manager/test_notices_metadata_services.py +++ b/tests/e2e/supra_notice_manager/test_notices_metadata_services.py @@ -1,12 +1,13 @@ from ted_sws import config from ted_sws.core.model.supra_notice import DailyNoticesMetadata from ted_sws.data_manager.adapters.daily_notices_metadata_repository import DailyNoticesMetadataRepository -from ted_sws.supra_notice_manager.services.daily_notices_metadata_services import update_daily_notices_metadata_from_ted, \ - update_daily_notices_metadata_with_fetched_data from ted_sws.notice_fetcher.adapters.ted_api import TedAPIAdapter, TedRequestAPI +from ted_sws.supra_notice_manager.services.daily_notices_metadata_services import \ + update_daily_notices_metadata_from_ted, \ + update_daily_notices_metadata_with_fetched_data -def test_update_daily_notices_metadata_from_ted(fake_mongodb_client, example_date): +def test_update_daily_notices_metadata_from_ted(fake_mongodb_client, example_date, example_date_without_notices): """ Test update_daily_notices_metadata_from_ted function """ @@ -14,6 +15,13 @@ def test_update_daily_notices_metadata_from_ted(fake_mongodb_client, example_dat ted_api = TedAPIAdapter(TedRequestAPI(), config.TED_API_URL) daily_notices_metadata_repo = DailyNoticesMetadataRepository(fake_mongodb_client) + update_daily_notices_metadata_from_ted(start_date=example_date_without_notices, + end_date=example_date_without_notices, + ted_api=ted_api, + daily_notices_metadata_repo=daily_notices_metadata_repo) + + assert len(list(daily_notices_metadata_repo.list())) == 0 + update_daily_notices_metadata_from_ted(start_date=example_date, end_date=example_date, ted_api=ted_api, From 6ee10a566d38781abdc8dcf1a7690aa937d71802 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 15:27:03 +0300 Subject: [PATCH 02/10] Update daily_notices_metadata_services.py --- .../services/daily_notices_metadata_services.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py b/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py index dda6327e..6e6705c8 100644 --- a/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py +++ b/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py @@ -93,8 +93,6 @@ def update_daily_notices_metadata_from_ted(start_date: date = None, ted_api_query[TED_API_QUERY_FIELD] = ted_api_query[TED_API_QUERY_FIELD].format( aggregation_date=day.strftime(TED_API_WILDCARD_DATE_FORMAT)) notice_ids = ted_api.get_by_query(ted_api_query, result_fields=DAILY_NOTICES_METADATA_TED_API_QUERY_RESULT_FIELDS) - if not notice_ids: - continue daily_notices_metadata = DailyNoticesMetadata(aggregation_date=day) daily_notices_metadata.ted_api_notice_ids = [notice[TED_API_NOTICE_ID_FIELD] for notice in notice_ids] daily_notices_metadata_repo.add(daily_notices_metadata) @@ -154,4 +152,3 @@ def update_daily_notices_metadata_with_fetched_data(start_date: date = None, daily_notices_metadata.mapping_suite_packages = mapping_suite_packages daily_notices_metadata.fetched_notice_ids = fetched_notice_ids daily_notices_metadata_repo.update(daily_notices_metadata) - From ba3cf16377937eaafad529bd23e8661207ab8ed6 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 15:30:17 +0300 Subject: [PATCH 03/10] Update test_notices_metadata_services.py --- .../supra_notice_manager/test_notices_metadata_services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/supra_notice_manager/test_notices_metadata_services.py b/tests/e2e/supra_notice_manager/test_notices_metadata_services.py index 7874238f..dd5de0c8 100644 --- a/tests/e2e/supra_notice_manager/test_notices_metadata_services.py +++ b/tests/e2e/supra_notice_manager/test_notices_metadata_services.py @@ -20,7 +20,7 @@ def test_update_daily_notices_metadata_from_ted(fake_mongodb_client, example_dat ted_api=ted_api, daily_notices_metadata_repo=daily_notices_metadata_repo) - assert len(list(daily_notices_metadata_repo.list())) == 0 + assert len(list(daily_notices_metadata_repo.list())) == 1 update_daily_notices_metadata_from_ted(start_date=example_date, end_date=example_date, @@ -37,7 +37,7 @@ def test_update_daily_notices_metadata_from_ted(fake_mongodb_client, example_dat ted_api=ted_api, daily_notices_metadata_repo=daily_notices_metadata_repo) - assert len(list(daily_notices_metadata_repo.list())) == 1 + assert len(list(daily_notices_metadata_repo.list())) == 2 def test_update_daily_notices_metadata_with_fetched_data(fake_mongodb_client, From 3e3fcbf2cc6430e91c1ceb2ce7300534f328a8a2 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 15:56:26 +0300 Subject: [PATCH 04/10] Update daily_notices_metadata_update.py --- dags/daily_notices_metadata_update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index f4c42135..86d0ea92 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -4,12 +4,14 @@ from datetime import date, datetime -from airflow.models import Param from airflow.decorators import dag, task +from airflow.models import Param +from airflow.timetables.trigger import CronTriggerTimetable from dags import DEFAULT_DAG_ARGUMENTS from dags.dags_utils import get_dag_param -from ted_sws.supra_notice_manager.services.daily_notices_metadata_services import update_daily_notices_metadata_from_ted, \ +from ted_sws.supra_notice_manager.services.daily_notices_metadata_services import \ + update_daily_notices_metadata_from_ted, \ update_daily_notices_metadata_with_fetched_data START_DATE_PARAM_KEY = "start_date" @@ -19,6 +21,8 @@ @dag(default_args=DEFAULT_DAG_ARGUMENTS, schedule_interval=None, tags=['daily', "dashboards", "metadata", "ted", "notices"], + catchup=False, + timetable=CronTriggerTimetable('0 19 * * *', timezone='UTC'), description=__doc__[0: __doc__.find(".")], doc_md=__doc__, params={ From dd053edb71e1c93e34416ace328610eade3615d6 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 16:02:45 +0300 Subject: [PATCH 05/10] Update daily_notices_metadata_update.py --- dags/daily_notices_metadata_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index 86d0ea92..88cf9787 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -47,8 +47,8 @@ def daily_notices_metadata_update(): @task def update_daily_notices_metadata_from_ted_api(): - start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=True) - end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=True) + start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=False) + end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=False) update_daily_notices_metadata_from_ted(start_date=datetime.strptime(start_date, "%Y-%m-%d"), end_date=datetime.strptime(end_date, "%Y-%m-%d")) From da1977cf69da12407422e0b07e2a69ac9644a096 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 16:03:58 +0300 Subject: [PATCH 06/10] Update daily_notices_metadata_update.py --- dags/daily_notices_metadata_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index 88cf9787..5bf179fe 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -55,8 +55,8 @@ def update_daily_notices_metadata_from_ted_api(): @task def update_daily_notices_metadata_with_fetched_data_from_repo(): - start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=True) - end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=True) + start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=False) + end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=False) update_daily_notices_metadata_with_fetched_data(start_date=datetime.strptime(start_date, "%Y-%m-%d"), end_date=datetime.strptime(end_date, "%Y-%m-%d")) From b67146b9d752efe9db4b9c1590328c14c9a6fc0b Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 16:13:13 +0300 Subject: [PATCH 07/10] make start picking at dag level --- dags/daily_notices_metadata_update.py | 24 +++++++++++++---- .../daily_notices_metadata_services.py | 26 +++++++------------ 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index 5bf179fe..2db81a66 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -2,7 +2,7 @@ DAG to update daily notices metadata from TED. """ -from datetime import date, datetime +from datetime import date, datetime, timedelta from airflow.decorators import dag, task from airflow.models import Param @@ -16,6 +16,8 @@ START_DATE_PARAM_KEY = "start_date" END_DATE_PARAM_KEY = "end_date" +DEFAULT_TED_API_START_DATE = "2014-01-01" +DEFAULT_TED_API_START_DATE_FORMAT = "%Y-%m-%d" @dag(default_args=DEFAULT_DAG_ARGUMENTS, @@ -50,16 +52,28 @@ def update_daily_notices_metadata_from_ted_api(): start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=False) end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=False) - update_daily_notices_metadata_from_ted(start_date=datetime.strptime(start_date, "%Y-%m-%d"), - end_date=datetime.strptime(end_date, "%Y-%m-%d")) + if start_date and end_date: + start_date = datetime.strptime(start_date, "%Y-%m-%d") + end_date = datetime.strptime(end_date, "%Y-%m-%d") + else: + start_date = datetime.strptime(DEFAULT_TED_API_START_DATE, DEFAULT_TED_API_START_DATE_FORMAT) + end_date = datetime.today() - timedelta(days=1) + + update_daily_notices_metadata_from_ted(start_date=start_date, end_date=end_date) @task def update_daily_notices_metadata_with_fetched_data_from_repo(): start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=False) end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=False) - update_daily_notices_metadata_with_fetched_data(start_date=datetime.strptime(start_date, "%Y-%m-%d"), - end_date=datetime.strptime(end_date, "%Y-%m-%d")) + if start_date and end_date: + start_date = datetime.strptime(start_date, "%Y-%m-%d") + end_date = datetime.strptime(end_date, "%Y-%m-%d") + else: + start_date = datetime.strptime(DEFAULT_TED_API_START_DATE, DEFAULT_TED_API_START_DATE_FORMAT) + end_date = datetime.today() - timedelta(days=1) + + update_daily_notices_metadata_with_fetched_data(start_date=start_date, end_date=end_date) update_daily_notices_metadata_from_ted_api() >> update_daily_notices_metadata_with_fetched_data_from_repo() diff --git a/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py b/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py index 6e6705c8..d6f8507d 100644 --- a/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py +++ b/ted_sws/supra_notice_manager/services/daily_notices_metadata_services.py @@ -1,4 +1,4 @@ -from datetime import date, datetime, timedelta +from datetime import date from typing import Optional, List from dateutil import rrule @@ -11,8 +11,6 @@ from ted_sws.data_manager.adapters.notice_repository import NoticeRepository from ted_sws.notice_fetcher.adapters.ted_api import TedAPIAdapter, TedRequestAPI -DEFAULT_TED_API_START_DATE = "2014-01-01" -DEFAULT_TED_API_START_DATE_FORMAT = "%Y-%m-%d" TED_API_NOTICE_ID_FIELD = "ND" TED_API_WILDCARD_DATE_FORMAT = "%Y%m%d*" DAILY_NOTICES_METADATA_TED_API_QUERY_RESULT_FIELDS = {"fields": ["ND"]} @@ -57,20 +55,18 @@ def generate_list_of_dates_from_date_range(start_date: date, end_date: date) -> """ if start_date > end_date: return None - return [ dt.date() for dt in rrule.rrule(rrule.DAILY, - dtstart=start_date, - until=end_date)] + return [dt.date() for dt in rrule.rrule(rrule.DAILY, + dtstart=start_date, + until=end_date)] -def update_daily_notices_metadata_from_ted(start_date: date = None, - end_date: date = None, +def update_daily_notices_metadata_from_ted(start_date: date, + end_date: date, ted_api: TedAPIAdapter = None, daily_notices_metadata_repo: DailyNoticesMetadataRepository = None): """ Updates the daily notices metadata from the TED API. """ - start_date = start_date or datetime.strptime(DEFAULT_TED_API_START_DATE, DEFAULT_TED_API_START_DATE_FORMAT) - end_date = end_date or datetime.today() - timedelta(days=1) if start_date > end_date: raise Exception("Start date cannot be greater than end date") @@ -92,23 +88,21 @@ def update_daily_notices_metadata_from_ted(start_date: date = None, ted_api_query = DAILY_NOTICES_METADATA_TED_API_QUERY.copy() ted_api_query[TED_API_QUERY_FIELD] = ted_api_query[TED_API_QUERY_FIELD].format( aggregation_date=day.strftime(TED_API_WILDCARD_DATE_FORMAT)) - notice_ids = ted_api.get_by_query(ted_api_query, result_fields=DAILY_NOTICES_METADATA_TED_API_QUERY_RESULT_FIELDS) + notice_ids = ted_api.get_by_query(ted_api_query, + result_fields=DAILY_NOTICES_METADATA_TED_API_QUERY_RESULT_FIELDS) daily_notices_metadata = DailyNoticesMetadata(aggregation_date=day) daily_notices_metadata.ted_api_notice_ids = [notice[TED_API_NOTICE_ID_FIELD] for notice in notice_ids] daily_notices_metadata_repo.add(daily_notices_metadata) -def update_daily_notices_metadata_with_fetched_data(start_date: date = None, - end_date: date = None, +def update_daily_notices_metadata_with_fetched_data(start_date: date, + end_date: date, notice_repo: NoticeRepository = None, daily_notices_metadata_repo: DailyNoticesMetadataRepository = None): """ Updates the daily notices metadata witch fetched data. """ - start_date = start_date or datetime.strptime(DEFAULT_TED_API_START_DATE, DEFAULT_TED_API_START_DATE_FORMAT) - end_date = end_date or datetime.today() - timedelta(days=1) - if start_date > end_date: raise Exception("Start date cannot be greater than end date") From 27333593d8dfb78543794bcf62adf356703205cf Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 16:20:15 +0300 Subject: [PATCH 08/10] Update daily_notices_metadata_update.py --- dags/daily_notices_metadata_update.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index 2db81a66..81e8a0d5 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -49,8 +49,8 @@ def daily_notices_metadata_update(): @task def update_daily_notices_metadata_from_ted_api(): - start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=False) - end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=False) + start_date = get_dag_param(key=START_DATE_PARAM_KEY) + end_date = get_dag_param(key=END_DATE_PARAM_KEY) if start_date and end_date: start_date = datetime.strptime(start_date, "%Y-%m-%d") @@ -63,8 +63,8 @@ def update_daily_notices_metadata_from_ted_api(): @task def update_daily_notices_metadata_with_fetched_data_from_repo(): - start_date = get_dag_param(key=START_DATE_PARAM_KEY, raise_error=False) - end_date = get_dag_param(key=END_DATE_PARAM_KEY, raise_error=False) + start_date = get_dag_param(key=START_DATE_PARAM_KEY) + end_date = get_dag_param(key=END_DATE_PARAM_KEY) if start_date and end_date: start_date = datetime.strptime(start_date, "%Y-%m-%d") From b1c5a1cc1bc62df2a38b1fcb6e539d0a68285da0 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 16:30:15 +0300 Subject: [PATCH 09/10] Update daily_notices_metadata_update.py --- dags/daily_notices_metadata_update.py | 30 +++++++++++---------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index 81e8a0d5..0697f054 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -49,29 +49,23 @@ def daily_notices_metadata_update(): @task def update_daily_notices_metadata_from_ted_api(): - start_date = get_dag_param(key=START_DATE_PARAM_KEY) - end_date = get_dag_param(key=END_DATE_PARAM_KEY) + start_date = get_dag_param(key=START_DATE_PARAM_KEY, default_value=DEFAULT_TED_API_START_DATE) + end_date = get_dag_param(key=END_DATE_PARAM_KEY, default_value=(datetime.today() - timedelta(days=1)).strftime( + DEFAULT_TED_API_START_DATE_FORMAT)) - if start_date and end_date: - start_date = datetime.strptime(start_date, "%Y-%m-%d") - end_date = datetime.strptime(end_date, "%Y-%m-%d") - else: - start_date = datetime.strptime(DEFAULT_TED_API_START_DATE, DEFAULT_TED_API_START_DATE_FORMAT) - end_date = datetime.today() - timedelta(days=1) - - update_daily_notices_metadata_from_ted(start_date=start_date, end_date=end_date) + update_daily_notices_metadata_from_ted( + start_date=datetime.strptime(start_date, DEFAULT_TED_API_START_DATE_FORMAT), + end_date=datetime.strptime(end_date, DEFAULT_TED_API_START_DATE_FORMAT)) @task def update_daily_notices_metadata_with_fetched_data_from_repo(): - start_date = get_dag_param(key=START_DATE_PARAM_KEY) - end_date = get_dag_param(key=END_DATE_PARAM_KEY) + start_date = get_dag_param(key=START_DATE_PARAM_KEY, default_value=DEFAULT_TED_API_START_DATE) + end_date = get_dag_param(key=END_DATE_PARAM_KEY, default_value=(datetime.today() - timedelta(days=1)).strftime( + DEFAULT_TED_API_START_DATE_FORMAT)) - if start_date and end_date: - start_date = datetime.strptime(start_date, "%Y-%m-%d") - end_date = datetime.strptime(end_date, "%Y-%m-%d") - else: - start_date = datetime.strptime(DEFAULT_TED_API_START_DATE, DEFAULT_TED_API_START_DATE_FORMAT) - end_date = datetime.today() - timedelta(days=1) + update_daily_notices_metadata_from_ted( + start_date=datetime.strptime(start_date, DEFAULT_TED_API_START_DATE_FORMAT), + end_date=datetime.strptime(end_date, DEFAULT_TED_API_START_DATE_FORMAT)) update_daily_notices_metadata_with_fetched_data(start_date=start_date, end_date=end_date) From a31ae28d108c6f7f39985518b614dd15509fa397 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Fri, 6 Oct 2023 16:31:10 +0300 Subject: [PATCH 10/10] Update daily_notices_metadata_update.py --- dags/daily_notices_metadata_update.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dags/daily_notices_metadata_update.py b/dags/daily_notices_metadata_update.py index 0697f054..f9538f0a 100644 --- a/dags/daily_notices_metadata_update.py +++ b/dags/daily_notices_metadata_update.py @@ -63,12 +63,10 @@ def update_daily_notices_metadata_with_fetched_data_from_repo(): end_date = get_dag_param(key=END_DATE_PARAM_KEY, default_value=(datetime.today() - timedelta(days=1)).strftime( DEFAULT_TED_API_START_DATE_FORMAT)) - update_daily_notices_metadata_from_ted( + update_daily_notices_metadata_with_fetched_data( start_date=datetime.strptime(start_date, DEFAULT_TED_API_START_DATE_FORMAT), end_date=datetime.strptime(end_date, DEFAULT_TED_API_START_DATE_FORMAT)) - update_daily_notices_metadata_with_fetched_data(start_date=start_date, end_date=end_date) - update_daily_notices_metadata_from_ted_api() >> update_daily_notices_metadata_with_fetched_data_from_repo()