fix: use min_df=1 in CountVectorizer to prevent crash on small clusters #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Lint | |
| run: | | |
| uv run ruff check src/ tests/ | |
| uv run ruff format --check src/ tests/ | |
| - name: Test | |
| run: uv run pytest tests/ -v | |
| - name: Notify Discord on failure | |
| if: failure() | |
| uses: Ilshidur/action-discord@0.4.0 | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} | |
| DISCORD_USERNAME: "IShowSpeed" | |
| DISCORD_AVATAR: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTumYcOCdUsVMQj9L_eYWlZDe-9MR_R42jp5Q&s" | |
| with: | |
| args: "SUUUUIII--- wait... 💀 ang lint/test sa Topic Worker ni ${{github.actor}} NAGUBA!!! Bro unsa ni?? Fix your code dawg 😭🔴" | |
| - name: Notify Discord on success | |
| if: success() | |
| uses: Ilshidur/action-discord@0.4.0 | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} | |
| DISCORD_USERNAME: "IShowSpeed" | |
| DISCORD_AVATAR: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTumYcOCdUsVMQj9L_eYWlZDe-9MR_R42jp5Q&s" | |
| with: | |
| args: "SUUUUUIIIIII ⚡ Topic Worker CI PASSED!!! si ${{github.actor}} kay goated fr fr 🐐✅ WWWWW chat WWWWW" |