Skip to content

Conversation

@yuval-qf
Copy link
Collaborator

@yuval-qf yuval-qf commented Jul 7, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a new automated test workflow running tests across multiple Python versions with detailed test and coverage reports.
    • Added a test status badge to the README reflecting the current test results on the main branch.
  • Chores

    • Added a custom GitHub Action to standardize test execution and artifact uploads.
    • Updated build workflow to simplify Python version management.
    • Included pytest-cov as a development dependency for enhanced test coverage reporting.

@yuval-qf yuval-qf requested a review from drorIvry July 7, 2025 18:22
@yuval-qf yuval-qf self-assigned this Jul 7, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 7, 2025

Walkthrough

A new reusable GitHub Action for running Python tests with coverage reporting was introduced. The build workflow was simplified to use a single Python version from a file, and a new test workflow was added to run tests across multiple Python versions using the new action. The development dependencies were updated to include pytest-cov. The README was updated to show a test status badge.

Changes

File(s) Change Summary
.github/actions/run-tests/action.yml Added a custom GitHub Action to run pytest with coverage and upload results as artifacts.
.github/workflows/build.yml Renamed workflow, changed triggers, removed matrix, now uses single Python version from a file.
.github/workflows/test.yml Added new workflow to test across multiple Python versions using the new custom action.
pyproject.toml Added pytest-cov to development dependencies.
README.md Added a GitHub Actions test status badge below the license badge.

Poem

In the warren, tests now run with flair,
Coverage reports floating through the air.
Multiple Pythons hop in a line,
Artifacts gathered, results look fine!
With pytest-cov in our tool-filled den,
The rabbits rejoice—let’s test again!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between c554a90 and e168b72.

📒 Files selected for processing (1)
  • .github/actions/run-tests/action.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/actions/run-tests/action.yml

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Base automatically changed from feature/cli to main July 7, 2025 18:31
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
pyproject.toml (1)

25-27: Align version-pinning strategy across dev dependencies

pytest-cov is introduced with a loose >= spec while several neighbouring dev deps (e.g. bandit, black) are pinned to an exact patch level. Mixing schemes weakens reproducibility. Either pin everything (==) or switch the whole group to compatible upper bounds (e.g. ~=, <).

-    "pytest-cov>=6.2.1",
+    "pytest-cov==6.2.1",
.github/actions/run-tests/action.yml (1)

17-27: Optional: include a coverage quality gate

Uploading the XML is great, but the job will still pass at 0 % coverage.
Consider enforcing a minimum with --cov-fail-under=<threshold> to guard against regressions.

.github/workflows/build.yml (1)

3-9: Add a concurrency group to avoid duplicate builds

When both push and pull_request triggers fire for the same branch, two identical “Build” jobs will run.
Add:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

to save minutes and CI quota.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 3ffffd3 and c963f59.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/actions/run-tests/action.yml (1 hunks)
  • .github/workflows/build.yml (2 hunks)
  • .github/workflows/test.yml (1 hunks)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/clean-code.mdc:0-0
Timestamp: 2025-07-01T11:52:43.736Z
Learning: Keep tests readable and maintainable
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest-cov for coverage
pyproject.toml (5)
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Separate dev dependencies
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest-cov for coverage
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Use proper package versions
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Pin dependency versions
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Store requirements in `requirements.txt` or `pyproject.toml`
.github/actions/run-tests/action.yml (3)
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/tech-stack.mdc:0-0
Timestamp: 2025-07-01T11:55:48.082Z
Learning: Applies to **/tests/**/*.py : Always add tests using pytest
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest for testing
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest-cov for coverage
🔇 Additional comments (2)
.github/workflows/test.yml (2)

25-33: Slow matrix runs: cache the uv/venv layers

Each job now reinstalls dependencies four times. Caching the uv cache directory (usually ~/.cache/uv) or the .venv path can cut minutes off the matrix:

      - name: Cache uv
        uses: actions/cache@v4
        with:
          path: ~/.cache/uv
          key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}

[ suggest_optional_refactor ]


33-37: Verify that the composite action actually receives dev packages

This job relies on the fix proposed in .github/actions/run-tests.
Please ensure the step is updated accordingly or the matrix will fail.

@drorIvry drorIvry merged commit 97a1f3d into main Jul 7, 2025
7 checks passed
@drorIvry drorIvry deleted the feature/tests branch July 7, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants