Skip to content

feat: configure Python when reticulate is an R dependency#3552

Draft
zackverham wants to merge 4 commits intomainfrom
feature/reticulate-python-detection
Draft

feat: configure Python when reticulate is an R dependency#3552
zackverham wants to merge 4 commits intomainfrom
feature/reticulate-python-detection

Conversation

@zackverham
Copy link
Collaborator

During initialization, if an R project has reticulate as a dependency in renv.lock, automatically inject a Python section into the configuration file. This mirrors the existing rpy2 detection for Python projects that require R.

Changes:

  • Add IsRContent() method to ContentType
  • Add HasReticulateDependency() to check renv.lock for reticulate
  • Update RequiresPython() to detect reticulate in R projects
  • Add comprehensive tests for new functionality

Closes #1456

Intent

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

User Impact

Automated Tests

Directions for Reviewers

Checklist

  • I have updated the root CHANGELOG.md to cover notable changes.

zackverham and others added 4 commits February 18, 2026 17:10
During initialization, if an R project has reticulate as a dependency
in renv.lock, automatically inject a Python section into the
configuration file. This mirrors the existing rpy2 detection for
Python projects that require R.

Changes:
- Add IsRContent() method to ContentType
- Add HasReticulateDependency() to check renv.lock for reticulate
- Update RequiresPython() to detect reticulate in R projects
- Add comprehensive tests for new functionality

Closes #1456

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests that were missing from the reticulate detection implementation:
- TestHasReticulateDependency_WithoutReticulate: tests lockfile without reticulate
- TestRequiresPython_ReticulateCheckError: tests error propagation from checker

Also fix copyright comment placement in types_test.go.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

R: Configure Python if reticulate is a dependency

1 participant