Skip to content

Commit e51de47

Browse files
committed
docs: update docs webiste es lint ci
Signed-off-by: yuluo-yx <[email protected]>
1 parent 42380be commit e51de47

33 files changed

+82
-73
lines changed

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
pre-commit:
1212
runs-on: ubuntu-latest
13-
name: Run pre-commit hooks on Go, Rust, and Python files
13+
name: Run pre-commit hooks on Go, Rust, JavaScripts and Python files
1414

1515
steps:
1616
- name: Check out the repo
@@ -29,9 +29,9 @@ jobs:
2929
go-version: '1.24'
3030

3131
- name: Set up Node
32-
- uses: actions/setup-node@v4
32+
uses: actions/setup-node@v5
3333
with:
34-
node-version: '23'
34+
node-version: 23
3535

3636
- name: Set up Rust
3737
uses: dtolnay/rust-toolchain@stable
@@ -65,6 +65,13 @@ jobs:
6565
~/go/pkg/mod
6666
key: ${{ runner.os }}-go-precommit-${{ hashFiles('**/go.sum') }}
6767

68+
- name: Cache Node dependencies
69+
uses: actions/cache@v4
70+
with:
71+
path: |
72+
~/website/node_modules
73+
key: ${{ runner.os }}-node-precommit-${{ hashFiles('website/package.json') }}
74+
6875
- name: Cache pre-commit environments
6976
uses: actions/cache@v4
7077
with:
@@ -77,7 +84,7 @@ jobs:
7784
- name: Run pre-commit on Go, Rust, JavaScript and Python files
7885
run: |
7986
# Find all Go, Rust, JavaScripts and Python files (excluding vendored/generated code)
80-
FILES=$(find . -type f \( -name "*.go" -o -name "*.rs" -o -name "*.py" -o name "*.js" \) \
87+
FILES=$(find . -type f \( -name "*.go" -o -name "*.rs" -o -name "*.py" -o -name "*.js" \) \
8188
! -path "./target/*" \
8289
! -path "./candle-binding/target/*" \
8390
! -path "./.git/*" \

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
hooks:
2828
- id: js-lint
2929
name: js lint
30-
entry: npm run lint
30+
entry: cd website && npm run lint
3131
language: system
3232
files: \.js$
3333

src/semantic-router/cmd/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"os"
99

1010
"github.com/prometheus/client_golang/prometheus/promhttp"
11-
"github.com/vllm-project/semantic-router/semantic-router/pkg/api"
12-
"github.com/vllm-project/semantic-router/semantic-router/pkg/extproc"
13-
"github.com/vllm-project/semantic-router/semantic-router/pkg/observability"
11+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/api"
12+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/extproc"
13+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/observability"
1414
)
1515

1616
func main() {

src/semantic-router/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
module github.com/vllm-project/semantic-router/semantic-router
1+
module github.com/vllm-project/semantic-router/src/semantic-router
22

33
go 1.24.1
44

55
replace (
66
github.com/vllm-project/semantic-router/candle-binding => ../../candle-binding
7-
github.com/vllm-project/semantic-router/semantic-router/pkg/config => ./pkg/config
8-
github.com/vllm-project/semantic-router/semantic-router/pkg/extproc => ./pkg/extproc
7+
github.com/vllm-project/semantic-router/src/semantic-router/pkg/config => ./pkg/config
8+
github.com/vllm-project/semantic-router/src/semantic-router/pkg/extproc => ./pkg/extproc
99
)
1010

1111
require (

src/semantic-router/pkg/api/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"sync"
1111
"time"
1212

13-
"github.com/vllm-project/semantic-router/semantic-router/pkg/config"
14-
"github.com/vllm-project/semantic-router/semantic-router/pkg/metrics"
15-
"github.com/vllm-project/semantic-router/semantic-router/pkg/services"
13+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/config"
14+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/metrics"
15+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/services"
1616
)
1717

1818
// ClassificationAPIServer holds the server state and dependencies

src/semantic-router/pkg/api/server_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"net/http/httptest"
1010
"testing"
1111

12-
"github.com/vllm-project/semantic-router/semantic-router/pkg/config"
13-
"github.com/vllm-project/semantic-router/semantic-router/pkg/services"
12+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/config"
13+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/services"
1414
)
1515

1616
func TestHandleBatchClassification(t *testing.T) {

src/semantic-router/pkg/cache/cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
. "github.com/onsi/gomega"
1212

1313
candle "github.com/vllm-project/semantic-router/candle-binding"
14-
"github.com/vllm-project/semantic-router/semantic-router/pkg/cache"
14+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/cache"
1515
)
1616

1717
func TestCache(t *testing.T) {

src/semantic-router/pkg/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"gopkg.in/yaml.v3"
1010

11-
"github.com/vllm-project/semantic-router/semantic-router/pkg/config"
11+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/config"
1212

1313
. "github.com/onsi/ginkgo/v2"
1414
. "github.com/onsi/gomega"

src/semantic-router/pkg/config/parse_configfile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
. "github.com/onsi/ginkgo/v2"
99
. "github.com/onsi/gomega"
1010

11-
"github.com/vllm-project/semantic-router/semantic-router/pkg/config"
11+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/config"
1212
)
1313

1414
var _ = Describe("ParseConfigFile and ReplaceGlobalConfig", func() {

src/semantic-router/pkg/extproc/caching_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99

1010
ext_proc "github.com/envoyproxy/go-control-plane/envoy/service/ext_proc/v3"
1111

12-
"github.com/vllm-project/semantic-router/semantic-router/pkg/cache"
13-
"github.com/vllm-project/semantic-router/semantic-router/pkg/config"
14-
"github.com/vllm-project/semantic-router/semantic-router/pkg/extproc"
12+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/cache"
13+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/config"
14+
"github.com/vllm-project/semantic-router/src/semantic-router/pkg/extproc"
1515
)
1616

1717
var _ = Describe("Caching Functionality", func() {

0 commit comments

Comments
 (0)