Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds py_require() function * Initial work on `get_or_create_venv()`, `uv_binary()` * redirect output to file * Restores "replace" to py_require(), and makes both error and regular messages default to silent * Addresses feedback * Adds exclamation mark to contraint check * Switches to using declared script dependencies * Removes "replace" and messages, add exclude_newer * Expands use of set, removes partial matching, simplifies code further * Renames 'omit' to 'remove', simplifies code further * Makes get_python_reqs() output the default arg values for get_or_create_venv() * Switches error output of get_create_venv() based on interactive(), adds first snapshot test * Adds two more tests, aligns var setting better, adds test reset helper function * initial snapshot tests prototype * Switches to using setdiff() for 'remove' action * simplify snapshotting approach * support attaching internal namespace in snapshots * initial "requirements are unsatisfiable" error msg impl. * Starts adding new tests, defaults get_or_create_venv() args to use what's accumulated in py_require() and adds a conditional for package error print out * Uses processx+cli to display spinner, but only on interactive with RStudio/Positron, anything else uses system2 * Switches to using poll_io * Adds switching between quoting and not quoting based on using processx, improvements on the error messages, including preventing any truncation of the error message * Adds conditional quoting for python versions too, adds process kill step, and removes forcing the use of system2 (oops) * Some code simplification, improvements to error msg * Small fix * New py_require() print output * Adds quick step to run get_or_create_venv(), removes no-cache * fix segfault in `py_activate_virtualenv()` * Adds new_venv_path() * Adds is_uv_environment() and adds environment change setp to py_require() * Fails if already initialized and user passes Python version * Adds conditional for config, in case get_or_create_venv() fails, config can continue down the other Python avenues. Avoids error in case there is no internet connection and no uv is installed, so that reticulate can continue looking for another Python * Updates snapshot to use new output, calls testthat::test_that directly to avoid Python intialization issues * Addresses all but one warnings/notes * Adds documentation to py_require() * Improves tryCatch for uv_binary() * Sets cache directory to subfulder in r-reticulate cache directory, and adds function to determine if a given environment originates from there * Adds wrapper for py_require inside py_install, and displays warning if reticulate managed uv is being used * Merges some functions, removes unused functions, cleans up names, including changing to `uv_get_or_create_venv()` * adds entry to pkgdown.yml * Add Windows uv binary installer * Safer way to remove leading line break * Removes leading return carriage import("numpy") now works on Windows, but found other things I need to work on on this OS * Adds extra error read for Windows * Adds simple tests for py_require. Trying to confirm that we'll get the same on Windows * uv_binary() test now works on Windows * Switches simple tests to r_session() to make sure GHA interprates py_require() calls are R session * Adds routines to flatten requirement history into a single line * Fixes header in table print out * Simplifies py_require() code * Adds cli version of printout * Fixes print output lack of colons, and updates snapshot with new table header * Adds error if package attempts to set exclude_newer * Cleans up print output code * Adds test for multiple py_require calls from a package * Removes py_reqs_use_cli() * Inserts steps 13 into versions vignette * Restores project ID --------- Co-authored-by: Tomasz Kalinowski <[email protected]>
- Loading branch information