Skip to content

chore: harden Taskfile common tasks#39

Merged
KooshaPari merged 1 commit into
mainfrom
chore/taskfile-common-tasks-20260428
Apr 28, 2026
Merged

chore: harden Taskfile common tasks#39
KooshaPari merged 1 commit into
mainfrom
chore/taskfile-common-tasks-20260428

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

@KooshaPari KooshaPari commented Apr 28, 2026

User description

Co-authored-by: Codex noreply@openai.com

Note

Medium Risk
Changes repo-wide build/test/lint automation, including Python project discovery and when pytest runs, which could inadvertently skip checks or change CI behavior.

Overview
Improves Taskfile Python handling by excluding .git, .venv, and target directories from pyproject.toml discovery and by making task detect always print the discovered Python projects (with an opt-in hint via TASK_INCLUDE_PYTHON=1).

Hardens Python execution by running pytest only when a project appears to have top-level tests (otherwise skipping with a message) and by invoking tools via uv run --with pytest/ruff to ensure dependencies are available when running test and lint.

Reviewed by Cursor Bugbot for commit 9a2c22b. Bugbot is set up for automated code reviews on this repo. Configure here.


CodeAnt-AI Description

Show detected Python projects and avoid running Python checks when they have no top-level tests

What Changed

  • task detect now lists each discovered Python project and only shows the opt-in note when Python projects are not included in build, test, and lint runs
  • Python project detection now ignores .git, .venv, and target folders so local and generated directories are not treated as projects
  • task test skips Python projects without top-level tests and prints a clear skip message instead of running pytest anyway
  • Python test and lint runs now include the needed tools when they start, reducing failures caused by missing dependencies

Impact

✅ Clearer project detection
✅ Fewer unnecessary Python test runs
✅ Fewer lint and test failures from missing tools

🔄 Retrigger CodeAnt AI Review

Details

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Co-authored-by: Codex <noreply@openai.com>
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@KooshaPari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 11 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1840c06b-1c08-49cd-9381-d32c768dfb21

📥 Commits

Reviewing files that changed from the base of the PR and between a6fc3cc and 9a2c22b.

📒 Files selected for processing (1)
  • Taskfile.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/taskfile-common-tasks-20260428
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/taskfile-common-tasks-20260428

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KooshaPari KooshaPari merged commit 5f271a6 into main Apr 28, 2026
5 of 7 checks passed
@KooshaPari KooshaPari deleted the chore/taskfile-common-tasks-20260428 branch April 28, 2026 17:09
@sonarqubecloud
Copy link
Copy Markdown

@codeant-ai codeant-ai Bot added the size:S This PR changes 10-29 lines, ignoring generated files label Apr 28, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 28, 2026

CodeAnt AI finished reviewing your PR.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

CodeAnt AI is running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:S This PR changes 10-29 lines, ignoring generated files and removed size:S This PR changes 10-29 lines, ignoring generated files labels May 5, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

Sequence Diagram

This PR updates the Taskfile to more safely detect Python projects, clearly report them to the user, and only run Python tests and linting when appropriate with required tool dependencies.

sequenceDiagram
    participant Developer
    participant Task
    participant Filesystem
    participant PythonProjects

    Developer->>Task: Run detect
    Task->>Filesystem: Find pyproject files excluding git venv and target
    Filesystem-->>Task: Discovered Python projects
    Task-->>Developer: Show detected languages and Python project list with opt in hint

    Developer->>Task: Run test or lint
    Task->>PythonProjects: For each active Python project check for top level tests
    alt Tests found
        Task->>PythonProjects: Run pytest and ruff via uv with required dependencies
    else No tests
        Task-->>Developer: Skip Python checks for project and print skip message
    end
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

CodeAnt AI finished running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

CodeAnt AI is running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:S This PR changes 10-29 lines, ignoring generated files and removed size:S This PR changes 10-29 lines, ignoring generated files labels May 5, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

Sequence Diagram

This PR hardens the Taskfile Python workflows by improving project discovery, always showing detected Python projects in the detect command, and running Python tests and lint only when top-level tests exist, using uv to ensure pytest and ruff are available.

sequenceDiagram
    participant Developer
    participant TaskRunner
    participant PythonProjects
    participant PyTools

    Developer->>TaskRunner: Run task detect
    TaskRunner->>PythonProjects: Discover pyproject files excluding git, venv, target
    PythonProjects-->>TaskRunner: Python project list
    TaskRunner-->>Developer: Show detected languages and Python projects

    alt Python not included in build test lint
        TaskRunner-->>Developer: Show TASK_INCLUDE_PYTHON hint
    end

    Developer->>TaskRunner: Run task test and task lint
    TaskRunner->>PythonProjects: Resolve active Python projects
    loop Each active Python project
        TaskRunner->>PyTools: Check for top-level tests
        alt Top-level tests present
            PyTools->>PyTools: Run tests and lint via uv run with pytest and ruff
        else No top-level tests
            TaskRunner-->>Developer: Skip Python tests for project
        end
    end
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 5, 2026

CodeAnt AI finished running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant