You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usingCSnakes.Runtime.Locators;usingMicrosoft.Extensions.Logging;namespaceCSnakes.Runtime.EnvironmentManagement;
#pragma warning disable CS9113// Parameter is unread. There for future use.internalclassCondaEnvironmentManagement(ILoggerlogger,stringname,boolensureExists,CondaLocatorconda,string?environmentSpecPath):IEnvironmentManagement
#pragma warning restore CS9113// Parameter is unread.{ILoggerIEnvironmentManagement.Logger=>logger;publicvoidEnsureEnvironment(PythonLocationMetadatapythonLocation){if(!ensureExists)return;varfullPath=Path.GetFullPath(GetPath());if(!Directory.Exists(fullPath)){logger.LogError("Cannot find conda environment at {fullPath}.",fullPath);// TODO: Automate the creation of the conda environments. //var result = conda.ExecuteCondaShellCommand($"env create -n {name} -f {environmentSpecPath}");//if (!result)//{// logger.LogError("Failed to create conda environment.");// throw new InvalidOperationException("Could not create conda environment");//}}else{logger.LogDebug("Conda environment already exists at {fullPath}",fullPath);// TODO: Check if the environment is up to date}}publicstringGetPath(){// TODO: Conda environments are not always in the same location. Resolve the path correctly. returnPath.Combine(conda.CondaHome,"envs",name);}}
The text was updated successfully, but these errors were encountered:
CSnakes/src/CSnakes.Runtime/EnvironmentManagement/CondaEnvironmentManagement.cs
Line 32 in 0754331
The text was updated successfully, but these errors were encountered: