diff --git a/cmd/agent/container/setup.go b/cmd/agent/container/setup.go index 5f0165fe9..77e4898f7 100644 --- a/cmd/agent/container/setup.go +++ b/cmd/agent/container/setup.go @@ -430,6 +430,8 @@ func (cmd *SetupContainerCmd) installIDE(setupInfo *config.Result, ide *provider return jetbrains.NewRubyMineServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install() case string(config2.IDEWebStorm): return jetbrains.NewWebStormServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install() + case string(config2.IDEDataSpell): + return jetbrains.NewDataSpellServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install() case string(config2.IDEFleet): return fleet.NewFleetServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install(setupInfo.SubstitutionContext.ContainerWorkspaceFolder) case string(config2.IDEJupyterNotebook): diff --git a/cmd/up.go b/cmd/up.go index ba22f3f33..d6f3d910f 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -340,6 +340,8 @@ func (cmd *UpCmd) Run( return jetbrains.NewRubyMineServer(config2.GetRemoteUser(result), ideConfig.Options, log).OpenGateway(result.SubstitutionContext.ContainerWorkspaceFolder, client.Workspace()) case string(config.IDEWebStorm): return jetbrains.NewWebStormServer(config2.GetRemoteUser(result), ideConfig.Options, log).OpenGateway(result.SubstitutionContext.ContainerWorkspaceFolder, client.Workspace()) + case string(config.IDEDataSpell): + return jetbrains.NewDataSpellServer(config2.GetRemoteUser(result), ideConfig.Options, log).OpenGateway(result.SubstitutionContext.ContainerWorkspaceFolder, client.Workspace()) case string(config.IDEFleet): return startFleet(ctx, client, log) case string(config.IDEJupyterNotebook): diff --git a/pkg/config/ide.go b/pkg/config/ide.go index baa4a207f..cd0894300 100644 --- a/pkg/config/ide.go +++ b/pkg/config/ide.go @@ -16,6 +16,7 @@ const ( IDERubyMine IDE = "rubymine" IDERider IDE = "rider" IDEWebStorm IDE = "webstorm" + IDEDataSpell IDE = "dataspell" IDEFleet IDE = "fleet" IDEJupyterNotebook IDE = "jupyternotebook" IDECursor IDE = "cursor" diff --git a/pkg/driver/docker/docker.go b/pkg/driver/docker/docker.go index 770e61a82..251abc90b 100644 --- a/pkg/driver/docker/docker.go +++ b/pkg/driver/docker/docker.go @@ -309,6 +309,8 @@ func (d *dockerDriver) RunDockerDevContainer( args = append(args, "--mount", jetbrains.NewRubyMineServer("", ideOptions, d.Log).GetVolume()) case string(config2.IDEWebStorm): args = append(args, "--mount", jetbrains.NewWebStormServer("", ideOptions, d.Log).GetVolume()) + case string(config2.IDEDataSpell): + args = append(args, "--mount", jetbrains.NewDataSpellServer("", ideOptions, d.Log).GetVolume()) } // labels diff --git a/pkg/ide/ideparse/parse.go b/pkg/ide/ideparse/parse.go index a2fd217f5..abef287bd 100644 --- a/pkg/ide/ideparse/parse.go +++ b/pkg/ide/ideparse/parse.go @@ -107,6 +107,12 @@ var AllowedIDEs = []AllowedIDE{ Options: jetbrains.WebStormOptions, Icon: "https://devpod.sh/assets/webstorm.svg", }, + { + Name: config.IDEDataSpell, + DisplayName: "DataSpell", + Options: jetbrains.DataSpellOptions, + Icon: "https://devpod.sh/assets/dataspell.svg", + }, { Name: config.IDEFleet, DisplayName: "Fleet", diff --git a/pkg/ide/jetbrains/dataspell.go b/pkg/ide/jetbrains/dataspell.go new file mode 100644 index 000000000..90e1aee0c --- /dev/null +++ b/pkg/ide/jetbrains/dataspell.go @@ -0,0 +1,39 @@ +package jetbrains + +import ( + "github.com/loft-sh/devpod/pkg/config" + "github.com/loft-sh/devpod/pkg/ide" + "github.com/loft-sh/log" +) + +const ( + DataSpellProductCode = "DS" + DataSpellDownloadAmd64Template = "https://download.jetbrains.com/ds/dataspell-%s.tar.gz" + DataSpellDownloadArm64Template = "https://download.jetbrains.com/ds/dataspell-%s-aarch64.tar.gz" +) + +var DataSpellOptions = ide.Options{ + VersionOption: { + Name: VersionOption, + Description: "The version for the binary", + Default: "latest", + }, + DownloadArm64Option: { + Name: DownloadArm64Option, + Description: "The download url for the arm64 server binary", + }, + DownloadAmd64Option: { + Name: DownloadAmd64Option, + Description: "The download url for the amd64 server binary", + }, +} + +func NewDataSpellServer(userName string, values map[string]config.OptionValue, log log.Logger) *GenericJetBrainsServer { + amd64Download, arm64Download := getDownloadURLs(DataSpellOptions, values, DataSpellProductCode, DataSpellDownloadAmd64Template, DataSpellDownloadArm64Template) + return newGenericServer(userName, &GenericOptions{ + ID: "dataspell", + DisplayName: "DataSpell", + DownloadAmd64: amd64Download, + DownloadArm64: arm64Download, + }, log) +}