Set up the Python environment for r-containerio using uv
Description
Section titled “Description”In the location defined via project_path:
- Creates a local virtual environment via
uv(if needed), - synchronizes the Python dependencies defined in the packaged
pyproject.tomlanduv.lockshipped withr-containerioviauv sync(after copying these two files to theproject_path), - and configures
reticulateto use the resulting interpreter.
setup_containerio_python( project_path = ".", python_version = "3.14", envname = ".venv", groups = NULL)Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
project_path |
Path to the project root. Defaults to "." (current directory). |
python_version |
Python version to use for the virtual environment, default: "3.14". |
envname |
Name of the virtual environment to install the Python dependencies to. Defaults to: “.venv”. |
groups |
Optional character vector of dependency groups to install via uv sync --group. Development dependencies are only installed if specified here, otherwise --no-dev is appended to the uv sync command. |
Invisibly returns the path to the configured Python interpreter.
Details
Section titled “Details”If you want to work with this virtual environment, this function should be run directly after loading the r-containerio package.
Examples
Section titled “Examples”setup_containerio_python()
setup_containerio_python(groups = "dev")