posit-dev / positron

Positron, a next-generation data science IDE
Other
2.4k stars 70 forks source link

Enhanced Environments Management pane #1391

Open kmasiello opened 11 months ago

kmasiello commented 11 months ago

Building off of #1369.

Package and environments management with renv and venv are similar in motion to version control -- make some changes, see the effects, commit (snapshot or freeze) them. Similar to the Git Pane in RStudio, or the Git extension in VS Code, a renv or venv pane would make package snapshots and environments management more in the forefront and easier for users to adopt and thoughtfully manage their environments.

Having the repository source clearly identified as well (options("repos") or index-url from pip.conf) would go a long way in preventing surprises when packages are being installed from unexpected repositories.

One could even envision a close integration with Package Manager and ability to browse repo snapshots from the IDE.

jennybc commented 11 months ago

I think this could be a huge win for helping folks be successful and happy with renv (with which I am no expert, but I know more about that than virtual envs). I think it is a lot like Git where, for some folks, using a git client really helps them reach the next level of understanding and fluidity.

jthomasmock commented 11 months ago

Possibly for inspiration: https://marketplace.visualstudio.com/items?itemName=donjayamanne.python-environment-manager

image

jennybc commented 11 months ago

I think it's nice to note when Positron would have a feature that RStudio does not have and AFAICT this would qualify.

jmcphers commented 11 months ago

make some changes, see the effects, commit (snapshot or freeze) them.

It is worth noting that this feature existed in RStudio once upon a time. We had pretty deep integration with Packrat, such that changes you made to the library would show up in the Packages pane where you could commit them, etc.

image

https://rstudio.github.io/packrat/rstudio.html

Unfortunately this feature was largely unused, unloved, and unsuccessful. I'm not sure why off the top of my head -- but we should probably think about it a little bit before embarking upon a similar adventure.

isabelizimm commented 11 months ago

Possibly for inspiration: marketplace.visualstudio.com/items?itemName=donjayamanne.python-environment-manager

FWIW, I do like this extension in Python! Its primary use case in my world is when trying I'm trying to look across multiple types of environments (eg, i have things installed in pyenv, venv, conda, and global python environments), which is a pretty Python-specific problem. I don't love the deeply nested dropdowns, but the information is easier to find than trying to remember each environment's specific commands 🙂

juliasilge commented 11 months ago

In our Python OSS sync meeting this week, folks reiterated again how much they want to have a nice way to view/see their Python environment. Many folks are users of the existing extension linked above ⤴️ and would like something similar. Folks expressed that this is more about seeing their environment, confirming what's in it, and monitoring its status, and less about, say, installing packages.

jgutman commented 8 months ago

Another point -- currently, hitting the "Delete all objects" button also clears away any loaded modules/submodules. This is reasonable, but a bit unexpected since 1) those modules are not displayed anywhere in the Variables pane 2) the tooltip text "Delete all objects" doesn't indicate to me my modules will be unloaded and 3) the modal pop-up (Are you sure you want to delete all variables?) also doesn't indicate to me that my modules will be unloaded.

image

I think clearing away all the modules and submodules when I hit that button is probably a good thing, but the fact that there's zero connection between the loaded modules/packages and the Variables pane makes it pretty surprising

ntluong95 commented 1 month ago

It is very hard to check packages installed in R environment currently. Hope the feature will be considered soon

juliasilge commented 1 month ago

@ntluong95 For a temporary workaround, you can use sessioninfo::session_info() in the console.

jmcphers commented 1 month ago

Another vote for a packages pane for R here: https://github.com/posit-dev/positron/issues/4260

juliasilge commented 4 weeks ago

A suggestion here to provide more active/opinionated support for managing Python envs, and specifically generating requirements.txt in a smarter way than pip freeze: https://github.com/posit-dev/positron/discussions/4376