Documentation
¶
Index ¶
- Constants
- Variables
- type MockPythonInterpreter
- func (m *MockPythonInterpreter) GetLockFilePath() (util.RelativePath, bool, error)
- func (m *MockPythonInterpreter) GetPackageManager() string
- func (m *MockPythonInterpreter) GetPreferredPath() string
- func (m *MockPythonInterpreter) GetPythonExecutable() (util.AbsolutePath, error)
- func (m *MockPythonInterpreter) GetPythonRequires() string
- func (m *MockPythonInterpreter) GetPythonVersion() (string, error)
- func (m *MockPythonInterpreter) Init() error
- func (m *MockPythonInterpreter) IsPythonExecutableValid() bool
- type MockRInterpreter
- func (m *MockRInterpreter) CreateLockfile(lockfilePath util.AbsolutePath) error
- func (m *MockRInterpreter) GetLockFilePath() (util.RelativePath, bool, error)
- func (m *MockRInterpreter) GetPackageManager() string
- func (m *MockRInterpreter) GetPreferredPath() string
- func (m *MockRInterpreter) GetRExecutable() (util.AbsolutePath, error)
- func (m *MockRInterpreter) GetRRequires() string
- func (m *MockRInterpreter) GetRVersion() (string, error)
- func (m *MockRInterpreter) Init() error
- func (m *MockRInterpreter) IsRExecutableValid() bool
- func (m *MockRInterpreter) IsRenvInstalled(rexecPath string) *types.AgentError
- func (m *MockRInterpreter) RenvEnvironmentErrorCheck() *types.AgentError
- type PyProjectPythonRequires
- type PythonInterpreter
- type PythonInterpreterFactory
- type RInterpreter
- type RInterpreterFactory
- type RProjectRRequires
- type RenvAction
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
func NewMockPythonInterpreter ¶ added in v1.10.0
func NewMockPythonInterpreter() *MockPythonInterpreter
func (*MockPythonInterpreter) GetLockFilePath ¶ added in v1.12.0
func (m *MockPythonInterpreter) GetLockFilePath() (util.RelativePath, bool, error)
(util.RelativePath, bool, error)
func (*MockPythonInterpreter) GetPackageManager ¶ added in v1.12.0
func (m *MockPythonInterpreter) GetPackageManager() string
func (*MockPythonInterpreter) GetPreferredPath ¶ added in v1.12.0
func (m *MockPythonInterpreter) GetPreferredPath() string
func (*MockPythonInterpreter) GetPythonExecutable ¶ added in v1.10.0
func (m *MockPythonInterpreter) GetPythonExecutable() (util.AbsolutePath, error)
func (*MockPythonInterpreter) GetPythonRequires ¶ added in v1.12.0
func (m *MockPythonInterpreter) GetPythonRequires() string
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 ¶
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) GetPackageManager ¶ added in v1.12.0
func (m *MockRInterpreter) GetPackageManager() string
func (*MockRInterpreter) GetPreferredPath ¶ added in v1.12.0
func (m *MockRInterpreter) GetPreferredPath() string
func (*MockRInterpreter) GetRExecutable ¶
func (m *MockRInterpreter) GetRExecutable() (util.AbsolutePath, error)
func (*MockRInterpreter) GetRRequires ¶ added in v1.14.0
func (m *MockRInterpreter) GetRRequires() string
func (*MockRInterpreter) GetRVersion ¶
func (m *MockRInterpreter) GetRVersion() (string, error)
func (*MockRInterpreter) Init ¶
func (m *MockRInterpreter) Init() error
func (*MockRInterpreter) IsRExecutableValid ¶ added in v1.12.0
func (m *MockRInterpreter) IsRExecutableValid() bool
func (*MockRInterpreter) IsRenvInstalled ¶ added in v1.19.1
func (m *MockRInterpreter) IsRenvInstalled(rexecPath string) *types.AgentError
func (*MockRInterpreter) RenvEnvironmentErrorCheck ¶ added in v1.10.0
func (m *MockRInterpreter) RenvEnvironmentErrorCheck() *types.AgentError
type PyProjectPythonRequires ¶ added in v1.12.0
type PyProjectPythonRequires struct {
ProjectPath util.AbsolutePath
}
func NewPyProjectPythonRequires ¶ added in v1.12.0
func NewPyProjectPythonRequires(projectPath util.AbsolutePath) *PyProjectPythonRequires
func (*PyProjectPythonRequires) GetPythonVersionRequirement ¶ added in v1.12.0
func (p *PyProjectPythonRequires) GetPythonVersionRequirement() (string, error)
Find the python version requested by the project if specified in any of the supported metadata files. The order of precedence is: 1. .python-version 2. pyproject.toml 3. setup.cfg
The version specifications are the one defined by PEP 440 if no version is found, an error is returned.
type PythonInterpreter ¶ added in v1.10.0
type PythonInterpreter interface {
IsPythonExecutableValid() bool
GetPythonExecutable() (util.AbsolutePath, error)
GetLockFilePath() (util.RelativePath, bool, error)
GetPythonVersion() (string, error)
GetPackageManager() string
GetPreferredPath() string
GetPythonRequires() string
}
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 {
IsRExecutableValid() bool
GetRExecutable() (util.AbsolutePath, error)
GetRVersion() (string, error)
GetLockFilePath() (util.RelativePath, bool, error)
GetPackageManager() string
GetPreferredPath() string
CreateLockfile(util.AbsolutePath) error
RenvEnvironmentErrorCheck() *types.AgentError
IsRenvInstalled(rexecPath string) *types.AgentError
GetRRequires() string
}
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 RProjectRRequires ¶ added in v1.14.0
type RProjectRRequires struct {
ProjectPath util.AbsolutePath
}
func NewRProjectRRequires ¶ added in v1.14.0
func NewRProjectRRequires(projectPath util.AbsolutePath) *RProjectRRequires
func (*RProjectRRequires) GetRVersionRequirement ¶ added in v1.14.0
func (p *RProjectRRequires) GetRVersionRequirement() (string, error)
Find the R version requested by the project if specified in any of the supported metadata files. The order of precedence is: 1. DESCRIPTION file (i.e. Depends: R (>= 3.5.0) 2. renv.lock
The version specifications are the one defined by PEP 440 if no version is found, an error is returned.
type RenvAction ¶ added in v1.10.0
type RenvAction = string
const ( RenvSetup RenvAction = "renvsetup" RenvInit RenvAction = "renvinit" RenvSnapshot RenvAction = "renvsnapshot" RenvStatus RenvAction = "renvstatus" )
Click to show internal directories.
Click to hide internal directories.