From 3a1d94edb2ac1d15dd8512d237521002522a5779 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Thu, 12 Jun 2025 22:52:49 +0300 Subject: [PATCH 1/7] daily run --- requirements.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index d451d56..e074734 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,57 @@ -python-telegram-bot==20.8 +aiohttp==3.9.1 +aiosignal==1.3.2 +altgraph @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/altgraph-0.17.2-py2.py3-none-any.whl +anyio==4.9.0 +async-timeout==4.0.3 +attrs==25.3.0 +beautifulsoup4==4.12.3 +cachetools==5.5.2 +certifi==2025.4.26 +charset-normalizer==3.4.2 +exceptiongroup==1.2.2 +frozenlist==1.6.2 +future @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/future-0.18.2-py3-none-any.whl +google-ai-generativelanguage==0.4.0 +google-api-core==2.25.0 +google-auth==2.40.3 google-generativeai==0.3.2 -requests==2.32.4 +googleapis-common-protos==1.70.0 +greenlet==3.0.3 +grpcio==1.72.1 +grpcio-status==1.62.3 +h11==0.16.0 +httpcore==1.0.9 +httpx==0.26.0 +idna==3.10 +iniconfig==2.1.0 +macholib @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/macholib-1.15.2-py2.py3-none-any.whl +multidict==6.4.4 +packaging==25.0 +playwright==1.42.0 +pluggy==1.5.0 +propcache==0.3.1 +proto-plus==1.26.1 +protobuf==4.25.8 +pyasn1==0.6.1 +pyasn1_modules==0.4.2 +pyee==11.0.1 +Pygments==2.19.1 +pytest==8.4.0 +pytest-asyncio==1.0.0 +pytest-mock==3.12.0 python-dotenv==1.0.1 +python-telegram-bot==20.8 +redis==6.2.0 +requests==2.31.0 +rsa==4.9.1 schedule==1.2.1 -spotipy==2.25.1 -pytest==8.0.0 -pytest-mock==3.12.0 \ No newline at end of file +six @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/six-1.15.0-py2.py3-none-any.whl +sniffio==1.3.1 +soupsieve==2.7 +spotipy==2.23.0 +tomli==2.2.1 +tqdm==4.67.1 +typing_extensions==4.14.0 +urllib3==2.4.0 +uv==0.7.8 +yarl==1.20.0 From 198f4a2e085647c8f90796c496816ea6a6001d81 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Fri, 13 Jun 2025 14:35:36 +0300 Subject: [PATCH 2/7] daily run --- .github/workflows/UnitTests.yml | 21 ++------------------- requirements.txt | 8 ++++---- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index ea71d2c..90bb1f4 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -7,24 +7,7 @@ on: branches: [ main ] jobs: - security-scan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install safety - - name: Check for security vulnerabilities - run: | - safety check - test: - needs: security-scan runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -35,8 +18,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - pip install requests==2.32.4 spotipy==2.25.1 + pip install --no-cache-dir -r requirements.txt + pip install --no-cache-dir beautifulsoup4 - name: Run tests run: | python -m pytest -v \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e074734..3caf0fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -aiohttp==3.9.1 +aiohttp==3.10.11 aiosignal==1.3.2 altgraph @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/altgraph-0.17.2-py2.py3-none-any.whl anyio==4.9.0 @@ -36,19 +36,19 @@ pyasn1==0.6.1 pyasn1_modules==0.4.2 pyee==11.0.1 Pygments==2.19.1 -pytest==8.4.0 +pytest==8.0.0 pytest-asyncio==1.0.0 pytest-mock==3.12.0 python-dotenv==1.0.1 python-telegram-bot==20.8 redis==6.2.0 -requests==2.31.0 +requests==2.32.4 rsa==4.9.1 schedule==1.2.1 six @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/six-1.15.0-py2.py3-none-any.whl sniffio==1.3.1 soupsieve==2.7 -spotipy==2.23.0 +spotipy==2.25.1 tomli==2.2.1 tqdm==4.67.1 typing_extensions==4.14.0 From 28293602663d2160d7ad5924e6deeb44763cdbf0 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Fri, 13 Jun 2025 14:40:15 +0300 Subject: [PATCH 3/7] daily run --- .github/workflows/UnitTests.yml | 2 +- .gitignore | 20 +++++++++++ requirements.txt | 60 ++++----------------------------- 3 files changed, 28 insertions(+), 54 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 90bb1f4..1cc5f5d 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -19,7 +19,7 @@ jobs: run: | python -m pip install --upgrade pip pip install --no-cache-dir -r requirements.txt - pip install --no-cache-dir beautifulsoup4 + pip install --no-cache-dir beautifulsoup4 pytest-asyncio - name: Run tests run: | python -m pytest -v \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9a56cf3..ef8f0c2 100644 --- a/.gitignore +++ b/.gitignore @@ -194,3 +194,23 @@ cython_debug/ .cursorindexingignore .DS_Store + +# pytest +.pytest_cache/ +.coverage +htmlcov/ + +# Virtual Environment +venv/ +env/ +ENV/ + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db diff --git a/requirements.txt b/requirements.txt index 3caf0fe..f000f67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,57 +1,11 @@ -aiohttp==3.10.11 -aiosignal==1.3.2 -altgraph @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/altgraph-0.17.2-py2.py3-none-any.whl -anyio==4.9.0 -async-timeout==4.0.3 -attrs==25.3.0 -beautifulsoup4==4.12.3 -cachetools==5.5.2 -certifi==2025.4.26 -charset-normalizer==3.4.2 -exceptiongroup==1.2.2 -frozenlist==1.6.2 -future @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/future-0.18.2-py3-none-any.whl -google-ai-generativelanguage==0.4.0 -google-api-core==2.25.0 -google-auth==2.40.3 -google-generativeai==0.3.2 -googleapis-common-protos==1.70.0 -greenlet==3.0.3 -grpcio==1.72.1 -grpcio-status==1.62.3 -h11==0.16.0 -httpcore==1.0.9 -httpx==0.26.0 -idna==3.10 -iniconfig==2.1.0 -macholib @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/macholib-1.15.2-py2.py3-none-any.whl -multidict==6.4.4 -packaging==25.0 -playwright==1.42.0 -pluggy==1.5.0 -propcache==0.3.1 -proto-plus==1.26.1 -protobuf==4.25.8 -pyasn1==0.6.1 -pyasn1_modules==0.4.2 -pyee==11.0.1 -Pygments==2.19.1 -pytest==8.0.0 -pytest-asyncio==1.0.0 -pytest-mock==3.12.0 -python-dotenv==1.0.1 python-telegram-bot==20.8 -redis==6.2.0 +google-generativeai==0.3.2 requests==2.32.4 -rsa==4.9.1 +python-dotenv==1.0.1 schedule==1.2.1 -six @ file:///AppleInternal/Library/BuildRoots/bcce998f-ff34-11ef-9d34-f2a857e00a32/Library/Caches/com.apple.xbs/Sources/python3/six-1.15.0-py2.py3-none-any.whl -sniffio==1.3.1 -soupsieve==2.7 spotipy==2.25.1 -tomli==2.2.1 -tqdm==4.67.1 -typing_extensions==4.14.0 -urllib3==2.4.0 -uv==0.7.8 -yarl==1.20.0 +pytest==8.0.0 +pytest-mock==3.12.0 +aiohttp==3.10.11 +altgraph==0.17.2 +six==1.15.0 From e32ada585153870bec36131880388fb866bfd848 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Fri, 13 Jun 2025 17:21:18 +0300 Subject: [PATCH 4/7] daily run --- .github/workflows/DailyRun.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/DailyRun.yml b/.github/workflows/DailyRun.yml index da026ba..45038de 100644 --- a/.github/workflows/DailyRun.yml +++ b/.github/workflows/DailyRun.yml @@ -1,28 +1,28 @@ -name: Daily Main Script +name: Daily Run on: schedule: - - cron: '0 5 * * *' # 8 AM IDT (UTC+3) - workflow_dispatch: # Enables manual run from GitHub UI + - cron: '0 5 * * *' # 8AM IDT (UTC+3) = 5AM UTC jobs: - run-main: + run-program: runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: - python-version: '3.x' # Adjust to your Python version - + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - pip install requests==2.32.4 spotipy==2.25.1 - - - name: Run main.py - run: python main.py + pip install --no-cache-dir -r requirements.txt + pip install --no-cache-dir beautifulsoup4 + - name: Run program + env: + SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} + SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }} + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + run: | + python main.py From 1549ba1da4bd2fefe9485dc579d911bc25b5ce13 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Fri, 13 Jun 2025 17:23:49 +0300 Subject: [PATCH 5/7] daily run --- .github/workflows/DailyRun.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/DailyRun.yml b/.github/workflows/DailyRun.yml index 45038de..b163d4a 100644 --- a/.github/workflows/DailyRun.yml +++ b/.github/workflows/DailyRun.yml @@ -3,6 +3,7 @@ name: Daily Run on: schedule: - cron: '0 5 * * *' # 8AM IDT (UTC+3) = 5AM UTC + workflow_dispatch: # Enables manual run from GitHub UI jobs: run-program: From bb219f51e21ed8a7d78723aa9817e910d2129576 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Fri, 13 Jun 2025 17:32:05 +0300 Subject: [PATCH 6/7] daily run --- .github/workflows/DailyRun.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/DailyRun.yml b/.github/workflows/DailyRun.yml index b163d4a..36ed293 100644 --- a/.github/workflows/DailyRun.yml +++ b/.github/workflows/DailyRun.yml @@ -19,11 +19,40 @@ jobs: python -m pip install --upgrade pip pip install --no-cache-dir -r requirements.txt pip install --no-cache-dir beautifulsoup4 + - name: Verify environment variables + run: | + echo "Checking environment variables..." + if [ -n "$GENIUS_ACCESS_TOKEN" ]; then + echo "GENIUS_ACCESS_TOKEN is set" + else + echo "GENIUS_ACCESS_TOKEN is not set" + fi + if [ -n "$SPOTIFY_CLIENT_ID" ]; then + echo "SPOTIFY_CLIENT_ID is set" + else + echo "SPOTIFY_CLIENT_ID is not set" + fi + if [ -n "$SPOTIFY_CLIENT_SECRET" ]; then + echo "SPOTIFY_CLIENT_SECRET is set" + else + echo "SPOTIFY_CLIENT_SECRET is not set" + fi + if [ -n "$GOOGLE_API_KEY" ]; then + echo "GOOGLE_API_KEY is set" + else + echo "GOOGLE_API_KEY is not set" + fi + if [ -n "$TELEGRAM_BOT_TOKEN" ]; then + echo "TELEGRAM_BOT_TOKEN is set" + else + echo "TELEGRAM_BOT_TOKEN is not set" + fi - name: Run program env: SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + GENIUS_ACCESS_TOKEN: ${{ secrets.GENIUS_ACCESS_TOKEN }} run: | python main.py From e2809babc421290fa57784315015e22c643c8351 Mon Sep 17 00:00:00 2001 From: Tomer Seinfeld Date: Fri, 13 Jun 2025 17:33:41 +0300 Subject: [PATCH 7/7] daily run --- .github/workflows/DailyRun.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/DailyRun.yml b/.github/workflows/DailyRun.yml index 36ed293..27e45ad 100644 --- a/.github/workflows/DailyRun.yml +++ b/.github/workflows/DailyRun.yml @@ -47,6 +47,11 @@ jobs: else echo "TELEGRAM_BOT_TOKEN is not set" fi + if [ -n "$TELEGRAM_CHANNEL_ID" ]; then + echo "TELEGRAM_CHANNEL_ID is set" + else + echo "TELEGRAM_CHANNEL_ID is not set" + fi - name: Run program env: SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} @@ -54,5 +59,6 @@ jobs: GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} GENIUS_ACCESS_TOKEN: ${{ secrets.GENIUS_ACCESS_TOKEN }} + TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }} run: | python main.py