interpreters

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRenvLockfile = "renv.lock"
View Source
const PythonRequirementsFilename = "requirements.txt"

Variables

View Source
var MissingPythonError = types.NewAgentError(types.ErrorPythonExecNotFound, errors.New("unable to detect any Python interpreters"), nil)
View Source
var MissingRError = types.NewAgentError(types.ErrorRExecNotFound, errors.New("unable to detect any R interpreters"), nil)

Functions

This section is empty.

Types

type MockPythonInterpreter added in v1.10.0

type MockPythonInterpreter struct {
	mock.Mock
}

func NewMockPythonInterpreter added in v1.10.0

func NewMockPythonInterpreter() *MockPythonInterpreter

func (*MockPythonInterpreter) GetPythonExecutable added in v1.10.0

func (m *MockPythonInterpreter) GetPythonExecutable() (util.AbsolutePath, error)

func (*MockPythonInterpreter) GetPythonVersion added in v1.10.0

func (m *MockPythonInterpreter) GetPythonVersion() (string, error)

func (*MockPythonInterpreter) Init added in v1.10.0

func (m *MockPythonInterpreter) Init() error

func (*MockPythonInterpreter) IsPythonExecutableValid added in v1.10.0

func (m *MockPythonInterpreter) IsPythonExecutableValid() bool

type MockRInterpreter

type MockRInterpreter struct {
	mock.Mock
}

func NewMockRInterpreter

func NewMockRInterpreter() *MockRInterpreter

func (*MockRInterpreter) CreateLockfile

func (m *MockRInterpreter) CreateLockfile(lockfilePath util.AbsolutePath) error

func (*MockRInterpreter) GetLockFilePath

func (m *MockRInterpreter) GetLockFilePath() (util.RelativePath, bool, error)

func (*MockRInterpreter) GetRExecutable

func (m *MockRInterpreter) GetRExecutable() (util.AbsolutePath, error)

func (*MockRInterpreter) GetRVersion

func (m *MockRInterpreter) GetRVersion() (string, error)

func (*MockRInterpreter) Init

func (m *MockRInterpreter) Init() error

func (*MockRInterpreter) RenvEnvironmentErrorCheck added in v1.10.0

func (m *MockRInterpreter) RenvEnvironmentErrorCheck() *types.AgentError

type PythonInterpreter added in v1.10.0

type PythonInterpreter interface {
	IsPythonExecutableValid() bool
	GetPythonExecutable() (util.AbsolutePath, error)
	GetPythonVersion() (string, error)
}

func NewPythonInterpreter added in v1.10.0

func NewPythonInterpreter(
	base util.AbsolutePath,
	pythonExecutableParam util.Path,
	log logging.Logger,
	cmdExecutorOverride executor.Executor,
	pathLookerOverride util.PathLooker,
	existsFuncOverride util.ExistsFunc,
) (PythonInterpreter, error)

type PythonInterpreterFactory added in v1.10.0

type PythonInterpreterFactory func(
	base util.AbsolutePath,
	pythonExecutableParam util.Path,
	log logging.Logger,
	cmdExecutorOverride executor.Executor,
	pathLookerOverride util.PathLooker,
	existsFuncOverride util.ExistsFunc,
) (PythonInterpreter, error)

type RInterpreter

type RInterpreter interface {
	GetRExecutable() (util.AbsolutePath, error)
	GetRVersion() (string, error)
	GetLockFilePath() (util.RelativePath, bool, error)
	CreateLockfile(util.AbsolutePath) error
	RenvEnvironmentErrorCheck() *types.AgentError
}

func NewRInterpreter

func NewRInterpreter(
	base util.AbsolutePath,
	rExecutableParam util.Path,
	log logging.Logger,
	cmdExecutorOverride executor.Executor,
	pathLookerOverride util.PathLooker,
	existsFuncOverride util.ExistsFunc,
) (RInterpreter, error)

type RInterpreterFactory

type RInterpreterFactory func(
	base util.AbsolutePath,
	rExecutableParam util.Path,
	log logging.Logger,
	cmdExecutorOverride executor.Executor,
	pathLookerOverride util.PathLooker,
	existsFuncOverride util.ExistsFunc,
) (RInterpreter, error)

type RenvAction added in v1.10.0

type RenvAction = string
const (
	RenvSetup    RenvAction = "renvsetup"
	RenvInit     RenvAction = "renvinit"
	RenvSnapshot RenvAction = "renvsnapshot"
	RenvStatus   RenvAction = "renvstatus"
)

Jump to

Keyboard shortcuts

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