Skip to content

Commit 9cd4514

Browse files
committed
project: unify semantic-router paths
Signed-off-by: bitliu <[email protected]>
1 parent 610adbb commit 9cd4514

39 files changed

+66
-66
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Before you begin, ensure you have the following installed:
3131
1. **Clone the repository:**
3232
```bash
3333
git clone <repository-url>
34-
cd semantic_router
34+
cd semantic-router
3535
```
3636

3737
2. **Download required models:**
@@ -217,7 +217,7 @@ make test-tools
217217

218218
```
219219
├── candle-binding/ # Rust library for BERT classification
220-
├── src/semantic_router/ # Go implementation of the router
220+
├── src/semantic-router/ # Go implementation of the router
221221
├── src/training/ # Model training scripts
222222
├── e2e-tests/ # End-to-end test suite
223223
├── config/ # Configuration files

Dockerfile.extproc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ FROM golang:1.24 as go-builder
2424
WORKDIR /app
2525

2626
# Copy Go module files first for better layer caching
27-
RUN mkdir -p src/semantic_router
28-
COPY src/semantic_router/go.mod src/semantic_router/go.sum src/semantic_router/
29-
COPY candle-binding/go.mod candle-binding/semantic_router.go candle-binding/
27+
RUN mkdir -p src/semantic-router
28+
COPY src/semantic-router/go.mod src/semantic-router/go.sum src/semantic-router/
29+
COPY candle-binding/go.mod candle-binding/semantic-router.go candle-binding/
3030

31-
# Copy semantic_router source code
32-
COPY src/semantic_router/ src/semantic_router/
31+
# Copy semantic-router source code
32+
COPY src/semantic-router/ src/semantic-router/
3333

3434
# Copy the built Rust library from rust-builder
3535
COPY --from=rust-builder /app/candle-binding/target/release/libcandle_semantic_router.so /app/candle-binding/target/release/
@@ -39,7 +39,7 @@ ENV CGO_ENABLED=1
3939
ENV LD_LIBRARY_PATH=/app/candle-binding/target/release
4040

4141
# Build the router binary
42-
RUN mkdir -p bin && cd src/semantic_router && go build -o ../../bin/router cmd/main.go
42+
RUN mkdir -p bin && cd src/semantic-router && go build -o ../../bin/router cmd/main.go
4343

4444
# Final stage: copy the binary and the shared library
4545
FROM quay.io/centos/centos:stream9

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rust:
1818
build-router: rust
1919
@echo "Building router..."
2020
@mkdir -p bin
21-
@cd src/semantic_router && go build -o ../../bin/router cmd/main.go
21+
@cd src/semantic-router && go build -o ../../bin/router cmd/main.go
2222

2323
# Run the router
2424
run-router: build-router
@@ -55,11 +55,11 @@ test-jailbreak-classifier: rust
5555
@export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \
5656
cd src/training/prompt_guard_fine_tuning && CGO_ENABLED=1 go run jailbreak_classifier_verifier.go
5757

58-
# Unit test semantic_router
58+
# Unit test semantic-router
5959
test-semantic-router: build-router
60-
@echo "Testing semantic_router..."
60+
@echo "Testing semantic-router..."
6161
@export LD_LIBRARY_PATH=${PWD}/candle-binding/target/release && \
62-
cd src/semantic_router && CGO_ENABLED=1 go test -v ./...
62+
cd src/semantic-router && CGO_ENABLED=1 go test -v ./...
6363

6464
# Test the Rust library and the Go binding
6565
test: download-models test-binding test-semantic-router

docs/architecture/envoy-extproc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static_resources:
476476
unhealthy_threshold: 3
477477
healthy_threshold: 2
478478
grpc_health_check:
479-
service_name: "semantic_router"
479+
service_name: "semantic-router"
480480
481481
# Model endpoint clusters
482482
- name: math_model_cluster

docs/getting-started/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ Open two terminals and start the required services:
1919

2020
**Terminal 1 - Start Envoy Proxy:**
2121
```bash
22-
cd semantic_router
22+
cd semantic-router
2323
make run-envoy
2424
```
2525

2626
**Terminal 2 - Start Semantic Router:**
2727
```bash
28-
cd semantic_router
28+
cd semantic-router
2929
make run-router
3030
```
3131

@@ -186,7 +186,7 @@ The test suite covers:
186186

187187
```bash
188188
# Check Envoy statistics
189-
curl http://localhost:8801/stats | grep semantic_router
189+
curl http://localhost:8801/stats | grep semantic-router
190190

191191
# Check router health
192192
curl http://localhost:50051/health

src/semantic_router/cmd/main.go renamed to src/semantic-router/cmd/main.go

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

1010
"github.com/prometheus/client_golang/prometheus/promhttp"
11-
"github.com/vllm-project/semantic-router/semantic_router/pkg/extproc"
11+
"github.com/vllm-project/semantic-router/semantic-router/pkg/extproc"
1212
)
1313

1414
func main() {

src/semantic_router/go.mod renamed to 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/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/semantic-router/pkg/config => ./pkg/config
8+
github.com/vllm-project/semantic-router/semantic-router/pkg/extproc => ./pkg/extproc
99
)
1010

1111
require (
File renamed without changes.
File renamed without changes.

src/semantic_router/pkg/cache/cache_test.go renamed to 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/semantic-router/pkg/cache"
1515
)
1616

1717
func TestCache(t *testing.T) {

0 commit comments

Comments
 (0)