bebop / ark

Go REST API to replace Genbank, Uniprot, Rhea, and CHEMBL
MIT License
22 stars 5 forks source link

Issues setting up allbase for local development #65

Closed abondrn closed 1 year ago

abondrn commented 1 year ago

Apologies for poor formatting, I couldn't find an issue template (happy to open up a PR for that).

Issue Description

I was running the suggested setup command given in the README: git clone https://github.com/TimothyStiles/allbase && cd allbase && go test -v ./...

After download and installation of dependencies, the output of go test was as follows:

?       github.com/TimothyStiles/allbase    [no test files]
?       github.com/TimothyStiles/allbase/app    [no test files]
?       github.com/TimothyStiles/allbase/client [no test files]
# github.com/TimothyStiles/allbase/pkg/pathways.test
ld: warning: -no_pie is deprecated when targeting new OS versions
# github.com/TimothyStiles/allbase/pkg/rhea.test
ld: warning: -no_pie is deprecated when targeting new OS versions
# github.com/TimothyStiles/allbase/db/cmd.test
ld: warning: -no_pie is deprecated when targeting new OS versions
testing: warning: no tests to run
PASS
ok      github.com/TimothyStiles/allbase/db/cmd 0.209s [no tests to run]
?       github.com/TimothyStiles/allbase/pkg/config [no test files]
?       github.com/TimothyStiles/allbase/pkg/db [no test files]
=== RUN   TestFile
--- PASS: TestFile (6.27s)
=== RUN   TestGetPageLinks
--- PASS: TestGetPageLinks (0.06s)
=== RUN   TestTarball
--- PASS: TestTarball (0.88s)
PASS
ok      github.com/TimothyStiles/allbase/pkg/download   7.525s
?       github.com/TimothyStiles/allbase/pkg/env    [no test files]
=== RUN   TestGenbank
    genbank_test.go:17: error creating test database: dial tcp [::1]:8000: connect: connection refused
=== RUN   TestGenbank/TestGenbank
--- FAIL: TestGenbank (0.00s)
    --- FAIL: TestGenbank/TestGenbank (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1268177]

goroutine 26 [running]:
testing.tRunner.func1.2({0x12aa6c0, 0x14fbe30})
    /usr/local/Cellar/go/1.18.3/libexec/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
    /usr/local/Cellar/go/1.18.3/libexec/src/testing/testing.go:1392 +0x39f
panic({0x12aa6c0, 0x14fbe30})
    /usr/local/Cellar/go/1.18.3/libexec/src/runtime/panic.go:838 +0x207
github.com/TimothyStiles/surrealdb%2ego.(*DB).send(0x0, {0x12eee47, 0x3}, {0xc0000feca0, 0x2, 0x2})
    /Users/alex/go/pkg/mod/github.com/!timothy!stiles/surrealdb.go@v0.0.0-20220905012407-571308281d15/db.go:141 +0x77
github.com/TimothyStiles/surrealdb%2ego.(*DB).Use(...)
    /Users/alex/go/pkg/mod/github.com/!timothy!stiles/surrealdb.go@v0.0.0-20220905012407-571308281d15/db.go:58
github.com/TimothyStiles/allbase/pkg/init.Genbank({0x136ede8?, _}, _, {0x0, {0xc0000c2540, 0x29}, {0xc0000a0280, 0x32}, {0x12f649b, 0x17}, ...})
    /Users/alex/Documents/prog/e2ebio/allbase/pkg/init/genbank.go:49 +0x305
github.com/TimothyStiles/allbase/pkg/init.TestGenbank.func1(0xc00013e4e0)
    /Users/alex/Documents/prog/e2ebio/allbase/pkg/init/genbank_test.go:44 +0x7b
testing.tRunner(0xc00013e4e0, 0xc000099110)
    /usr/local/Cellar/go/1.18.3/libexec/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
    /usr/local/Cellar/go/1.18.3/libexec/src/testing/testing.go:1486 +0x35f
FAIL    github.com/TimothyStiles/allbase/pkg/init   0.192s
testing: warning: no tests to run
PASS
ok      github.com/TimothyStiles/allbase/pkg/pathways   0.169s [no tests to run]
=== RUN   TestReadRheaToUniprot
--- PASS: TestReadRheaToUniprot (0.00s)
PASS
ok      github.com/TimothyStiles/allbase/pkg/rhea   0.314s
FAIL

System Environment

I am using go version go1.18.3 darwin/amd64, and the above commands were executed under the default (dev) branch.

Running system_profiler SPSoftwareDataType SPHardwareDataType gives the following system details:

Software:

    System Software Overview:

      System Version: macOS 12.6.3 (21G419)
      Kernel Version: Darwin 21.6.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro15,1
      Processor Name: 6-Core Intel Core i9
      Processor Speed: 2.9 GHz
      Number of Processors: 1
      Total Number of Cores: 6
      L2 Cache (per Core): 256 KB
      L3 Cache: 12 MB
      Hyper-Threading Technology: Enabled
      Memory: 32 GB
      System Firmware Version: 1916.80.2.0.0 (iBridge: 20.16.3045.0.0,0)
      OS Loader Version: 540.120.3~22

Next Steps

Here is what I will try to get up and running