More specifically use and manage UV installation path#809
Open
njtierney wants to merge 9 commits into
Open
Conversation
Building a better framework for managing which version of/where python is installed. Implements functions: `greta_python_plan()`, `greta_set_python_*()`, and also manages python location via `.onLoad`/`.onAttach`.
…eta_list_py_modules()` exit early when no conda_env() detected
5047109 to
b1b4ab1
Compare
- each states what preference was stored, warns when RETICULATE_PYTHON overrides it (with the full resolution order and how to escape it), and reports what greta will use after restart. - All four setters share one tail (finish_python_backend_change()) so their behaviour cannot drift. - Record the conda env location at install time, so load-time auto-detection finds greta-env-tf2 in any conda root, not just reticulate's miniconda; stale records are cleaned automatically. - Fix a load-time crash: a 0-byte python-backend config file made .onLoad error, preventing library(greta); config files are now read via read_config_line(), returning NULL for missing/empty files. - Document the resolution order (RETICULATE_PYTHON > stored preference > detected conda env > managed uv) in ?greta_set_python and the installation vignette, including checking the backend via greta_sitrep(). - Add regression tests for the override warning, install-time record, stale-record cleanup, and empty config files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
revamp how we manage python environment - take advantage of UV, but also allow users a way to manage their own environment. In doing so add a set of key functions to facilitate choosing these states.
Properly resolves #801