r

package
v0.11.381 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRVersion

func CheckRVersion(ctx context.Context, requestedVersion *RVersion) error

CheckRVersion verifies that the installed R version is compatible with the requested version. For now, we just warn if versions don't match - in the future we could support multiple R versions.

func GetRenvCachePath

func GetRenvCachePath() (string, error)

GetRenvCachePath returns the path where renv cache should be stored.

func ValidateRScript

func ValidateRScript(path string) error

ValidateRScript checks if the given path is a valid R script.

func VerifyRInstalled

func VerifyRInstalled() error

VerifyRInstalled checks if R is installed and returns an error with installation instructions if not.

Types

type CommandInstance

type CommandInstance struct {
	Name    string
	Args    []string
	EnvVars map[string]string
}

type CommandRunner

type CommandRunner struct{}

func (*CommandRunner) Run

func (l *CommandRunner) Run(ctx context.Context, repo *git.Repo, command *CommandInstance) error

func (*CommandRunner) RunAnyCommand

func (l *CommandRunner) RunAnyCommand(ctx context.Context, cmd *exec.Cmd) error

type LocalOperator

type LocalOperator struct {
	// contains filtered or unexported fields
}

func NewLocalOperator

func NewLocalOperator(config config.ConnectionAndDetailsGetter, envVariables map[string]string) (*LocalOperator, error)

func (*LocalOperator) Run

func (*LocalOperator) RunTask

type NoRenvFoundError

type NoRenvFoundError struct{}

func (*NoRenvFoundError) Error

func (m *NoRenvFoundError) Error() string

type RVersion

type RVersion struct {
	Major int
	Minor int
	Patch int
}

func GetInstalledRVersion

func GetInstalledRVersion() (*RVersion, error)

GetInstalledRVersion returns the version of R that is currently installed.

func ParseRVersionFromImage

func ParseRVersionFromImage(image string) (*RVersion, error)

ParseRVersionFromImage parses R version from image string like "r:4.3" or "r:4.3.1". Returns nil if no version specified (use system R).

func (RVersion) String

func (v RVersion) String() string

type RenvInstaller

type RenvInstaller struct {
	// contains filtered or unexported fields
}

func (*RenvInstaller) EnsureRenvExists

func (r *RenvInstaller) EnsureRenvExists(ctx context.Context, repo *git.Repo, renvLockPath string) error

EnsureRenvExists checks if renv dependencies are installed and installs them if necessary.

type RenvPathFinder

type RenvPathFinder struct{}

func (*RenvPathFinder) FindRenvLockInPath

func (r *RenvPathFinder) FindRenvLockInPath(path string, executable *pipeline.ExecutableFile) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL