Documentation
¶
Index ¶
- func CheckRVersion(ctx context.Context, requestedVersion *RVersion) error
- func GetRenvCachePath() (string, error)
- func ValidateRScript(path string) error
- func VerifyRInstalled() error
- type CommandInstance
- type CommandRunner
- type LocalOperator
- type NoRenvFoundError
- type RVersion
- type RenvInstaller
- type RenvPathFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRVersion ¶
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 ¶
GetRenvCachePath returns the path where renv cache should be stored.
func ValidateRScript ¶
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 CommandRunner ¶
type CommandRunner struct{}
func (*CommandRunner) Run ¶
func (l *CommandRunner) Run(ctx context.Context, repo *git.Repo, command *CommandInstance) error
func (*CommandRunner) RunAnyCommand ¶
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 (o *LocalOperator) Run(ctx context.Context, ti scheduler.TaskInstance) error
type NoRenvFoundError ¶
type NoRenvFoundError struct{}
func (*NoRenvFoundError) Error ¶
func (m *NoRenvFoundError) Error() string
type RVersion ¶
func GetInstalledRVersion ¶
GetInstalledRVersion returns the version of R that is currently installed.
func ParseRVersionFromImage ¶
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).
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)