Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup R for openhands #354

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/openhands-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,28 @@ permissions:
issues: write

jobs:
setup-r-environment:
if: ${{ github.actor == 'zachmayer' }}
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {r: 'release'}

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
Comment on lines +32 to +36
Copy link
Contributor

@coderabbitai coderabbitai bot Nov 29, 2024

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add caching to optimize token usage

To align with the PR objective of optimizing token usage, consider enabling caching for R packages.

 - uses: r-lib/actions/setup-r@v2
   with:
     r-version: release
     use-public-rspm: true
+    cache: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
cache: true
- uses: r-lib/actions/setup-r-dependencies@v2

Copy link
Owner Author

Choose a reason for hiding this comment

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

@coderabbitai are you CERTAIN that cache: true is supported by r-lib/actions/setup-r@v2?

Copy link
Contributor

Choose a reason for hiding this comment

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

@zachmayer, you're correct. My apologies, it seems that cache: true is not a supported option for r-lib/actions/setup-r@v2. Thank you for pointing that out.

(_/)
(•.•)
( ? )


✏️ Learnings added
Learnt from: zachmayer
PR: zachmayer/caretEnsemble#354
File: .github/workflows/openhands-resolver.yml:32-36
Timestamp: 2024-11-29T20:50:11.742Z
Learning: The `cache` option is not supported by `r-lib/actions/setup-r@v2`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

with:
extra-packages: any::rcmdcheck
needs: check

call-openhands-resolver:
needs: setup-r-environment
if: ${{ github.actor == 'zachmayer' }}
uses: All-Hands-AI/OpenHands/.github/workflows/openhands-resolver.yml@main
with:
Expand Down
Loading