Initialize existing project with renv/venv

Open
#9,433 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start in extensions/positron-r/src/commands.ts around the command referenced near line 214, and inspect how command-palette actions are registered with the f1 option. Check the existing-project initialization flow for renv and Python environments. Done means the intended initialization command or commands are discoverable from the command palette.

Written by the indexing model from the issue text.

Description

area: folder template enhancement

I know we give users the option when creating a new project, but I assume users need to run either renv::init() or python -m venv .venv in an existing directory? Certainly not a pressing issue - more curious since we give this option to RStudio users when creating RStudio projects.

This should be possible with Python: Create Environment but I'm not sure if there is an equivalent for renv.

There is a command for this, but it's not surfaced in the command palette.

When asking internally if this was intentional @timtmok had the following to say:

I don't think it was intentional but that the original purpose was to support the new project dialog. I think the registerCommand doesn't intend for those commands to get invoked from the command palette. I think to support the command palette, it needs an action created with the f1: true option so that it can be used in the command palette.

Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/positron

All issues in posit-dev/positron

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.