Documentation
¶
Index ¶
- func ExpectMicromamba(binFolder string, feedback CreateEnvironmentOptions) (string, error)
- func ExtractURLComponent(urlStr string) (string, error)
- func NewGitRepo(url string, directory string, branch string) (*git.Repository, string, error)
- func RunReadStdout(binPath string, args ...string) (string, error)
- type CreateEnvironmentOptions
- type Environment
- func (env *Environment) BoundRunPythonScriptFromFile(scriptPath string, args ...string) error
- func (env *Environment) MicromambaInstallPackage(packageToInstall string, channel string) error
- func (env *Environment) PipInstallPackage(packageToInstall string, index_url string, extra_index_url string, ...) error
- func (env *Environment) PipInstallPackages(packages []string, index_url string, extra_index_url string, no_cache bool, ...) error
- func (env *Environment) PipInstallRequirmements(requirementsPath string, feedback CreateEnvironmentOptions) error
- func (env *Environment) RunPythonReadCombined(scriptPath string, args ...string) (string, error)
- func (env *Environment) RunPythonReadStdout(scriptPath string, args ...string) (string, error)
- func (env *Environment) RunPythonScriptFromFile(scriptPath string, args ...string) error
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectMicromamba ¶
func ExpectMicromamba(binFolder string, feedback CreateEnvironmentOptions) (string, error)
func ExtractURLComponent ¶
func NewGitRepo ¶
Types ¶
type CreateEnvironmentOptions ¶
type CreateEnvironmentOptions int
user feedback options for CreateEnvironment
const ( // Show progress bar ShowProgressBar CreateEnvironmentOptions = iota // Show progress bar and verbose output ShowProgressBarVerbose // Show verbose output ShowVerbose // Show nothing ShowNothing )
type Environment ¶
type Environment struct { Name string // Name of the environment RootDir string // Root directory of the environment EnvPath string // Path to the environment EnvBinPath string // Path to the bin directory within the environment EnvLibPath string // Path to the lib directory within the environment PythonVersion Version // Version of the Python environment MicromambaVersion Version // Version of the micromamba executable PipVersion Version // Version of the pip executable MicromambaPath string // Path to the micromamba executable PythonPath string // Path to the Python executable within the environment PythonLibPath string // Path to the Python library within the environment PipPath string // Path to the pip executable within the environment PythonHeadersPath string // Path to the Python headers within the environment SitePackagesPath string // Path to the site-packages directory within the environment }
func CreateEnvironment ¶
func CreateEnvironment(envName string, rootDir string, pythonVersion string, channel string, feedback CreateEnvironmentOptions) (*Environment, error)
func (*Environment) BoundRunPythonScriptFromFile ¶
func (env *Environment) BoundRunPythonScriptFromFile(scriptPath string, args ...string) error
BoundRunPythonScriptFromFile runs a Python script from a file with the given arguments. It ensures that the child process is killed if the parent process is killed.
func (*Environment) MicromambaInstallPackage ¶
func (env *Environment) MicromambaInstallPackage(packageToInstall string, channel string) error
micromamba commands need to have rc files disabled and prefix specified
func (*Environment) PipInstallPackage ¶
func (env *Environment) PipInstallPackage(packageToInstall string, index_url string, extra_index_url string, no_cache bool, feedback CreateEnvironmentOptions) error
func (*Environment) PipInstallPackages ¶
func (env *Environment) PipInstallPackages(packages []string, index_url string, extra_index_url string, no_cache bool, feedback CreateEnvironmentOptions) error
func (*Environment) PipInstallRequirmements ¶
func (env *Environment) PipInstallRequirmements(requirementsPath string, feedback CreateEnvironmentOptions) error
func (*Environment) RunPythonReadCombined ¶
func (env *Environment) RunPythonReadCombined(scriptPath string, args ...string) (string, error)
func (*Environment) RunPythonReadStdout ¶
func (env *Environment) RunPythonReadStdout(scriptPath string, args ...string) (string, error)
func (*Environment) RunPythonScriptFromFile ¶
func (env *Environment) RunPythonScriptFromFile(scriptPath string, args ...string) error
type Version ¶
func ParsePipVersion ¶
func ParsePythonVersion ¶
func ParseVersion ¶
ParseVersion parses a version string in the format "X.Y.Z" and returns a Version object.
func (*Version) Compare ¶
Compare compares the version with another version and returns: -1 if the version is less than the other version 0 if the version is equal to the other version 1 if the version is greater than the other version
func (*Version) MinorString ¶
func (*Version) MinorStringCompact ¶
Click to show internal directories.
Click to hide internal directories.