From a7072c3b6f6f7295f0475f37df171d4a7aef4575 Mon Sep 17 00:00:00 2001 From: Paul Leclercq Date: Wed, 19 Jun 2024 16:28:24 +0200 Subject: [PATCH] refacto: modin has problem with multiple type for same column (#187) * refacto: modin has problem with multiple type for same column * chores: docker compose * fix: filelock bug * fix: test --- docker-compose.yml | 2 +- poetry.lock | 159 +++++++++--------- pyproject.toml | 2 +- .../mediatree/channel_program.json | 50 +++--- .../mediatree/channel_program.py | 18 +- .../mediatree/update_pg_keywords.py | 3 +- test/sitemap/test_program_metadata.py | 6 +- transform_program.py | 2 +- 8 files changed, 122 insertions(+), 120 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 21692cd08..a286ef1eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -135,7 +135,7 @@ services: #entrypoint: ["python", "quotaclimat/data_processing/mediatree/api_import.py"] environment: ENV: docker # change me to prod for real cases - LOGLEVEL: INFO # Change me to info (debug, info, warning, error) to have less log + LOGLEVEL: DEBUG # Change me to info (debug, info, warning, error) to have less log PYTHONPATH: /app POSTGRES_USER: user POSTGRES_DB: barometre diff --git a/poetry.lock b/poetry.lock index 207c42435..7c75e5c0c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -865,18 +865,18 @@ devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benc [[package]] name = "filelock" -version = "3.15.1" +version = "3.14.0" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ - {file = "filelock-3.15.1-py3-none-any.whl", hash = "sha256:71b3102950e91dfc1bb4209b64be4dc8854f40e5f534428d8684f953ac847fac"}, - {file = "filelock-3.15.1.tar.gz", hash = "sha256:58a2549afdf9e02e10720eaa4d4470f56386d7a6f72edd7d0596337af8ed7ad8"}, + {file = "filelock-3.14.0-py3-none-any.whl", hash = "sha256:43339835842f110ca7ae60f1e1c160714c5a6afd15a2873419ab185334975c0f"}, + {file = "filelock-3.14.0.tar.gz", hash = "sha256:6ea72da3be9b8c82afd3edcf99f2fffbb5076335a5ae4d03248bb5b6c3eae78a"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] typing = ["typing-extensions (>=4.8)"] [[package]] @@ -2212,27 +2212,28 @@ files = [ [[package]] name = "psutil" -version = "5.9.8" +version = "6.0.0" description = "Cross-platform lib for process and system monitoring in Python." optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" -files = [ - {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"}, - {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"}, - {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7"}, - {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36"}, - {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d"}, - {file = "psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e"}, - {file = "psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631"}, - {file = "psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81"}, - {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421"}, - {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4"}, - {file = "psutil-5.9.8-cp36-cp36m-win32.whl", hash = "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee"}, - {file = "psutil-5.9.8-cp36-cp36m-win_amd64.whl", hash = "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2"}, - {file = "psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0"}, - {file = "psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf"}, - {file = "psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8"}, - {file = "psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c"}, +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +files = [ + {file = "psutil-6.0.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6"}, + {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0"}, + {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:a9a3dbfb4de4f18174528d87cc352d1f788b7496991cca33c6996f40c9e3c92c"}, + {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:6ec7588fb3ddaec7344a825afe298db83fe01bfaaab39155fa84cf1c0d6b13c3"}, + {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1e7c870afcb7d91fdea2b37c24aeb08f98b6d67257a5cb0a8bc3ac68d0f1a68c"}, + {file = "psutil-6.0.0-cp27-none-win32.whl", hash = "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35"}, + {file = "psutil-6.0.0-cp27-none-win_amd64.whl", hash = "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1"}, + {file = "psutil-6.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0"}, + {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0"}, + {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd"}, + {file = "psutil-6.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2e8d0054fc88153ca0544f5c4d554d42e33df2e009c4ff42284ac9ebdef4132"}, + {file = "psutil-6.0.0-cp36-cp36m-win32.whl", hash = "sha256:fc8c9510cde0146432bbdb433322861ee8c3efbf8589865c8bf8d21cb30c4d14"}, + {file = "psutil-6.0.0-cp36-cp36m-win_amd64.whl", hash = "sha256:34859b8d8f423b86e4385ff3665d3f4d94be3cdf48221fbe476e883514fdb71c"}, + {file = "psutil-6.0.0-cp37-abi3-win32.whl", hash = "sha256:a495580d6bae27291324fe60cea0b5a7c23fa36a7cd35035a16d93bdcf076b9d"}, + {file = "psutil-6.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:33ea5e1c975250a720b3a6609c490db40dae5d83a4eb315170c4fe0d8b1f34b3"}, + {file = "psutil-6.0.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:ffe7fc9b6b36beadc8c322f84e1caff51e8703b88eee1da46d1e3a6ae11b4fd0"}, + {file = "psutil-6.0.0.tar.gz", hash = "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2"}, ] [package.extras] @@ -3221,18 +3222,18 @@ tests = ["coverage[toml] (>=5.0.2)", "pytest"] [[package]] name = "setuptools" -version = "70.0.0" +version = "70.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, - {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, + {file = "setuptools-70.1.0-py3-none-any.whl", hash = "sha256:d9b8b771455a97c8a9f3ab3448ebe0b29b5e105f1228bba41028be116985a267"}, + {file = "setuptools-70.1.0.tar.gz", hash = "sha256:01a1e793faa5bd89abc851fa15d0a0db26f160890c7102cd8dce643e886b47f5"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "shellingham" @@ -3269,64 +3270,64 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.30" +version = "2.0.31" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.30-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3b48154678e76445c7ded1896715ce05319f74b1e73cf82d4f8b59b46e9c0ddc"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2753743c2afd061bb95a61a51bbb6a1a11ac1c44292fad898f10c9839a7f75b2"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7bfc726d167f425d4c16269a9a10fe8630ff6d14b683d588044dcef2d0f6be7"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4f61ada6979223013d9ab83a3ed003ded6959eae37d0d685db2c147e9143797"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3a365eda439b7a00732638f11072907c1bc8e351c7665e7e5da91b169af794af"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bba002a9447b291548e8d66fd8c96a6a7ed4f2def0bb155f4f0a1309fd2735d5"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-win32.whl", hash = "sha256:0138c5c16be3600923fa2169532205d18891b28afa817cb49b50e08f62198bb8"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-win_amd64.whl", hash = "sha256:99650e9f4cf3ad0d409fed3eec4f071fadd032e9a5edc7270cd646a26446feeb"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:955991a09f0992c68a499791a753523f50f71a6885531568404fa0f231832aa0"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f69e4c756ee2686767eb80f94c0125c8b0a0b87ede03eacc5c8ae3b54b99dc46"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69c9db1ce00e59e8dd09d7bae852a9add716efdc070a3e2068377e6ff0d6fdaa"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1429a4b0f709f19ff3b0cf13675b2b9bfa8a7e79990003207a011c0db880a13"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:efedba7e13aa9a6c8407c48facfdfa108a5a4128e35f4c68f20c3407e4376aa9"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:16863e2b132b761891d6c49f0a0f70030e0bcac4fd208117f6b7e053e68668d0"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-win32.whl", hash = "sha256:2ecabd9ccaa6e914e3dbb2aa46b76dede7eadc8cbf1b8083c94d936bcd5ffb49"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-win_amd64.whl", hash = "sha256:0b3f4c438e37d22b83e640f825ef0f37b95db9aa2d68203f2c9549375d0b2260"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5a79d65395ac5e6b0c2890935bad892eabb911c4aa8e8015067ddb37eea3d56c"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9a5baf9267b752390252889f0c802ea13b52dfee5e369527da229189b8bd592e"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cb5a646930c5123f8461f6468901573f334c2c63c795b9af350063a736d0134"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:296230899df0b77dec4eb799bcea6fbe39a43707ce7bb166519c97b583cfcab3"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c62d401223f468eb4da32627bffc0c78ed516b03bb8a34a58be54d618b74d472"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3b69e934f0f2b677ec111b4d83f92dc1a3210a779f69bf905273192cf4ed433e"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-win32.whl", hash = "sha256:77d2edb1f54aff37e3318f611637171e8ec71472f1fdc7348b41dcb226f93d90"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-win_amd64.whl", hash = "sha256:b6c7ec2b1f4969fc19b65b7059ed00497e25f54069407a8701091beb69e591a5"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5a8e3b0a7e09e94be7510d1661339d6b52daf202ed2f5b1f9f48ea34ee6f2d57"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b60203c63e8f984df92035610c5fb76d941254cf5d19751faab7d33b21e5ddc0"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1dc3eabd8c0232ee8387fbe03e0a62220a6f089e278b1f0aaf5e2d6210741ad"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:40ad017c672c00b9b663fcfcd5f0864a0a97828e2ee7ab0c140dc84058d194cf"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e42203d8d20dc704604862977b1470a122e4892791fe3ed165f041e4bf447a1b"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-win32.whl", hash = "sha256:2a4f4da89c74435f2bc61878cd08f3646b699e7d2eba97144030d1be44e27584"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-win_amd64.whl", hash = "sha256:b6bf767d14b77f6a18b6982cbbf29d71bede087edae495d11ab358280f304d8e"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bc0c53579650a891f9b83fa3cecd4e00218e071d0ba00c4890f5be0c34887ed3"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:311710f9a2ee235f1403537b10c7687214bb1f2b9ebb52702c5aa4a77f0b3af7"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:408f8b0e2c04677e9c93f40eef3ab22f550fecb3011b187f66a096395ff3d9fd"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37a4b4fb0dd4d2669070fb05b8b8824afd0af57587393015baee1cf9890242d9"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a943d297126c9230719c27fcbbeab57ecd5d15b0bd6bfd26e91bfcfe64220621"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0a089e218654e740a41388893e090d2e2c22c29028c9d1353feb38638820bbeb"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-win32.whl", hash = "sha256:fa561138a64f949f3e889eb9ab8c58e1504ab351d6cf55259dc4c248eaa19da6"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-win_amd64.whl", hash = "sha256:7d74336c65705b986d12a7e337ba27ab2b9d819993851b140efdf029248e818e"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae8c62fe2480dd61c532ccafdbce9b29dacc126fe8be0d9a927ca3e699b9491a"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2383146973a15435e4717f94c7509982770e3e54974c71f76500a0136f22810b"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8409de825f2c3b62ab15788635ccaec0c881c3f12a8af2b12ae4910a0a9aeef6"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0094c5dc698a5f78d3d1539853e8ecec02516b62b8223c970c86d44e7a80f6c7"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:edc16a50f5e1b7a06a2dcc1f2205b0b961074c123ed17ebda726f376a5ab0953"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f7703c2010355dd28f53deb644a05fc30f796bd8598b43f0ba678878780b6e4c"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-win32.whl", hash = "sha256:1f9a727312ff6ad5248a4367358e2cf7e625e98b1028b1d7ab7b806b7d757513"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-win_amd64.whl", hash = "sha256:a0ef36b28534f2a5771191be6edb44cc2673c7b2edf6deac6562400288664221"}, - {file = "SQLAlchemy-2.0.30-py3-none-any.whl", hash = "sha256:7108d569d3990c71e26a42f60474b4c02c8586c4681af5fd67e51a044fdea86a"}, - {file = "SQLAlchemy-2.0.30.tar.gz", hash = "sha256:2b1708916730f4830bc69d6f49d37f7698b5bd7530aca7f04f785f8849e95255"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f2a213c1b699d3f5768a7272de720387ae0122f1becf0901ed6eaa1abd1baf6c"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9fea3d0884e82d1e33226935dac990b967bef21315cbcc894605db3441347443"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3ad7f221d8a69d32d197e5968d798217a4feebe30144986af71ada8c548e9fa"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2bee229715b6366f86a95d497c347c22ddffa2c7c96143b59a2aa5cc9eebbc"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cd5b94d4819c0c89280b7c6109c7b788a576084bf0a480ae17c227b0bc41e109"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:750900a471d39a7eeba57580b11983030517a1f512c2cb287d5ad0fcf3aebd58"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-win32.whl", hash = "sha256:7bd112be780928c7f493c1a192cd8c5fc2a2a7b52b790bc5a84203fb4381c6be"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-win_amd64.whl", hash = "sha256:5a48ac4d359f058474fadc2115f78a5cdac9988d4f99eae44917f36aa1476327"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f68470edd70c3ac3b6cd5c2a22a8daf18415203ca1b036aaeb9b0fb6f54e8298"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e2c38c2a4c5c634fe6c3c58a789712719fa1bf9b9d6ff5ebfce9a9e5b89c1ca"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd15026f77420eb2b324dcb93551ad9c5f22fab2c150c286ef1dc1160f110203"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2196208432deebdfe3b22185d46b08f00ac9d7b01284e168c212919891289396"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:352b2770097f41bff6029b280c0e03b217c2dcaddc40726f8f53ed58d8a85da4"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:56d51ae825d20d604583f82c9527d285e9e6d14f9a5516463d9705dab20c3740"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-win32.whl", hash = "sha256:6e2622844551945db81c26a02f27d94145b561f9d4b0c39ce7bfd2fda5776dac"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-win_amd64.whl", hash = "sha256:ccaf1b0c90435b6e430f5dd30a5aede4764942a695552eb3a4ab74ed63c5b8d3"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3b74570d99126992d4b0f91fb87c586a574a5872651185de8297c6f90055ae42"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f77c4f042ad493cb8595e2f503c7a4fe44cd7bd59c7582fd6d78d7e7b8ec52c"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd1591329333daf94467e699e11015d9c944f44c94d2091f4ac493ced0119449"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74afabeeff415e35525bf7a4ecdab015f00e06456166a2eba7590e49f8db940e"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b9c01990d9015df2c6f818aa8f4297d42ee71c9502026bb074e713d496e26b67"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:66f63278db425838b3c2b1c596654b31939427016ba030e951b292e32b99553e"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-win32.whl", hash = "sha256:0b0f658414ee4e4b8cbcd4a9bb0fd743c5eeb81fc858ca517217a8013d282c96"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-win_amd64.whl", hash = "sha256:fa4b1af3e619b5b0b435e333f3967612db06351217c58bfb50cee5f003db2a5a"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f43e93057cf52a227eda401251c72b6fbe4756f35fa6bfebb5d73b86881e59b0"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d337bf94052856d1b330d5fcad44582a30c532a2463776e1651bd3294ee7e58b"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c06fb43a51ccdff3b4006aafee9fcf15f63f23c580675f7734245ceb6b6a9e05"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:b6e22630e89f0e8c12332b2b4c282cb01cf4da0d26795b7eae16702a608e7ca1"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:79a40771363c5e9f3a77f0e28b3302801db08040928146e6808b5b7a40749c88"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-win32.whl", hash = "sha256:501ff052229cb79dd4c49c402f6cb03b5a40ae4771efc8bb2bfac9f6c3d3508f"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-win_amd64.whl", hash = "sha256:597fec37c382a5442ffd471f66ce12d07d91b281fd474289356b1a0041bdf31d"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:dc6d69f8829712a4fd799d2ac8d79bdeff651c2301b081fd5d3fe697bd5b4ab9"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:23b9fbb2f5dd9e630db70fbe47d963c7779e9c81830869bd7d137c2dc1ad05fb"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a21c97efcbb9f255d5c12a96ae14da873233597dfd00a3a0c4ce5b3e5e79704"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26a6a9837589c42b16693cf7bf836f5d42218f44d198f9343dd71d3164ceeeac"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc251477eae03c20fae8db9c1c23ea2ebc47331bcd73927cdcaecd02af98d3c3"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:2fd17e3bb8058359fa61248c52c7b09a97cf3c820e54207a50af529876451808"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-win32.whl", hash = "sha256:c76c81c52e1e08f12f4b6a07af2b96b9b15ea67ccdd40ae17019f1c373faa227"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-win_amd64.whl", hash = "sha256:4b600e9a212ed59355813becbcf282cfda5c93678e15c25a0ef896b354423238"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b6cf796d9fcc9b37011d3f9936189b3c8074a02a4ed0c0fbbc126772c31a6d4"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:78fe11dbe37d92667c2c6e74379f75746dc947ee505555a0197cfba9a6d4f1a4"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fc47dc6185a83c8100b37acda27658fe4dbd33b7d5e7324111f6521008ab4fe"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a41514c1a779e2aa9a19f67aaadeb5cbddf0b2b508843fcd7bafdf4c6864005"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:afb6dde6c11ea4525318e279cd93c8734b795ac8bb5dda0eedd9ebaca7fa23f1"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3f9faef422cfbb8fd53716cd14ba95e2ef655400235c3dfad1b5f467ba179c8c"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-win32.whl", hash = "sha256:fc6b14e8602f59c6ba893980bea96571dd0ed83d8ebb9c4479d9ed5425d562e9"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-win_amd64.whl", hash = "sha256:3cb8a66b167b033ec72c3812ffc8441d4e9f5f78f5e31e54dcd4c90a4ca5bebc"}, + {file = "SQLAlchemy-2.0.31-py3-none-any.whl", hash = "sha256:69f3e3c08867a8e4856e92d7afb618b95cdee18e0bc1647b77599722c9a28911"}, + {file = "SQLAlchemy-2.0.31.tar.gz", hash = "sha256:b607489dd4a54de56984a0c7656247504bd5523d9d0ba799aef59d4add009484"}, ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} +greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} typing-extensions = ">=4.6.0" [package.extras] @@ -3881,4 +3882,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.11.0,<3.13.0" -content-hash = "729b44c4b57bf7b10e7b718ee737f7c9bc4fb75221c3480b98fee8dc113953ab" +content-hash = "f09e47495fc42990c384332d6d768edad2f54fcbfcbeab01ab6aa15dfaf9b5db" diff --git a/pyproject.toml b/pyproject.toml index 40acad052..5befb31f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ tenacity = "^8.2.3" sentry-sdk = "^1.44.1" coverage = "^7.4.2" modin = {extras = ["ray"], version = "^0.30.1"} - +filelock = "<=3.14" [build-system] requires = ["poetry-core>=1.1"] build-backend = "poetry.core.masonry.api" diff --git a/quotaclimat/data_processing/mediatree/channel_program.json b/quotaclimat/data_processing/mediatree/channel_program.json index 62dcc2878..4e989cc90 100644 --- a/quotaclimat/data_processing/mediatree/channel_program.json +++ b/quotaclimat/data_processing/mediatree/channel_program.json @@ -1,22 +1,22 @@ {"channel_name":"tf1","start":"6:55","end":"9:30","weekday":"weekday","program_name":"Bonjour ! La Matinale","program_type":"Information - Magazine"} {"channel_name":"tf1","start":"13:00","end":"13:40","weekday":"*","program_name":"JT 13h","program_type":"Information - Journal"} {"channel_name":"tf1","start":"19:55","end":"20:40","weekday":"*","program_name":"JT 20h + météo","program_type":"Information - Journal"} -{"channel_name":"tf1","start":"13:40","end":"14:50","weekday":6,"program_name":"Reportage Découverte","program_type":"Information - Magazine"} -{"channel_name":"tf1","start":"14:50","end":"16:00","weekday":6,"program_name":"Grands reportages","program_type":"Information - Magazine"} -{"channel_name":"tf1","start":"17:15","end":"18:20","weekday":6,"program_name":"Sept à huit Life","program_type":"Information - Magazine"} -{"channel_name":"tf1","start":"18:20","end":"19:45","weekday":6,"program_name":"Sept à huit","program_type":"Information - Magazine"} +{"channel_name":"tf1","start":"13:40","end":"14:50","weekday":"6","program_name":"Reportage Découverte","program_type":"Information - Magazine"} +{"channel_name":"tf1","start":"14:50","end":"16:00","weekday":"6","program_name":"Grands reportages","program_type":"Information - Magazine"} +{"channel_name":"tf1","start":"17:15","end":"18:20","weekday":"6","program_name":"Sept à huit Life","program_type":"Information - Magazine"} +{"channel_name":"tf1","start":"18:20","end":"19:45","weekday":"6","program_name":"Sept à huit","program_type":"Information - Magazine"} {"channel_name":"france2","start":"6:00","end":"6:25","weekday":"*","program_name":"Le 6h Info","program_type":"Information - Journal"} {"channel_name":"france2","start":"6:30","end":"9:30","weekday":"*","program_name":"Télématin","program_type":"Information - Autres émissions"} {"channel_name":"france2","start":"13:00","end":"13:40","weekday":"weekday","program_name":"JT 13h","program_type":"Information - Journal"} {"channel_name":"france2","start":"13:00","end":"13:15","weekday":"weekend","program_name":"JT 13h","program_type":"Information - Journal"} -{"channel_name":"france2","start":"13:15","end":"14:05","weekday":5,"program_name":"13h15 le samedi","program_type":"Information - Journal"} -{"channel_name":"france2","start":"13:15","end":"14:05","weekday":6,"program_name":"13h15 le dimanche","program_type":"Information - Journal"} -{"channel_name":"france2","start":"10:35","end":"11:00","weekday":6,"program_name":"Nous les européens","program_type":"Information - Journal"} +{"channel_name":"france2","start":"13:15","end":"14:05","weekday":"5","program_name":"13h15 le samedi","program_type":"Information - Journal"} +{"channel_name":"france2","start":"13:15","end":"14:05","weekday":"6","program_name":"13h15 le dimanche","program_type":"Information - Journal"} +{"channel_name":"france2","start":"10:35","end":"11:00","weekday":"6","program_name":"Nous les européens","program_type":"Information - Journal"} {"channel_name":"france2","start":"19:55","end":"20:40","weekday":"weekday","program_name":"JT 20h + météo","program_type":"Information - Journal"} {"channel_name":"france2","start":"19:55","end":"20:30","weekday":"weekend","program_name":"JT 20h + météo","program_type":"Information - Journal"} -{"channel_name":"france2","start":"21:10","end":"23:00","weekday":3,"program_name":"Envoyé spécial","program_type":"Information - Magazine"} -{"channel_name":"france2","start":"20:30","end":"21:00","weekday":5,"program_name":"20h30 le samedi","program_type":"Information - Journal"} -{"channel_name":"france2","start":"20:30","end":"21:00","weekday":6,"program_name":"20h30 le dimanche","program_type":"Information - Journal"} +{"channel_name":"france2","start":"21:10","end":"23:00","weekday":"3","program_name":"Envoyé spécial","program_type":"Information - Magazine"} +{"channel_name":"france2","start":"20:30","end":"21:00","weekday":"5","program_name":"20h30 le samedi","program_type":"Information - Journal"} +{"channel_name":"france2","start":"20:30","end":"21:00","weekday":"6","program_name":"20h30 le dimanche","program_type":"Information - Journal"} {"channel_name":"fr3-idf","start":"7:00","end":"9:00","weekday":"weekday","program_name":"Ici Matin","program_type":"Information - Journal"} {"channel_name":"fr3-idf","start":"12:00","end":"12:50","weekday":"*","program_name":"JT 12h","program_type":"Information - Journal"} {"channel_name":"fr3-idf","start":"19:00","end":"19:55","weekday":"*","program_name":"JT 19h + météo","program_type":"Information - Journal"} @@ -24,9 +24,9 @@ {"channel_name":"m6","start":"13:50","end":"17:20","weekday":"weekday","program_name":"1 jour un doc","program_type":"Information - Magazine"} {"channel_name":"m6","start":"13:15","end":"13:50","weekday":"weekday","program_name":"1245 le mag","program_type":"Information - Magazine"} {"channel_name":"m6","start":"19:40","end":"20:10","weekday":"*","program_name":"JT 1945 + météo","program_type":"Information - Journal"} -{"channel_name":"m6","start":"11:00","end":"12:30","weekday":5,"program_name":"66 minutes samedi","program_type":"Information - Magazine"} -{"channel_name":"m6","start":"16:35","end":"19:30","weekday":6,"program_name":"66 minutes","program_type":"Information - Magazine"} -{"channel_name":"m6","start":"21:10","end":"23:15","weekday":6,"program_name":"Capital / Zone interdite","program_type":"Information - Magazine"} +{"channel_name":"m6","start":"11:00","end":"12:30","weekday":"5","program_name":"66 minutes samedi","program_type":"Information - Magazine"} +{"channel_name":"m6","start":"16:35","end":"19:30","weekday":"6","program_name":"66 minutes","program_type":"Information - Magazine"} +{"channel_name":"m6","start":"21:10","end":"23:15","weekday":"6","program_name":"Capital / Zone interdite","program_type":"Information - Magazine"} {"channel_name":"arte","start":"19:45","end":"20:05","weekday":"*","program_name":"JT","program_type":"Information - Journal"} {"channel_name":"arte","start":"20:05","end":"20:50","weekday":"*","program_name":"28 minutes","program_type":"Information - Magazine"} {"channel_name":"d8","start":"12:30","end":"13:00","weekday":"weekday","program_name":"Le journal du jour + météo","program_type":"Information - Journal"} @@ -35,15 +35,15 @@ {"channel_name":"lci","start":"6:00","end":"23:00","weekday":"*","program_name":"Information en continu","program_type":"Information en continu"} {"channel_name":"france24","start":"6:00","end":"23:00","weekday":"*","program_name":"Information en continu","program_type":"Information en continu"} {"channel_name":"franceinfotv","start":"6:00","end":"23:00","weekday":"*","program_name":"Information en continu","program_type":"Information en continu"} -{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":0,"program_name":"Le 5/7","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":0,"program_name":"Le 7/10","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":1,"program_name":"Le 5/7","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":1,"program_name":"Le 7/10","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":2,"program_name":"Le 5/7","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":2,"program_name":"Le 7/10","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":3,"program_name":"Le 5/7","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":3,"program_name":"Le 7/10","program_type":"Information - Magazine"} -{"channel_name":"france-inter","start":"6:00","end":"9:00","weekday":4,"program_name":"Le 6/9","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":"0","program_name":"Le 5/7","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":"0","program_name":"Le 7/10","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":"1","program_name":"Le 5/7","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":"1","program_name":"Le 7/10","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":"2","program_name":"Le 5/7","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":"2","program_name":"Le 7/10","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"6:00","end":"7:00","weekday":"3","program_name":"Le 5/7","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"7:00","end":"10:00","weekday":"3","program_name":"Le 7/10","program_type":"Information - Magazine"} +{"channel_name":"france-inter","start":"6:00","end":"9:00","weekday":"4","program_name":"Le 6/9","program_type":"Information - Magazine"} {"channel_name":"france-inter","start":"6:00","end":"9:00","weekday":"weekend","program_name":"Le 6/9","program_type":"Information - Magazine"} {"channel_name":"france-inter","start":"13:00","end":"14:00","weekday":"weekday","program_name":"Le 13/14","program_type":"Information - Magazine"} {"channel_name":"france-inter","start":"13:00","end":"13:30","weekday":"weekend","program_name":"Le journal de 13h du WE","program_type":"Information - Journal"} @@ -55,10 +55,10 @@ {"channel_name":"rtl","start":"7:00","end":"9:00","weekday":"weekday","program_name":"RTL Matin","program_type":"Information - Magazine"} {"channel_name":"rtl","start":"12:00","end":"13:00","weekday":"weekday","program_name":"RTL Midi","program_type":"Information - Magazine"} {"channel_name":"rtl","start":"18:00","end":"20:00","weekday":"weekday","program_name":"RTL Bonsoir","program_type":"Information - Magazine"} -{"channel_name":"rtl","start":"18:00","end":"18:15","weekday":5,"program_name":"Journal","program_type":"Information - Journal"} +{"channel_name":"rtl","start":"18:00","end":"18:15","weekday":"5","program_name":"Journal","program_type":"Information - Journal"} {"channel_name":"rtl","start":"6:00","end":"9:15","weekday":"weekend","program_name":"RTL Matin","program_type":"Information - Magazine"} -{"channel_name":"rtl","start":"18:00","end":"19:15","weekday":6,"program_name":"RTL Dimanche soir","program_type":"Information - Magazine"} -{"channel_name":"rtl","start":"13:00","end":"14:00","weekday":6,"program_name":"Focus Dimanche","program_type":"Information - Magazine"} +{"channel_name":"rtl","start":"18:00","end":"19:15","weekday":"6","program_name":"RTL Dimanche soir","program_type":"Information - Magazine"} +{"channel_name":"rtl","start":"13:00","end":"14:00","weekday":"6","program_name":"Focus Dimanche","program_type":"Information - Magazine"} {"channel_name":"rmc","start":"6:30","end":"9:00","weekday":"weekday","program_name":"Apolline Matin","program_type":"Information - Magazine"} {"channel_name":"rmc","start":"9:00","end":"12:00","weekday":"weekday","program_name":"Les grandes gueules","program_type":"Information - Magazine"} {"channel_name":"rmc","start":"12:00","end":"15:00","weekday":"weekday","program_name":"Estelle Midi","program_type":"Information - Magazine"} diff --git a/quotaclimat/data_processing/mediatree/channel_program.py b/quotaclimat/data_processing/mediatree/channel_program.py index c15175b0f..d3a46ca2b 100644 --- a/quotaclimat/data_processing/mediatree/channel_program.py +++ b/quotaclimat/data_processing/mediatree/channel_program.py @@ -15,12 +15,12 @@ def get_programs(): current_dir = os.path.dirname(os.path.abspath(__file__)) json_file_path = os.path.join(current_dir, 'channel_program.json') data_dtype = { # UserWarning: `read_*` implementation has mismatches with pandas: - "channel_name":pd.StringDtype, - "start":pd.StringDtype, - "end":pd.StringDtype, - "weekday":pd.StringDtype, - "program_name":pd.StringDtype, - "program_type":pd.StringDtype + "channel_name":str, + "start":str, + "end":str, + "weekday":str, + "program_name":str, + "program_type":str } logging.debug(f"Reading {json_file_path}") df_programs = pd.read_json(json_file_path, lines=True, dtype=data_dtype) @@ -44,11 +44,11 @@ def add_channel_program(df: pd.DataFrame): logging.error("Could not merge program and subtitle df", error) raise Exception -def compare_weekday(df_program_weekday, start_weekday: int) -> bool: +def compare_weekday(df_program_weekday: str, start_weekday: int) -> bool: logging.debug(f"Comparing weekday {start_weekday} with df_program_weekday value : {df_program_weekday}") - match isinstance(df_program_weekday, str): + match not df_program_weekday.isdigit(): case False: #int case - return start_weekday == df_program_weekday + return start_weekday == int(df_program_weekday) case True: # string case match df_program_weekday: case '*': return True diff --git a/quotaclimat/data_processing/mediatree/update_pg_keywords.py b/quotaclimat/data_processing/mediatree/update_pg_keywords.py index 401b36ce5..15d9e9622 100644 --- a/quotaclimat/data_processing/mediatree/update_pg_keywords.py +++ b/quotaclimat/data_processing/mediatree/update_pg_keywords.py @@ -19,7 +19,7 @@ def update_keywords(session: Session, batch_size: int = 50000, start_offset : in logging.info(f"Updating {total_updates} saved keywords from {start_offset} offsets - batch size {batch_size} - until offset {until_offset}") df_programs = get_programs() - + logging.debug("Got channel programs") for i in range(start_offset, until_offset, batch_size): current_batch_saved_keywords = get_keywords_columns(session, i, batch_size) logging.info(f"Updating {len(current_batch_saved_keywords)} elements from {i} offsets - batch size {batch_size} - until offset {until_offset}") @@ -100,6 +100,7 @@ def update_keywords(session: Session, batch_size: int = 50000, start_offset : in def get_keywords_columns(session: Session, page: int = 0, batch_size: int = 50000) -> list: + logging.debug(f"Getting {batch_size} elements from offset {page}") return ( session.query( Keywords.id, diff --git a/test/sitemap/test_program_metadata.py b/test/sitemap/test_program_metadata.py index 96201d852..e23341694 100644 --- a/test/sitemap/test_program_metadata.py +++ b/test/sitemap/test_program_metadata.py @@ -192,6 +192,6 @@ def test_compare_weekday_string(): assert compare_weekday('weekend', 3) == False def test_compare_weekday_int(): - assert compare_weekday(1, 5) == False - assert compare_weekday(1, 1) == True - assert compare_weekday(4, 4) == True \ No newline at end of file + assert compare_weekday("1", 5) == False + assert compare_weekday("1", 1) == True + assert compare_weekday("4", 4) == True \ No newline at end of file diff --git a/transform_program.py b/transform_program.py index 4bda44472..91f55da46 100644 --- a/transform_program.py +++ b/transform_program.py @@ -192,7 +192,7 @@ def generate_program_id(channel_name, weekday, program_name): else: # from 1 to 7 to simplify SQL queries new_program_data = program_data.copy() - new_program_data['weekday'] = new_program_data['weekday'] + 1 + new_program_data['weekday'] = int(new_program_data['weekday']) + 1 programs.append(new_program_data) for program in programs: