Skip to content

Move coverage helper scripts into action directories#25

Merged
leynos merged 6 commits intomainfrom
codex/move-python-scripts-and-update-references
Jul 6, 2025
Merged

Move coverage helper scripts into action directories#25
leynos merged 6 commits intomainfrom
codex/move-python-scripts-and-update-references

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Jul 6, 2025

Summary

  • relocate Python helper scripts for generate-coverage and ratchet-coverage
  • update action YAML files to reference the new script paths

Testing

  • git log -1 --stat

https://chatgpt.com/codex/tasks/task_e_686a8823e6bc832281c92cd1b6899bc6

Summary by Sourcery

Move coverage helper scripts into their respective action directories and update GitHub Actions workflows to point to the new script locations.

Enhancements:

  • Relocate coverage helper scripts into their respective action directories.

CI:

  • Update generate-coverage and ratchet-coverage action YAMLs to reference helper scripts via github.action_path.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jul 6, 2025

Reviewer's Guide

Scripts for coverage generation and ratcheting have been moved into their respective action directories, and the action YAML files have been updated to reference the new script locations by leveraging the github.action_path and relative paths in run steps.

File-Level Changes

Change Details Files
Updated generate-coverage action to use relocated helper scripts
  • Prefixed all uv run commands with "${{ github.action_path }}/scripts/"
  • Adjusted ratchet coverage script paths to reference ../ratchet-coverage/scripts
  • Re-pointed merge_cobertura and set_outputs scripts to action directory
.github/actions/generate-coverage/action.yml
Updated ratchet-coverage action to use relocated helper scripts
  • Prefixed uv run commands with "${{ github.action_path }}/scripts/" for install, run, and ratchet steps
.github/actions/ratchet-coverage/action.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 6, 2025

Warning

Rate limit exceeded

@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 15 seconds before requesting another review.

⌛ 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 6bd6730 and 8fc7749.

📒 Files selected for processing (3)
  • .github/actions/generate-coverage/action.yml (3 hunks)
  • .github/actions/ratchet-coverage/action.yml (4 hunks)
  • .github/actions/ratchet-coverage/scripts/ratchet_coverage.py (1 hunks)

Summary by CodeRabbit

  • Chores
    • Removed the "Ratchet coverage" GitHub Action and all related documentation and references.
    • Updated the coverage generation workflow to use fully qualified script paths and improved setup for dependencies.
    • Updated code ownership and README to reflect the removal of the "Ratchet coverage" action.

Summary by CodeRabbit

  • Chores
    • Improved reliability of coverage and ratchet coverage workflows by updating script paths to use absolute references.
    • Replaced manual uv installation steps with an automated setup action for a more streamlined environment setup.
    • Clarified action input types for better configuration validation.

Summary by CodeRabbit

  • Chores
    • Updated internal workflow scripts to improve reliability by using fully qualified script paths.
    • Switched to a dedicated action for setting up the runtime environment, streamlining setup steps in workflows.

Summary by CodeRabbit

  • Chores
    • Updated internal workflow scripts to use absolute paths for improved reliability in GitHub Actions. No changes to user-facing features or behaviour.

Walkthrough

The changes update GitHub Actions workflow files to use fully qualified script paths by leveraging the ${{ github.action_path }} variable. All script invocations now reference absolute paths instead of relative ones. No modifications were made to control flow, logic, or environment variables. Additionally, the entire "Ratchet coverage" GitHub Action was removed, including its inputs, outputs, caching, installation steps, and documentation.

Changes

File(s) Change Summary
.github/actions/generate-coverage/action.yml Updated all script invocations to use ${{ github.action_path }} for absolute paths; added uv setup step and removed previous uv install and Python version setup.
.github/actions/ratchet-coverage/action.yml Entire file deleted, removing the "Ratchet coverage" GitHub Action including inputs, outputs, caching, installation, and coverage ratcheting steps.
.github/actions/ratchet-coverage/CHANGELOG.md Deleted file documenting version history of the removed "Ratchet coverage" action.
.github/actions/ratchet-coverage/README.md Deleted README documenting usage and details of the removed "Ratchet coverage" action.
CODEOWNERS Removed ownership entry for .github/actions/ratchet-coverage/ directory.
README.md Removed the "Ratchet coverage" action entry from the list of available actions.

