From 13ca6c126637cff24566417eb81ac48468100e3e Mon Sep 17 00:00:00 2001 From: Paul Leclercq Date: Mon, 22 Apr 2024 19:15:58 +0200 Subject: [PATCH] chores: remove france5 --- .github/workflows/deploy-main.yml | 14 +++++++++----- docker-compose.yml | 2 +- .../data_processing/mediatree/api_import.py | 2 +- test/sitemap/test_mediatree.py | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-main.yml b/.github/workflows/deploy-main.yml index 47fd5e7c..e5c4af45 100644 --- a/.github/workflows/deploy-main.yml +++ b/.github/workflows/deploy-main.yml @@ -41,6 +41,11 @@ jobs: git add pyproject.toml git commit -m "[no ci]: $PROJECT_VERSION bumping version" git push origin main + + docker_build_push: + runs-on: ubuntu-latest + needs: build + steps: - name: Login to Scaleway Container Registry uses: docker/login-action@v3 with: @@ -60,11 +65,10 @@ jobs: - name: Push ingest_to_db Image run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/ingest_to_db - # - name: Build streamlit image - # run: docker build -f Dockerfile_streamlit . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/streamlit - # - name: Push streamlit Image - # run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/streamlit - + scaleway_job_update: + runs-on: ubuntu-latest + needs: docker_build_push + steps: - name: update scaleway job definition with version mediatree_import uses: jawher/action-scw@v2.27.0 env: diff --git a/docker-compose.yml b/docker-compose.yml index 73d7d43c..adc89947 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -116,7 +116,7 @@ services: # UPDATE: "true" # to batch update PG # START_OFFSET: 100 # to batch update PG from a offset # START_DATE: 1704576615 # to test batch import - # CHANNEL : france-info # to reimport only one channel + CHANNEL : france-info # to reimport only one channel MEDIATREE_USER : /run/secrets/username_api MEDIATREE_PASSWORD: /run/secrets/pwd_api MEDIATREE_AUTH_URL: https://keywords.mediatree.fr/api/auth/token/ diff --git a/quotaclimat/data_processing/mediatree/api_import.py b/quotaclimat/data_processing/mediatree/api_import.py index d56f96aa..989d4ad3 100644 --- a/quotaclimat/data_processing/mediatree/api_import.py +++ b/quotaclimat/data_processing/mediatree/api_import.py @@ -66,7 +66,7 @@ def get_channels(): channels = [default_channel] else: #prod - all channels logging.warning("All channels are used") - return ["tf1", "france2", "fr3-idf", "france5", "m6", "arte", "d8", "bfmtv", "lci", "franceinfotv", "itele", + return ["tf1", "france2", "fr3-idf", "m6", "arte", "d8", "bfmtv", "lci", "franceinfotv", "itele", "europe1", "france-culture", "france-inter", "sud-radio", "rmc", "rtl", "france24", "france-info", "rfi"] return channels diff --git a/test/sitemap/test_mediatree.py b/test/sitemap/test_mediatree.py index dd2bb6e0..b6f775fc 100644 --- a/test/sitemap/test_mediatree.py +++ b/test/sitemap/test_mediatree.py @@ -108,7 +108,7 @@ def test_get_channels(): if(os.environ.get("ENV") == "docker"): assert get_channels() == ["france2"] # default for docker compose config else: - assert get_channels() == ["tf1", "france2", "fr3-idf", "france5", "m6", "arte", "d8", "bfmtv", "lci", "franceinfotv", "itele", + assert get_channels() == ["tf1", "france2", "fr3-idf", "m6", "arte", "d8", "bfmtv", "lci", "franceinfotv", "itele", "europe1", "france-culture", "france-inter", "sud-radio", "rmc", "rtl", "france24", "france-info", "rfi"] def test_save_to_pg_keyword():