Build and Test Gonum locally

36 views
Skip to first unread message

Rodrigo Almeida

unread,
Jul 31, 2017, 8:51:06 AM7/31/17
to gonum-dev
Hello everyone,

I'm trying build the gonum project in my machine, I did fork and clone of the project gonum.

I execute go test inside of the package stat, but I get the result:

can't load package: package github.com/rpinheiroalmeida/gonum/stat: code in directory /Users/rpinheir/Documents/Studies/go/src/github.com/rpinheiroalmeida/gonum/stat expects import "gonum.org/v1/gonum/stat".

I've already run the command line: go get gonum.org/v1/gonum/stat.

Even if, I'm getting the same error. Anyone could help me?

[]'s

Rodrigo Pinheiro.

Sebastien Binet

unread,
Jul 31, 2017, 9:49:28 AM7/31/17
to Rodrigo Almeida, gonum-dev
Rodrigo,

the package "gonum.org/v1/gonum/stat" needs to live in your GOPATH under the path '$GOPATH/src/gonum.org/v1/gonum/stat'.
even if you've forked it. 

usually, what I do is the following:

$> cd $GOPATH/src
$> cd $GOPATH/src/gonum.org/v1/gonum
$> git remote add sbinet https://github.com/sbinet/gonum

then edit what I need to modify or improve and then push to my own fork (and then send a PR):
$> vim stat/stat.go
$> git co -b my-branch
$> git add stat/stat.go
$> git ci -m "stat: some description"
$> git push sbinet my-branch

hth,
-s

Reply all
Reply to author
Forward
0 new messages