Possibly related PRs

Poem

Hopping along the action trail,
Paths now clear, no chance to fail.
From relative to absolute, what a leap!
Scripts find their way, no need to peep.
With every run, coverage shines bright—
A rabbit’s delight, all paths set right!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in a Comment
  • Commit Unit Tests in branch codex/move-python-scripts-and-update-references

🪧 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 docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for 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.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
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: 3

♻️ Duplicate comments (1)
.github/actions/generate-coverage/action.yml (1)

73-74: Same uv-before-install issue as above – see earlier comment.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 770fe8a and 906b5af.

📒 Files selected for processing (2)
  • .github/actions/generate-coverage/action.yml (4 hunks)
  • .github/actions/ratchet-coverage/action.yml (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}`: Each action...

.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}: Each action must have its own directory under .github/actions/, containing action.yml, README.md, src/, tests/, and CHANGELOG.md

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/ratchet-coverage/action.yml
  • .github/actions/generate-coverage/action.yml
`.github/actions/*/action.yml`: Fill in action.yml with every input and output; ...

.github/actions/*/action.yml: Fill in action.yml with every input and output; mark required ones clearly
For composite actions and path context, use "${{ github.action_path }}" when referencing sibling scripts for portability

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/ratchet-coverage/action.yml
  • .github/actions/generate-coverage/action.yml
🔇 Additional comments (5)
.github/actions/ratchet-coverage/action.yml (1)

46-47: Path change looks good – resolves correctly under ${{ github.action_path }}
No further issues spotted.

.github/actions/generate-coverage/action.yml (4)

82-90: Cross-action relative path is valid
Using "${{ github.action_path }}/../ratchet-coverage/scripts/ratchet_coverage.py" keeps the dependency internal to the repository while remaining portable. Looks good.


121-122: Path normalisation OK
The script location update matches the new directory layout; no issues detected.


127-128: Path normalisation OK


134-135: Path normalisation OK

Comment thread .github/actions/ratchet-coverage/action.yml
Comment thread .github/actions/ratchet-coverage/action.yml Outdated
Copy link
Copy Markdown
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

🔭 Outside diff range comments (1)
.github/actions/ratchet-coverage/action.yml (1)

3-7: Add an explicit type: string for baseline-file to stay consistent with other inputs
YAML-level validation is clearer when every input declares its type.

   baseline-file:
     description: Path to store the coverage baseline
     required: false
+    type: string
     default: .coverage-baseline
♻️ Duplicate comments (3)
.github/actions/ratchet-coverage/action.yml (2)

19-21: uv bootstrap now happens before first use – good catch
Moving the astral-sh/setup-uv@v5 step to the top eliminates the cold-runner failure that was flagged earlier.


52-53: Baseline file is now passed explicitly – previous gap resolved
Forwarding --baseline-file makes the action self-contained and removes hidden coupling inside the Python script.

.github/actions/generate-coverage/action.yml (1)

48-49: Early uv setup prevents the previously reported failure
Placing setup-uv before any uv run invocation resolves the runner bootstrapping issue.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 906b5af and 58fdf5f.

📒 Files selected for processing (2)
  • .github/actions/generate-coverage/action.yml (4 hunks)
  • .github/actions/ratchet-coverage/action.yml (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}`: Each action...

.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}: Each action must have its own directory under .github/actions/, containing action.yml, README.md, src/, tests/, and CHANGELOG.md

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/ratchet-coverage/action.yml
  • .github/actions/generate-coverage/action.yml
`.github/actions/*/action.yml`: Fill in action.yml with every input and output; ...

.github/actions/*/action.yml: Fill in action.yml with every input and output; mark required ones clearly
For composite actions and path context, use "${{ github.action_path }}" when referencing sibling scripts for portability

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/ratchet-coverage/action.yml
  • .github/actions/generate-coverage/action.yml

