Skip to content

Commit 416bc88

Browse files
committed
refactor: improve code organization and test coverage
- Reorganize imports and method ordering for better readability - Add comprehensive integration tests for all components - Update Docker configuration for notebook environment - Improve error handling and validation in core classes - Enhance test utilities and base test classes - Update SpotBugs exclusions for cleaner static analysis
1 parent c55f62e commit 416bc88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1565
-1565
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,11 @@ notebooks/.env
5858
# IPython
5959
profile_default/
6060
ipython_config.py
61+
62+
# Don't commit JAR files to notebooks directory
63+
notebooks/*.jar
64+
notebooks/schema.yaml
65+
notebooks/*_test.ipynb
66+
notebooks/*_output.ipynb
67+
6168
spotbugs-output.txt

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RedisVL4J
1+
# RedisVL
22

33
The Java client for AI-native applications with Redis.
44

@@ -7,7 +7,7 @@ The Java client for AI-native applications with Redis.
77

88
## Introduction
99

10-
RedisVL4J is a Java library for building AI-native applications on Redis, providing:
10+
RedisVL is a Java library for building AI-native applications on Redis, providing:
1111

1212
- Vector similarity search
1313
- Hybrid queries combining vectors and metadata filters
@@ -18,22 +18,22 @@ RedisVL4J is a Java library for building AI-native applications on Redis, provid
1818

1919
### Installation
2020

21-
Add RedisVL4J to your project:
21+
Add RedisVL to your project:
2222

2323
**Maven:**
2424

2525
```xml
2626
<dependency>
2727
<groupId>com.redis</groupId>
28-
<artifactId>redisvl4j</artifactId>
28+
<artifactId>redisvl</artifactId>
2929
<version>0.1.0-SNAPSHOT</version>
3030
</dependency>
3131
```
3232

3333
**Gradle:**
3434

3535
```gradle
36-
implementation 'com.redis:redisvl4j:0.1.0-SNAPSHOT'
36+
implementation 'com.redis:redisvl:0.1.0-SNAPSHOT'
3737
```
3838

3939
### Setting up Redis
@@ -317,7 +317,7 @@ The notebooks are available as Jupyter notebooks with Java kernel support. To ru
317317

318318
- Jupyter Lab with Java kernel (JJava)
319319
- Redis Stack container
320-
- Pre-installed RedisVL4J library
320+
- Pre-installed RedisVL library
321321
- All required dependencies
322322

323323
## Requirements
@@ -335,4 +335,4 @@ Contributions are welcome! Please feel free to submit a Pull Request.
335335

336336
## Support
337337

338-
This project is supported by Redis, Inc. on a good faith effort basis. To report bugs or request features, please [file an issue](https://github.com/redis/redisvl4j/issues).
338+
This project is supported by Redis, Inc. on a good faith effort basis. To report bugs or request features, please [file an issue](https://github.com/redis/redisvl/issues).

build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,16 @@ subprojects {
135135
tasks.wrapper {
136136
gradleVersion = "8.11.1"
137137
distributionType = Wrapper.DistributionType.ALL
138+
}
139+
140+
// Task to copy jar to notebooks directory for Jupyter
141+
tasks.register<Copy>("copyJarToNotebooks") {
142+
dependsOn(":core:jar")
143+
from("core/build/libs/redisvl-0.0.1.jar")
144+
into("notebooks")
145+
}
146+
147+
// Make build depend on copying jar
148+
tasks.named("build") {
149+
dependsOn("copyJarToNotebooks")
138150
}

core/build.gradle.kts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,64 +4,64 @@ plugins {
44
`maven-publish`
55
}
66

7-
description = "RedisVL4J - Vector Library for Java"
7+
description = "RedisVL - Vector Library for Java"
88

99
dependencies {
1010
// Redis client
1111
api("redis.clients:jedis:6.2.0")
12-
12+
1313
// JSON processing
1414
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2")
1515
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.2")
1616
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2")
17-
17+
1818
// Validation
1919
implementation("jakarta.validation:jakarta.validation-api:3.1.0")
2020
implementation("org.hibernate.validator:hibernate-validator:8.0.1.Final")
21-
21+
2222
// Utilities
2323
implementation("org.apache.commons:commons-lang3:3.17.0")
2424
implementation("com.google.guava:guava:33.4.0-jre")
2525
implementation("com.github.f4b6a3:ulid-creator:5.2.3")
26-
26+
2727
// Lombok for reducing boilerplate
2828
compileOnly("org.projectlombok:lombok:1.18.36")
2929
annotationProcessor("org.projectlombok:lombok:1.18.36")
3030
testCompileOnly("org.projectlombok:lombok:1.18.36")
3131
testAnnotationProcessor("org.projectlombok:lombok:1.18.36")
32-
32+
3333
// SpotBugs annotations for suppressing false positives
3434
implementation("com.github.spotbugs:spotbugs-annotations:4.8.3")
35-
35+
3636
// LangChain4J - Core API (required for vectorizers)
3737
compileOnly("dev.langchain4j:langchain4j:0.36.2")
38-
38+
3939
// LangChain4J Embedding Providers (optional - users include what they need)
4040
compileOnly("dev.langchain4j:langchain4j-open-ai:0.36.2")
4141
compileOnly("dev.langchain4j:langchain4j-azure-open-ai:0.36.2")
4242
compileOnly("dev.langchain4j:langchain4j-hugging-face:0.36.2")
4343
compileOnly("dev.langchain4j:langchain4j-ollama:0.36.2")
4444
compileOnly("dev.langchain4j:langchain4j-vertex-ai-gemini:0.36.2")
45-
45+
4646
// LangChain4J Local Embedding Models (optional)
4747
compileOnly("dev.langchain4j:langchain4j-embeddings-all-minilm-l6-v2:0.36.2")
4848
compileOnly("dev.langchain4j:langchain4j-embeddings-bge-small-en-v15:0.36.2")
4949
compileOnly("dev.langchain4j:langchain4j-embeddings-e5-small-v2:0.36.2")
50-
50+
5151
// ONNX Runtime for running models locally
5252
implementation("com.microsoft.onnxruntime:onnxruntime:1.16.3")
53-
53+
5454
// HTTP client for downloading from HuggingFace
5555
implementation("com.squareup.okhttp3:okhttp:4.12.0")
56-
56+
5757
// JSON parsing for config.json
5858
implementation("com.google.code.gson:gson:2.10.1")
59-
59+
6060
// Test dependencies for LangChain4J (include in tests to verify integration)
6161
testImplementation("dev.langchain4j:langchain4j:0.36.2")
6262
testImplementation("dev.langchain4j:langchain4j-embeddings-all-minilm-l6-v2:0.36.2")
6363
testImplementation("dev.langchain4j:langchain4j-hugging-face:0.36.2")
64-
64+
6565
// Additional test dependencies
6666
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
6767
testImplementation("org.mockito:mockito-core:5.11.0")
@@ -93,49 +93,49 @@ tasks.register<Test>("slowTest") {
9393

9494
// Configure all JAR tasks to use the desired artifact name
9595
tasks.jar {
96-
archiveBaseName.set("redisvl4j")
96+
archiveBaseName.set("redisvl")
9797
}
9898

9999
tasks.named<Jar>("sourcesJar") {
100-
archiveBaseName.set("redisvl4j")
100+
archiveBaseName.set("redisvl")
101101
}
102102

103103
tasks.named<Jar>("javadocJar") {
104-
archiveBaseName.set("redisvl4j")
104+
archiveBaseName.set("redisvl")
105105
}
106106

107107
publishing {
108108
publications {
109109
create<MavenPublication>("maven") {
110110
from(components["java"])
111-
111+
112112
// Override the artifactId
113-
artifactId = "redisvl4j"
114-
113+
artifactId = "redisvl"
114+
115115
pom {
116-
name.set("RedisVL4J")
116+
name.set("RedisVL")
117117
description.set("Vector Library for Java")
118-
url.set("https://github.com/redis/redisvl4j")
119-
118+
url.set("https://github.com/redis/redisvl")
119+
120120
licenses {
121121
license {
122122
name.set("MIT License")
123123
url.set("https://opensource.org/licenses/MIT")
124124
}
125125
}
126-
126+
127127
developers {
128128
developer {
129129
id.set("redis")
130130
name.set("Redis Team")
131131
email.set("[email protected]")
132132
}
133133
}
134-
134+
135135
scm {
136-
connection.set("scm:git:git://github.com/redis/redisvl4j.git")
137-
developerConnection.set("scm:git:ssh://github.com:redis/redisvl4j.git")
138-
url.set("https://github.com/redis/redisvl4j")
136+
connection.set("scm:git:git://github.com/redis/redisvl.git")
137+
developerConnection.set("scm:git:ssh://github.com:redis/redisvl.git")
138+
url.set("https://github.com/redis/redisvl")
139139
}
140140
}
141141
}

0 commit comments

Comments
 (0)