Skip to content

Commit

Permalink
refactor: move oasis and related components to integration/service/oa…
Browse files Browse the repository at this point in the history
…sis (#269)

issue: #254
  • Loading branch information
CodeBear801 authored Apr 9, 2020
1 parent f38ac32 commit f6be7b0
Show file tree
Hide file tree
Showing 90 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion integration/cmd/oasis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strconv"

"github.com/Telenav/osrm-backend/integration/oasis"
"github.com/Telenav/osrm-backend/integration/service/oasis"
"github.com/golang/glog"
)

Expand Down
10 changes: 5 additions & 5 deletions integration/cmd/place-connectivity-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"os"
"time"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/connectivitymap"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer/ranker"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer/s2indexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/connectivitymap"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer/ranker"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer/s2indexer"
"github.com/golang/glog"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package connectivitymap
import (
"sync"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/glog"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"runtime"
"testing"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer/ranker"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer/ranker"
)

// Mock env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package connectivitymap

import (
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/glog"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"net/http"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/oasis/osrmhelper"
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api/oasis"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmhelper"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/golang/glog"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"fmt"
"strconv"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api"
"github.com/Telenav/osrm-backend/integration/pkg/api/oasis"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/coordinate"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/route"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/route/options"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/table"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
)

// GenerateTableReq4Points accept two group of points and generate osrm table request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"encoding/json"
"net/http"

"github.com/Telenav/osrm-backend/integration/oasis/chargingstrategy"
"github.com/Telenav/osrm-backend/integration/oasis/haversine"
"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/oasis/stationfinder"
"github.com/Telenav/osrm-backend/integration/oasis/stationgraph"
"github.com/Telenav/osrm-backend/integration/pkg/api/nav"
"github.com/Telenav/osrm-backend/integration/pkg/api/oasis"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/route"
"github.com/Telenav/osrm-backend/integration/service/oasis/chargingstrategy"
"github.com/Telenav/osrm-backend/integration/service/oasis/haversine"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/stationfinder"
"github.com/Telenav/osrm-backend/integration/service/oasis/stationgraph"
"github.com/golang/glog"

"github.com/twpayne/go-polyline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"net/http"
"sort"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/oasis/osrmhelper"
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/oasis/stationfinder"
"github.com/Telenav/osrm-backend/integration/pkg/api/oasis"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/coordinate"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/table"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/nearbychargestation"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmhelper"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/stationfinder"
"github.com/golang/glog"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ranker

import (
"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

type osrmRanker struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"strings"
"testing"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/code"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/table"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

func TestRankerInterfaceViaOSRMRanker(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ranker
import (
"sort"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

// rankAgent accepts items to be ranked then returns ranking result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"testing"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

func TestRankAgent(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ranker

import (
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/blevesearch/bleve/geo"
"github.com/golang/glog"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"strconv"
"sync"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/code"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/coordinate"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/route/options"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/table"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/glog"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"strings"
"testing"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/coordinate"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/genericoptions"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/table"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

func TestGenerateTableRequest(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ranker

import (
"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

const (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ranker

import "github.com/Telenav/osrm-backend/integration/service/spatialindexer"
import "github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"

type simpleRanker struct {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
)

func TestRankerInterfaceViaSimpleRanker(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package s2indexer

import (
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/geo/s2"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sort"
"testing"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/geo/s2"
"github.com/golang/glog"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/geo/s2"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package s2indexer
import (
"time"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/spatialindexer/poiloader"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer/poiloader"
"github.com/golang/geo/s2"
"github.com/golang/glog"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package s2indexer

import (
"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/geo/s1"
"github.com/golang/geo/s2"
"github.com/golang/glog"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/Telenav/osrm-backend/integration/service/spatialindexer"
"github.com/Telenav/osrm-backend/integration/service/oasis/spatialindexer"
"github.com/golang/geo/s2"
"github.com/golang/glog"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package stationfinder
import (
"sync"

"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api/nav"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/nearbychargestation"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/golang/glog"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package stationfinder
import (
"sync"

"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/oasis/searchhelper"
"github.com/Telenav/osrm-backend/integration/pkg/api/oasis"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/nearbychargestation"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/searchcoordinate"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchhelper"
)

//@todo: This number need to be adjusted based on charge station profile
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package stationfinder

import (
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/oasis/searchhelper"
"github.com/Telenav/osrm-backend/integration/pkg/api/nav"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/searchcoordinate"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchhelper"
)

const lowEnergyLocationCandidateNumber = 20
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package stationfinder

import (
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/oasis/searchhelper"
"github.com/Telenav/osrm-backend/integration/pkg/api/oasis"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/searchcoordinate"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchhelper"
)

//@todo: This number need to be adjusted based on charge station profile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"sync"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/oasis/osrmhelper"
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api/nav"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/coordinate"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmhelper"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/golang/glog"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"strings"
"testing"

"github.com/Telenav/osrm-backend/integration/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/pkg/api/nav"
"github.com/Telenav/osrm-backend/integration/pkg/api/osrm/table"
"github.com/Telenav/osrm-backend/integration/pkg/api/search/nearbychargestation"
"github.com/Telenav/osrm-backend/integration/service/oasis/osrmconnector"
"github.com/Telenav/osrm-backend/integration/service/oasis/searchconnector"
"github.com/Telenav/osrm-backend/integration/util"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stationgraph

import (
"github.com/Telenav/osrm-backend/integration/oasis/chargingstrategy"
"github.com/Telenav/osrm-backend/integration/service/oasis/chargingstrategy"
"github.com/golang/glog"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/Telenav/osrm-backend/integration/oasis/chargingstrategy"
"github.com/Telenav/osrm-backend/integration/service/oasis/chargingstrategy"
)

func TestGraphGeneral(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stationgraph
import (
"math"

"github.com/Telenav/osrm-backend/integration/oasis/chargingstrategy"
"github.com/Telenav/osrm-backend/integration/service/oasis/chargingstrategy"
"github.com/golang/glog"
)

Expand Down
Loading

0 comments on commit f6be7b0

Please sign in to comment.