Comment thread .github/actions/generate-coverage/action.yml Outdated
Copy link
Copy Markdown
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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 58fdf5f and cf06dac.

📒 Files selected for processing (1)
  • .github/actions/ratchet-coverage/action.yml (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}`: Each action...

.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}: Each action must have its own directory under .github/actions/, containing action.yml, README.md, src/, tests/, and CHANGELOG.md

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/ratchet-coverage/action.yml
`.github/actions/*/action.yml`: Fill in action.yml with every input and output; ...

.github/actions/*/action.yml: Fill in action.yml with every input and output; mark required ones clearly
For composite actions and path context, use "${{ github.action_path }}" when referencing sibling scripts for portability

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/ratchet-coverage/action.yml
🔇 Additional comments (3)
.github/actions/ratchet-coverage/action.yml (3)

7-7: Declare input type – nice addition

Explicitly setting type: string makes the composite action schema clearer and prevents metadata-parsing edge-cases.


39-39: Absolute script path improves portability – looks good

Migrating to ${{ github.action_path }} avoids path-resolution issues when the working directory changes.


52-54: Explicit --baseline-file forwarding – LGTM

Passing the baseline path explicitly removes magic defaults and aligns with previous review feedback.

Comment thread .github/actions/ratchet-coverage/action.yml
Comment thread .github/actions/ratchet-coverage/action.yml Outdated
Copy link
Copy Markdown
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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf06dac and 6bd6730.

📒 Files selected for processing (6)
  • .github/actions/generate-coverage/action.yml (4 hunks)
  • .github/actions/ratchet-coverage/CHANGELOG.md (0 hunks)
  • .github/actions/ratchet-coverage/README.md (0 hunks)
  • .github/actions/ratchet-coverage/action.yml (0 hunks)
  • CODEOWNERS (0 hunks)
  • README.md (0 hunks)
💤 Files with no reviewable changes (5)
  • CODEOWNERS
  • README.md
  • .github/actions/ratchet-coverage/CHANGELOG.md
  • .github/actions/ratchet-coverage/README.md
  • .github/actions/ratchet-coverage/action.yml
🧰 Additional context used
📓 Path-based instructions (2)
`.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}`: Each action...

.github/actions/*/{action.yml,README.md,CHANGELOG.md,src/,tests/}: Each action must have its own directory under .github/actions/, containing action.yml, README.md, src/, tests/, and CHANGELOG.md

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/generate-coverage/action.yml
`.github/actions/*/action.yml`: Fill in action.yml with every input and output; ...

.github/actions/*/action.yml: Fill in action.yml with every input and output; mark required ones clearly
For composite actions and path context, use "${{ github.action_path }}" when referencing sibling scripts for portability

📄 Source: CodeRabbit Inference Engine (AGENTS.md)

List of files the instruction was applied to:

  • .github/actions/generate-coverage/action.yml
🔇 Additional comments (5)
.github/actions/generate-coverage/action.yml (5)

48-49: uv now installed before first usage – nice catch.

Placing astral-sh/setup-uv@v5 at the very top eliminates the “uv: command not found” failure reported earlier.
No further issues spotted here.


75-76: Script path is now self-contained – good clean-up.

Switching to ${{ github.action_path }}/scripts/run_rust.py removes the fragile ../ traversal and makes packaging safer.


120-121: Path update looks correct.

run_python.py now resolves relative to the action – portable and Marketplace-safe.


126-127: Merge script path updated – LGTM.
No functional change beyond improved portability.


133-134: Output-setting script path updated – LGTM.
Everything aligns with the new directory layout.

Comment thread .github/actions/generate-coverage/action.yml
Comment thread .github/actions/generate-coverage/action.yml Outdated
@leynos leynos merged commit c8a105e into main Jul 6, 2025
1 check passed
@leynos leynos deleted the codex/move-python-scripts-and-update-references branch July 6, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant