Skip to content

Commit

Permalink
Updates miniconda name to miniforge
Browse files Browse the repository at this point in the history
  • Loading branch information
ForestEckhardt committed Sep 20, 2024
1 parent 3374f4d commit 2535cda
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies:
sha256: '009a3476197030e30d0ce924cc044ee4851ef27324e132b29fd12d8cde071915'
source: https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
source_sha256: e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82
- name: miniconda3-py39
- name: miniforge
version: 24.7.1
uri: https://github.com/conda-forge/miniforge/releases/download/24.7.1-0/Miniforge3-24.7.1-0-Linux-x86_64.sh
sha256: b64f77042cf8eafd31ced64f9253a74fb85db63545fe167ba5756aea0e8125be
Expand Down
12 changes: 6 additions & 6 deletions src/python/conda/conda.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,29 @@ func Run(c *Conda) error {
}

func (c *Conda) Version() string {
return "miniconda3-py39"
return "miniforge"
}

func (c *Conda) Install(version string) error {
c.Log.BeginStep("Supplying conda")
var installer string
if installerDir, err := os.MkdirTemp("", "miniconda"); err != nil {
if installerDir, err := os.MkdirTemp("", "miniforge"); err != nil {
return err
} else {
installer = filepath.Join(installerDir, "miniconda.sh")
installer = filepath.Join(installerDir, "miniforge.sh")
defer os.RemoveAll(installerDir)
}

if err := c.Installer.InstallOnlyVersion(version, installer); err != nil {
return fmt.Errorf("Error downloading miniconda: %v", err)
return fmt.Errorf("Error downloading miniforge: %v", err)
}
if err := os.Chmod(installer, 0755); err != nil {
return err
}

c.Log.BeginStep("Installing Miniconda")
c.Log.BeginStep("Installing Miniforge")
if err := c.Command.Execute("/", indentWriter(os.Stdout), io.Discard, installer, "-b", "-p", c.condaHome()); err != nil {
return fmt.Errorf("Error installing miniconda: %v", err)
return fmt.Errorf("Error installing miniforge: %v", err)
}

return nil
Expand Down
8 changes: 4 additions & 4 deletions src/python/conda/conda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ var _ = Describe("Conda", func() {
Expect(os.WriteFile(filepath.Join(buildDir, "runtime.txt"), []byte("python-3.2.3"), 0644)).To(Succeed())
})

It("returns 'miniconda3-py39'", func() {
Expect(subject.Version()).To(Equal("miniconda3-py39"))
It("returns 'miniforge'", func() {
Expect(subject.Version()).To(Equal("miniforge"))
})
})

Context("runtime.txt does not exist", func() {
It("returns 'miniconda3-py39'", func() {
Expect(subject.Version()).To(Equal("miniconda3-py39"))
It("returns 'miniforge'", func() {
Expect(subject.Version()).To(Equal("miniforge"))
})
})
})
Expand Down
5 changes: 3 additions & 2 deletions src/python/integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package integration_test
import (
"flag"
"fmt"
"github.com/onsi/gomega/types"
"io"
"net/http"
"os"
"path/filepath"
"testing"
"time"

"github.com/onsi/gomega/types"

"github.com/cloudfoundry/switchblade"
"github.com/onsi/gomega/format"
"github.com/sclevine/spec"
Expand Down Expand Up @@ -102,7 +103,7 @@ func TestIntegration(t *testing.T) {
suite("Versions", testVersions(platform, fixtures, root))
suite("Miscellaneous", testMiscellaneous(platform, fixtures))
suite("Django", testDjango(platform, fixtures))
suite("Miniconda", testMiniconda(platform, fixtures))
suite("Miniforge", testMiniforge(platform, fixtures))
suite("Pipenv", testPipenv(platform, fixtures))
suite("Override", testOverride(platform, fixtures))
suite("Multibuildpack", testMultibuildpack(platform, fixtures))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
. "github.com/onsi/gomega"
)

func testMiniconda(platform switchblade.Platform, fixtures string) func(*testing.T, spec.G, spec.S) {
func testMiniforge(platform switchblade.Platform, fixtures string) func(*testing.T, spec.G, spec.S) {
return func(t *testing.T, context spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect
Expand All @@ -32,12 +32,12 @@ func testMiniconda(platform switchblade.Platform, fixtures string) func(*testing
Expect(platform.Delete.Execute(name)).To(Succeed())
})

context("when pushing an app that uses miniconda 3", func() {
context("when pushing an app that uses miniforge", func() {
var source string
context("when environment.yml stays the same", func() {
it.Before(func() {
var err error
source, err = switchblade.Source(filepath.Join(fixtures, "miniconda"))
source, err = switchblade.Source(filepath.Join(fixtures, "miniforge"))
Expect(err).NotTo(HaveOccurred())
})

Expand All @@ -53,7 +53,7 @@ func testMiniconda(platform switchblade.Platform, fixtures string) func(*testing
Eventually(deployment).Should(Serve(ContainSubstring("gunicorn: 20.1.0")))

Expect(logs.String()).To(SatisfyAll(
ContainSubstring("Installing Miniconda"),
ContainSubstring("Installing Miniforge"),
ContainSubstring("Installing conda environment from environment.yml"),
))
})
Expand All @@ -62,7 +62,7 @@ func testMiniconda(platform switchblade.Platform, fixtures string) func(*testing
context("when environment.yml changes", func() {
it.Before(func() {
var err error
source, err = switchblade.Source(filepath.Join(fixtures, "miniconda"))
source, err = switchblade.Source(filepath.Join(fixtures, "miniforge"))
Expect(err).NotTo(HaveOccurred())
})

Expand All @@ -81,7 +81,7 @@ func testMiniconda(platform switchblade.Platform, fixtures string) func(*testing
)))

Expect(logs.String()).To(SatisfyAll(
ContainSubstring("Installing Miniconda"),
ContainSubstring("Installing Miniforge"),
ContainSubstring("Installing conda environment from environment.yml"),
))

Expand All @@ -102,7 +102,7 @@ func testMiniconda(platform switchblade.Platform, fixtures string) func(*testing
)))

Expect(logs.String()).To(SatisfyAll(
ContainSubstring("Installing Miniconda"),
ContainSubstring("Installing Miniforge"),
ContainSubstring("Installing conda environment from environment.yml"),
))
})
Expand Down

0 comments on commit 2535cda

Please sign in to comment.