Skip to content

Commit 086910e

Browse files
authored
Merge pull request #2 from braintrustdata/release-please--branches--main--changes--next
release: 0.1.0
2 parents 9654fb8 + 9425a68 commit 086910e

File tree

171 files changed

+1118
-937
lines changed

Some content is hidden

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

171 files changed

+1118
-937
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to Sonatype in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/braintrustdata/braintrust-kotlin/actions/workflows/publish-sonatype.yml
4+
name: Publish Sonatype
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Java
20+
uses: actions/setup-java@v3
21+
with:
22+
distribution: temurin
23+
java-version: |
24+
8
25+
17
26+
cache: gradle
27+
28+
- name: Set up Gradle
29+
uses: gradle/gradle-build-action@v2
30+
31+
- name: Publish to Sonatype
32+
run: |
33+
./gradlew publish --stacktrace
34+
env:
35+
SONATYPE_USERNAME: ${{ secrets.BRAINTRUST_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
36+
SONATYPE_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
37+
GPG_SIGNING_KEY_ID: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
38+
GPG_SIGNING_KEY: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
39+
GPG_SIGNING_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.github/workflows/release-doctor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_doctor:
8+
name: release doctor
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'braintrustdata/braintrust-kotlin' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Check release environment
16+
run: |
17+
bash ./bin/check-release-environment
18+
env:
19+
SONATYPE_USERNAME: ${{ secrets.BRAINTRUST_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
20+
SONATYPE_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
21+
GPG_SIGNING_KEY_ID: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
22+
GPG_SIGNING_KEY: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
23+
GPG_SIGNING_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
## 0.1.0 (2024-02-04)
4+
5+
Full Changelog: [v0.0.1...v0.1.0](https://github.com/braintrustdata/braintrust-kotlin/compare/v0.0.1...v0.1.0)
6+
7+
### Features
8+
9+
* Add initial Stainless SDK ([9654fb8](https://github.com/braintrustdata/braintrust-kotlin/commit/9654fb8513f40b898092b773f96e54e996009b09))
10+
* create default branch ([160596a](https://github.com/braintrustdata/braintrust-kotlin/commit/160596a7c8fd24ffcdfc07edafa4437313c9a850))
11+
* OpenAPI spec update ([#1](https://github.com/braintrustdata/braintrust-kotlin/issues/1)) ([536a660](https://github.com/braintrustdata/braintrust-kotlin/commit/536a66092ef8ed6850c6fd43f167cf9baf35a14a))
12+
* OpenAPI spec update ([#3](https://github.com/braintrustdata/braintrust-kotlin/issues/3)) ([bb3cc00](https://github.com/braintrustdata/braintrust-kotlin/commit/bb3cc00b420f1a8cc9d269a62e4ccebdbaf1a69d))

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,31 @@ The REST API documentation can be found [on www.braintrustdata.com](https://www
1616

1717
#### Gradle
1818

19+
<!-- x-release-please-start-version -->
20+
1921
```kotlin
20-
implementation("com.braintrust.api:braintrust-kotlin:0.0.1")
22+
implementation("com.braintrustdata.api:braintrust-kotlin:0.1.0")
2123
```
2224

2325
#### Maven
2426

2527
```xml
2628
<dependency>
27-
<groupId>com.braintrust.api</groupId>
29+
<groupId>com.braintrustdata.api</groupId>
2830
<artifactId>braintrust-kotlin</artifactId>
29-
<version>0.0.1</version>
31+
<version>0.1.0</version>
3032
</dependency>
3133
```
3234

35+
<!-- x-release-please-end -->
36+
3337
### Configure the client
3438

3539
Use `BraintrustOkHttpClient.builder()` to configure the client. At a minimum you need to set `.apiKey()`:
3640

3741
```kotlin
38-
import com.braintrust.api.client.BraintrustOkHttpClient
39-
import com.braintrust.api.client.okhttp.BraintrustOkHttpClient
42+
import com.braintrustdata.api.client.BraintrustOkHttpClient
43+
import com.braintrustdata.api.client.okhttp.BraintrustOkHttpClient
4044

4145
val client = BraintrustOkHttpClient.builder()
4246
.apiKey("My API Key")
@@ -69,8 +73,8 @@ To create a new project, first use the `ProjectCreateParams` builder to specify
6973
then pass that to the `create` method of the `project` service.
7074

7175
```kotlin
72-
import com.braintrust.api.models.Project
73-
import com.braintrust.api.models.ProjectCreateParams
76+
import com.braintrustdata.api.models.Project
77+
import com.braintrustdata.api.models.ProjectCreateParams
7478

7579
val params = ProjectCreateParams.builder()
7680
.bodyparam(true)
@@ -84,8 +88,8 @@ The Braintrust API provides a `list` method to get a paginated list of project.
8488
You can retrieve the first page by:
8589

8690
```kotlin
87-
import com.braintrust.api.models.Page
88-
import com.braintrust.api.models.Project
91+
import com.braintrustdata.api.models.Page
92+
import com.braintrustdata.api.models.Project
8993

9094
val page = client.project().list()
9195
for (project: Project in page.objects()) {

bin/check-release-environment

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
errors=()
4+
5+
if [ -z "${SONATYPE_USERNAME}" ]; then
6+
errors+=("The BRAINTRUST_SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
7+
fi
8+
9+
if [ -z "${SONATYPE_PASSWORD}" ]; then
10+
errors+=("The BRAINTRUST_SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
11+
fi
12+
13+
if [ -z "${GPG_SIGNING_KEY}" ]; then
14+
errors+=("The BRAINTRUST_SONATYPE_GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
15+
fi
16+
17+
if [ -z "${GPG_SIGNING_PASSWORD}" ]; then
18+
errors+=("The BRAINTRUST_SONATYPE_GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
19+
fi
20+
21+
len=${#errors[@]}
22+
23+
if [[ len -gt 0 ]]; then
24+
echo -e "Found the following errors in the release environment:\n"
25+
26+
for error in "${errors[@]}"; do
27+
echo -e "- $error\n"
28+
done
29+
30+
exit 1
31+
fi
32+
33+
echo "The environment is ready to push releases!"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// File generated from our OpenAPI spec by Stainless.
22

3-
package com.braintrust.api.client.okhttp
3+
package com.braintrustdata.api.client.okhttp
44

5-
import com.braintrust.api.client.BraintrustClient
6-
import com.braintrust.api.client.BraintrustClientImpl
7-
import com.braintrust.api.core.ClientOptions
5+
import com.braintrustdata.api.client.BraintrustClient
6+
import com.braintrustdata.api.client.BraintrustClientImpl
7+
import com.braintrustdata.api.core.ClientOptions
88
import com.fasterxml.jackson.databind.json.JsonMapper
99
import java.net.Proxy
1010
import java.time.Clock
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// File generated from our OpenAPI spec by Stainless.
22

3-
package com.braintrust.api.client.okhttp
3+
package com.braintrustdata.api.client.okhttp
44

5-
import com.braintrust.api.client.BraintrustClientAsync
6-
import com.braintrust.api.client.BraintrustClientAsyncImpl
7-
import com.braintrust.api.core.ClientOptions
5+
import com.braintrustdata.api.client.BraintrustClientAsync
6+
import com.braintrustdata.api.client.BraintrustClientAsyncImpl
7+
import com.braintrustdata.api.core.ClientOptions
88
import com.fasterxml.jackson.databind.json.JsonMapper
99
import java.net.Proxy
1010
import java.time.Clock

braintrust-kotlin-client-okhttp/src/main/kotlin/com/braintrust/api/client/okhttp/OkHttpClient.kt renamed to braintrust-kotlin-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/OkHttpClient.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package com.braintrust.api.client.okhttp
2-
3-
import com.braintrust.api.core.RequestOptions
4-
import com.braintrust.api.core.http.HttpClient
5-
import com.braintrust.api.core.http.HttpMethod
6-
import com.braintrust.api.core.http.HttpRequest
7-
import com.braintrust.api.core.http.HttpRequestBody
8-
import com.braintrust.api.core.http.HttpResponse
9-
import com.braintrust.api.errors.BraintrustIoException
1+
package com.braintrustdata.api.client.okhttp
2+
3+
import com.braintrustdata.api.core.RequestOptions
4+
import com.braintrustdata.api.core.http.HttpClient
5+
import com.braintrustdata.api.core.http.HttpMethod
6+
import com.braintrustdata.api.core.http.HttpRequest
7+
import com.braintrustdata.api.core.http.HttpRequestBody
8+
import com.braintrustdata.api.core.http.HttpResponse
9+
import com.braintrustdata.api.errors.BraintrustIoException
1010
import com.google.common.collect.ListMultimap
1111
import com.google.common.collect.MultimapBuilder
1212
import java.io.IOException

braintrust-kotlin-core/src/main/kotlin/com/braintrust/api/client/BraintrustClient.kt renamed to braintrust-kotlin-core/src/main/kotlin/com/braintrustdata/api/client/BraintrustClient.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102
44

5-
package com.braintrust.api.client
5+
package com.braintrustdata.api.client
66

7-
import com.braintrust.api.models.*
8-
import com.braintrust.api.services.blocking.*
7+
import com.braintrustdata.api.models.*
8+
import com.braintrustdata.api.services.blocking.*
99

1010
interface BraintrustClient {
1111

0 commit comments

Comments
 (0)