Skip to content

Commit

Permalink
Prep for v1.2.0 release (#131)
Browse files Browse the repository at this point in the history
## Problem

Make relevant changes to release v1.2.0.

## Solution

Update README, CHANGELOG, user-agent string and test cases.

## Type of Change

- [X] Non-code change (docs, etc)

## Test Plan

NA
  • Loading branch information
rohanshah18 authored May 24, 2024
1 parent a8aa221 commit e01dac4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run: gradle clean build

- name: Run integration tests
run: gradle integrationTest --info
run: gradle integrationTest
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[comment]: <> (When bumping [pc:VERSION_LATEST_RELEASE] create a new entry below)
### Unreleased version
### 1.2.0
- Add list with pagination and limit but without prefix
- Add exception cause

### v1.1.0
- Add list vectors endpoint

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ Maven:
<dependency>
<groupId>io.pinecone</groupId>
<artifactId>pinecone-client</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```

[comment]: <> (^ [pc:VERSION_LATEST_RELEASE])

Gradle:
```
implementation "io.pinecone:pinecone-client:1.1.0"
implementation "io.pinecone:pinecone-client:1.2.0"
```

[comment]: <> (^ [pc:VERSION_LATEST_RELEASE])

Alternatively, you can use our standalone uberjar [pinecone-client-1.1.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/1.1.0/pinecone-client-1.1.0-all.jar), which bundles the pinecone
Alternatively, you can use our standalone uberjar [pinecone-client-1.2.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/1.2.0/pinecone-client-1.2.0-all.jar), which bundles the pinecone
client and all dependencies together. You can include this in your classpath like you do with any 3rd party JAR without
having to obtain the *pinecone-client* dependencies separately.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pineconeClientVersion = 1.1.0
pineconeClientVersion = 1.2.0
2 changes: 1 addition & 1 deletion src/main/java/io/pinecone/configs/PineconeConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public String getUserAgentGrpc() {
}

private String buildUserAgent(String clientId) {
String userAgent = String.format("lang=java; %s=%s", clientId, "v1.1.0");
String userAgent = String.format("lang=java; %s=%s", clientId, "v1.2.0");
if (this.getSourceTag() != null && !this.getSourceTag().isEmpty()) {
userAgent += "; source_tag=" + this.getSourceTag();
}
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/io/pinecone/PineconeBuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

public class PineconeBuilderTest {
private static final Gson gson = new Gson();
private static final String pineconeClientVersion = "v1.2.0";

private static AbstractMap.SimpleEntry<Call, OkHttpClient> buildMockCallAndClient(ResponseBody response) throws IOException {
Response mockResponse = new Response.Builder()
Expand Down Expand Up @@ -79,7 +80,7 @@ public void PineconeWithOkHttpClientAndUserAgent() throws IOException {

assertEquals(expectedIndex, index);
verify(mockClient, times(1)).newCall(requestCaptor.capture());
assertEquals("lang=java; pineconeClientVersion=v1.1.0", requestCaptor.getValue().header("User-Agent"));
assertEquals("lang=java; pineconeClientVersion=" + pineconeClientVersion, requestCaptor.getValue().header("User-Agent"));
}

@Test
Expand All @@ -105,6 +106,6 @@ public void PineconeWithSourceTag() throws IOException {

assertEquals(expectedIndex, index);
verify(mockClient, times(1)).newCall(requestCaptor.capture());
assertEquals("lang=java; pineconeClientVersion=v1.1.0; source_tag=testsourcetag", requestCaptor.getValue().header("User-Agent"));
assertEquals("lang=java; pineconeClientVersion=" + pineconeClientVersion + "; source_tag=testsourcetag", requestCaptor.getValue().header("User-Agent"));
}
}
10 changes: 6 additions & 4 deletions src/test/java/io/pinecone/PineconeConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

public class PineconeConfigTest {

private static final String pineconeClientVersion = "v1.2.0";

@Test
public void testValidateWithNullApiKey() {
try {
Expand All @@ -28,26 +30,26 @@ public void testValidateWithEmptyApiKey() {
@Test
public void testGetUserAgent() {
PineconeConfig config = new PineconeConfig("testApiKey");
assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=v1.1.0");
assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=" + pineconeClientVersion);
}

@Test
public void testGetUserAgentGrpc() {
PineconeConfig config = new PineconeConfig("testApiKey");
assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=v1.1.0");
assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=" + pineconeClientVersion);
}
@Test
public void testGetUserAgentWithSourceTag() {
PineconeConfig config = new PineconeConfig("testApiKey");
config.setSourceTag("testSourceTag");
assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=v1.1.0; source_tag=testsourcetag");
assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=" + pineconeClientVersion + "; source_tag=testsourcetag");
}

@Test
public void testGetUserAgentGrpcWithSourceTag() {
PineconeConfig config = new PineconeConfig("testApiKey");
config.setSourceTag("testSourceTag");
assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=v1.1.0; source_tag=testsourcetag");
assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=" + pineconeClientVersion + "; source_tag=testsourcetag");
}

@Test
Expand Down

0 comments on commit e01dac4

Please sign in to comment.