Skip to content

More specifically use and manage UV installation path#809

Open
njtierney wants to merge 9 commits into
greta-dev:mainfrom
njtierney:fix-respect-reticulate-python-801
Open

More specifically use and manage UV installation path#809
njtierney wants to merge 9 commits into
greta-dev:mainfrom
njtierney:fix-respect-reticulate-python-801

Conversation

@njtierney

Copy link
Copy Markdown
Collaborator

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

@njtierney njtierney force-pushed the fix-respect-reticulate-python-801 branch from 5047109 to b1b4ab1 Compare July 1, 2026 06:24
- 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.
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.

Python environment problem

1 participant