Skip to content

Commit

Permalink
local tests pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyStiles committed Aug 18, 2023
1 parent a086628 commit b852b32
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 29 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ As one final guideline please be welcoming to newcomers and encourage new contri

Unsure where to begin contributing to ark? You can start by looking through these beginner and help-wanted issues:

[Beginner issues](https://github.com/TimothyStiles/ark/issues?q=is%3Aissue+is%3Aopen+label%3A%22beginner%22+) - issues which should only require a few lines of code, and a test or two.
[Beginner issues](https://github.com/bebop/ark/issues?q=is%3Aissue+is%3Aopen+label%3A%22beginner%22+) - issues which should only require a few lines of code, and a test or two.

[Good first issues](https://github.com/TimothyStiles/ark/contribute) - issues which are good for first time contributors.
[Good first issues](https://github.com/bebop/ark/contribute) - issues which are good for first time contributors.

[Help wanted issues](https://github.com/TimothyStiles/ark/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) - issues which should be a bit more involved than beginner issues.
[Help wanted issues](https://github.com/bebop/ark/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) - issues which should be a bit more involved than beginner issues.

[Feature requests](https://github.com/TimothyStiles/ark/labels/enhancement) - before requesting a new feature search through previous feature requests to see if it's already been requested. If not then feel free to submit a request and tag it with the enhancement tag!
[Feature requests](https://github.com/bebop/ark/labels/enhancement) - before requesting a new feature search through previous feature requests to see if it's already been requested. If not then feel free to submit a request and tag it with the enhancement tag!

### Working on your first Pull Request?

Expand Down Expand Up @@ -108,11 +108,11 @@ If the answer to either of those two questions are "yes", then you're probably d

### Non-security related bugs

For non-security bug reports please [submit it using this template!](https://github.com/TimothyStiles/ark/issues/new?assignees=&labels=&template=bug_report.md&title=)
For non-security bug reports please [submit it using this template!](https://github.com/bebop/ark/issues/new?assignees=&labels=&template=bug_report.md&title=)

# How to suggest a feature or enhancement

If you want to suggest a feature it's as easy as filling out this [issue template](https://github.com/TimothyStiles/ark/issues/new?assignees=&labels=&template=feature_request.md&title=), but before you do please [check to see if it's already been suggested!](https://github.com/TimothyStiles/ark/labels/enhancement)
If you want to suggest a feature it's as easy as filling out this [issue template](https://github.com/bebop/ark/issues/new?assignees=&labels=&template=feature_request.md&title=), but before you do please [check to see if it's already been suggested!](https://github.com/bebop/ark/labels/enhancement)

# How add a recommended VSCode Plugin

Expand Down
2 changes: 1 addition & 1 deletion db/cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ var downloadCmd = &cobra.Command{
Short: "Download data for standard deploy build. Run at your own risk.",
Long: "Download literally downloads all the base data needed to build a standard ark deployment the amount of data is dummy high to casually test on your personal machine. Run at your own risk.",
Run: func(cmd *cobra.Command, args []string) {
download.ark()
// download.ark()
},
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/TimothyStiles/ark
module github.com/bebop/ark

go 1.18

Expand Down
10 changes: 5 additions & 5 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

"github.com/TimothyStiles/ark/pkg/env"
"github.com/bebop/ark/pkg/env"
)

// Read reads the config file and returns the config.
Expand Down Expand Up @@ -43,8 +43,8 @@ type Config struct {
// DataPath is the data directory of the project.
DataPath string `json:"data_path"`

// arkPath is the path to the ark sqlite database.
arkPath string `json:"ark_path"`
// ArkPath is the path to the ark sqlite database.
ArkPath string `json:"ark_path"`

// RheaRDF is the path to the Rhea RDF file.
RheaRDF string `json:"rhea_rdf"`
Expand Down Expand Up @@ -80,7 +80,7 @@ func DevDefault() Config {
IsProd: false,
RootPath: env.RootPath(),
DataPath: devPath,
arkPath: filepath.Join(devPath, "ark.sqlite"),
ArkPath: filepath.Join(devPath, "ark.sqlite"),
RheaRDF: filepath.Join(devPath, "rhea_mini.rdf.gz"),
RheaToUniprotSprot: filepath.Join(devPath, "rhea_to_uniprot_sprot.tsv.gz"),
RheaToUniprotTrembl: filepath.Join(devPath, "rhea_to_uniprot_trembl.tsv.gz"),
Expand All @@ -101,7 +101,7 @@ func ProdDefault() Config {
IsProd: true,
RootPath: env.RootPath(),
DataPath: prodPath,
arkPath: filepath.Join(prodPath, "ark.sqlite"),
ArkPath: filepath.Join(prodPath, "ark.sqlite"),
RheaRDF: filepath.Join(prodPath, "rhea.rdf.gz"),
RheaToUniprotSprot: filepath.Join(prodPath, "rhea_to_uniprot_sprot.tsv"),
RheaToUniprotTrembl: filepath.Join(prodPath, "rhea_to_uniprot_trembl.tsv"),
Expand Down
2 changes: 1 addition & 1 deletion pkg/download/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/TimothyStiles/ark/pkg/download"
"github.com/bebop/ark/pkg/download"
)

func TestFile(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/download/links_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package download_test
import (
"testing"

"github.com/TimothyStiles/ark/pkg/download"
"github.com/bebop/ark/pkg/download"
)

func TestGetPageLinks(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/download/tarball_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/TimothyStiles/ark/pkg/download"
"github.com/bebop/ark/pkg/download"
)

func TestTarball(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/insert/rhea.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package insert
import (
"context"

"github.com/TimothyStiles/ark/pkg/config"
"github.com/TimothyStiles/ark/pkg/rhea"
"github.com/bebop/ark/pkg/config"
"github.com/bebop/ark/pkg/rhea"
"github.com/jmoiron/sqlx"
"github.com/volatiletech/sqlboiler/v4/boil"
)
Expand Down
8 changes: 4 additions & 4 deletions pkg/insert/rhea_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"path/filepath"
"testing"

"github.com/TimothyStiles/ark/pkg/config"
"github.com/TimothyStiles/ark/schema"
"github.com/bebop/ark/pkg/config"
"github.com/bebop/ark/schema"
"github.com/jmoiron/sqlx"
_ "modernc.org/sqlite"
)
Expand All @@ -23,12 +23,12 @@ func TestRhea(t *testing.T) {
}
defer os.RemoveAll(tmpDataDir)

tmpConfig.arkPath = filepath.Join(tmpDataDir, "rheaTest.db")
tmpConfig.ArkPath = filepath.Join(tmpDataDir, "rheaTest.db")

//create test database
err = schema.CreateDatabase(tmpConfig)

db, err := sqlx.Open("sqlite", tmpConfig.arkPath)
db, err := sqlx.Open("sqlite", tmpConfig.ArkPath)
if err != nil {
log.Fatalf("Failed to open sqlite in ark.db: %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/rhea/rhea.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strconv"
"strings"

"github.com/TimothyStiles/ark/models"
"github.com/bebop/ark/models"
"github.com/volatiletech/null/v8"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/rhea/rhea_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/TimothyStiles/ark/pkg/config"
"github.com/bebop/ark/pkg/config"
_ "github.com/mattn/go-sqlite3"
)

Expand Down
6 changes: 3 additions & 3 deletions schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"github.com/TimothyStiles/ark/pkg/config"
"github.com/bebop/ark/pkg/config"
"github.com/huandu/go-sqlbuilder"
"github.com/jmoiron/sqlx"

Expand All @@ -17,7 +17,7 @@ func CreateDatabase(config config.Config) error {

// Begin SQLite
log.Println("Creating database...")
db, err := sqlx.Open("sqlite", config.arkPath)
db, err := sqlx.Open("sqlite", config.ArkPath)

if err != nil {
log.Fatalf("Failed to open sqlite database: %s", err)
Expand All @@ -41,7 +41,7 @@ func CreateDatabase(config config.Config) error {
log.Fatalf("Failed to execute schema: %s", err)
}

err = chemblAttach(db, config.arkPath)
err = chemblAttach(db, config.ArkPath)
if err != nil {
log.Fatalf("Failed to attach chembl with error %s", err)
}
Expand Down
4 changes: 2 additions & 2 deletions schema/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"path/filepath"
"testing"

"github.com/TimothyStiles/ark/pkg/config"
"github.com/bebop/ark/pkg/config"
"github.com/jmoiron/sqlx"

//"github.com/minio/minio-go/v7"
Expand All @@ -30,7 +30,7 @@ var db *sqlx.DB
func TestCreateDatabase(t *testing.T) {
tmpDataDir, err := ioutil.TempDir("", "data-*")
tmparkConfig := config.DevDefault()
tmparkConfig.arkPath = filepath.Join(tmpDataDir, "test.db")
tmparkConfig.ArkPath = filepath.Join(tmpDataDir, "test.db")
if err != nil {
t.Errorf("Failed to create temporary data directory")
}
Expand Down

0 comments on commit b852b32

Please sign in to comment.