Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.1.0-alpha.7 #51

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.6"
".": "0.1.0-alpha.7"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.0-alpha.7 (2024-11-21)

Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)

### Chores

* **internal:** codegen related update ([#52](https://github.com/openlayer-ai/openlayer-java/issues/52)) ([224921d](https://github.com/openlayer-ai/openlayer-java/commit/224921d231f065fe66c42ab53fce59a8d0efbde0))
* rebuild project due to codegen change ([#50](https://github.com/openlayer-ai/openlayer-java/issues/50)) ([49217e1](https://github.com/openlayer-ai/openlayer-java/commit/49217e1b55888fd18cd1ac1979036450e290a6f4))

## 0.1.0-alpha.6 (2024-11-14)

Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.openlayer.api/openlayer-java)](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.6)
[![Maven Central](https://img.shields.io/maven-central/v/com.openlayer.api/openlayer-java)](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.7)

<!-- x-release-please-end -->

Expand All @@ -27,7 +27,7 @@ The REST API documentation can be found on [openlayer.com](https://openlayer.co
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.6")
implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.7")
```

#### Maven
Expand All @@ -36,7 +36,7 @@ implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.6")
<dependency>
<groupId>com.openlayer.api</groupId>
<artifactId>openlayer-java</artifactId>
<version>0.1.0-alpha.6</version>
<version>0.1.0-alpha.7</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

allprojects {
group = "com.openlayer.api"
version = "0.1.0-alpha.6" // x-release-please-version
version = "0.1.0-alpha.7" // x-release-please-version
}


15 changes: 9 additions & 6 deletions openlayer-java-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ plugins {
}

dependencies {
api("com.fasterxml.jackson.core:jackson-core:2.14.3")
api("com.fasterxml.jackson.core:jackson-databind:2.14.3")
api("com.fasterxml.jackson.core:jackson-core:2.18.1")
api("com.fasterxml.jackson.core:jackson-databind:2.18.1")

implementation("com.fasterxml.jackson.core:jackson-annotations:2.14.3")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.3")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.3")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.3")
implementation("com.fasterxml.jackson.core:jackson-annotations:2.18.1")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.1")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.1")
implementation("org.apache.httpcomponents.core5:httpcore5:5.2.4")
implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")

Expand All @@ -20,4 +20,7 @@ dependencies {
testImplementation("org.assertj:assertj-core:3.25.3")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.3")
testImplementation("org.mockito:mockito-core:5.14.2")
testImplementation("org.mockito:mockito-junit-jupiter:5.14.2")
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,30 @@ internal fun closeWhenPhantomReachable(observed: Any, closeable: AutoCloseable)
check(observed !== closeable) {
"`observed` cannot be the same object as `closeable` because it would never become phantom reachable"
}
closeWhenPhantomReachable?.let { it(observed, closeable::close) }
closeWhenPhantomReachable(observed, closeable::close)
}

private val closeWhenPhantomReachable: ((Any, AutoCloseable) -> Unit)? by lazy {
/**
* Calls [close] when [observed] becomes only phantom reachable.
*
* This is a wrapper around a Java 9+ [java.lang.ref.Cleaner], or a no-op in older Java versions.
*/
@JvmSynthetic
internal fun closeWhenPhantomReachable(observed: Any, close: () -> Unit) {
closeWhenPhantomReachable?.let { it(observed, close) }
}

private val closeWhenPhantomReachable: ((Any, () -> Unit) -> Unit)? by lazy {
try {
val cleanerClass = Class.forName("java.lang.ref.Cleaner")
val cleanerCreate = cleanerClass.getMethod("create")
val cleanerRegister =
cleanerClass.getMethod("register", Any::class.java, Runnable::class.java)
val cleanerObject = cleanerCreate.invoke(null);

{ observed, closeable ->
{ observed, close ->
try {
cleanerRegister.invoke(cleanerObject, observed, Runnable { closeable.close() })
cleanerRegister.invoke(cleanerObject, observed, Runnable { close() })
} catch (e: ReflectiveOperationException) {
if (e is InvocationTargetException) {
when (val cause = e.cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@ private constructor(
val additionalProperties: Map<String, JsonValue>,
) {

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is OpenlayerError && this.additionalProperties == other.additionalProperties /* spotless:on */
}

override fun hashCode(): Int {
return /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */
}

override fun toString() = "OpenlayerError{additionalProperties=$additionalProperties}"

fun toBuilder() = Builder().from(this)

companion object {
Expand Down Expand Up @@ -71,4 +57,16 @@ private constructor(

fun build(): OpenlayerError = OpenlayerError(additionalProperties.toImmutable())
}

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is OpenlayerError && additionalProperties == other.additionalProperties /* spotless:on */
}

override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */

override fun toString() = "OpenlayerError{additionalProperties=$additionalProperties}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ constructor(
return true
}

return /* spotless:off */ other is CommitTestResultListParams && this.projectVersionId == other.projectVersionId && this.includeArchived == other.includeArchived && this.page == other.page && this.perPage == other.perPage && this.status == other.status && this.type == other.type && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */
return /* spotless:off */ other is CommitTestResultListParams && projectVersionId == other.projectVersionId && includeArchived == other.includeArchived && page == other.page && perPage == other.perPage && status == other.status && type == other.type && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
}

override fun hashCode(): Int {
return /* spotless:off */ Objects.hash(projectVersionId, includeArchived, page, perPage, status, type, additionalHeaders, additionalQueryParams) /* spotless:on */
}
override fun hashCode(): Int = /* spotless:off */ Objects.hash(projectVersionId, includeArchived, page, perPage, status, type, additionalHeaders, additionalQueryParams) /* spotless:on */

override fun toString() =
"CommitTestResultListParams{projectVersionId=$projectVersionId, includeArchived=$includeArchived, page=$page, perPage=$perPage, status=$status, type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
Expand Down Expand Up @@ -260,7 +258,7 @@ constructor(
return true
}

return /* spotless:off */ other is Status && this.value == other.value /* spotless:on */
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()
Expand Down Expand Up @@ -335,7 +333,7 @@ constructor(
return true
}

return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */
return /* spotless:off */ other is Type && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ private constructor(
return true
}

return /* spotless:off */ other is Status && this.value == other.value /* spotless:on */
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()
Expand Down Expand Up @@ -1208,23 +1208,20 @@ private constructor(
return true
}

return /* spotless:off */ other is Value && this.number == other.number && this.bool == other.bool && this.string == other.string && this.strings == other.strings /* spotless:on */
return /* spotless:off */ other is Value && number == other.number && bool == other.bool && string == other.string && strings == other.strings /* spotless:on */
}

override fun hashCode(): Int {
return /* spotless:off */ Objects.hash(number, bool, string, strings) /* spotless:on */
}
override fun hashCode(): Int = /* spotless:off */ Objects.hash(number, bool, string, strings) /* spotless:on */

override fun toString(): String {
return when {
override fun toString(): String =
when {
number != null -> "Value{number=$number}"
bool != null -> "Value{bool=$bool}"
string != null -> "Value{string=$string}"
strings != null -> "Value{strings=$strings}"
_json != null -> "Value{_unknown=$_json}"
else -> throw IllegalStateException("Invalid Value")
}
}

companion object {

Expand Down Expand Up @@ -1298,17 +1295,14 @@ private constructor(
return true
}

return /* spotless:off */ other is Threshold && this.measurement == other.measurement && this.insightName == other.insightName && this.insightParameters == other.insightParameters && this.operator == other.operator && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is Threshold && measurement == other.measurement && insightName == other.insightName && insightParameters == other.insightParameters && operator == other.operator && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */
}

private var hashCode: Int = 0
/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(measurement, insightName, insightParameters, operator, value, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(measurement, insightName, insightParameters, operator, value, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun hashCode(): Int = hashCode

override fun toString() =
"Threshold{measurement=$measurement, insightName=$insightName, insightParameters=$insightParameters, operator=$operator, value=$value, additionalProperties=$additionalProperties}"
Expand All @@ -1319,17 +1313,14 @@ private constructor(
return true
}

return /* spotless:off */ other is Goal && this.id == other.id && this.number == other.number && this.name == other.name && this.dateCreated == other.dateCreated && this.dateUpdated == other.dateUpdated && this.description == other.description && this.evaluationWindow == other.evaluationWindow && this.delayWindow == other.delayWindow && this.type == other.type && this.subtype == other.subtype && this.creatorId == other.creatorId && this.originProjectVersionId == other.originProjectVersionId && this.thresholds == other.thresholds && this.archived == other.archived && this.dateArchived == other.dateArchived && this.suggested == other.suggested && this.commentCount == other.commentCount && this.usesMlModel == other.usesMlModel && this.usesValidationDataset == other.usesValidationDataset && this.usesTrainingDataset == other.usesTrainingDataset && this.usesReferenceDataset == other.usesReferenceDataset && this.usesProductionData == other.usesProductionData && this.additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is Goal && id == other.id && number == other.number && name == other.name && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && description == other.description && evaluationWindow == other.evaluationWindow && delayWindow == other.delayWindow && type == other.type && subtype == other.subtype && creatorId == other.creatorId && originProjectVersionId == other.originProjectVersionId && thresholds == other.thresholds && archived == other.archived && dateArchived == other.dateArchived && suggested == other.suggested && commentCount == other.commentCount && usesMlModel == other.usesMlModel && usesValidationDataset == other.usesValidationDataset && usesTrainingDataset == other.usesTrainingDataset && usesReferenceDataset == other.usesReferenceDataset && usesProductionData == other.usesProductionData && additionalProperties == other.additionalProperties /* spotless:on */
}

private var hashCode: Int = 0
/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(id, number, name, dateCreated, dateUpdated, description, evaluationWindow, delayWindow, type, subtype, creatorId, originProjectVersionId, thresholds, archived, dateArchived, suggested, commentCount, usesMlModel, usesValidationDataset, usesTrainingDataset, usesReferenceDataset, usesProductionData, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(id, number, name, dateCreated, dateUpdated, description, evaluationWindow, delayWindow, type, subtype, creatorId, originProjectVersionId, thresholds, archived, dateArchived, suggested, commentCount, usesMlModel, usesValidationDataset, usesTrainingDataset, usesReferenceDataset, usesProductionData, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun hashCode(): Int = hashCode

override fun toString() =
"Goal{id=$id, number=$number, name=$name, dateCreated=$dateCreated, dateUpdated=$dateUpdated, description=$description, evaluationWindow=$evaluationWindow, delayWindow=$delayWindow, type=$type, subtype=$subtype, creatorId=$creatorId, originProjectVersionId=$originProjectVersionId, thresholds=$thresholds, archived=$archived, dateArchived=$dateArchived, suggested=$suggested, commentCount=$commentCount, usesMlModel=$usesMlModel, usesValidationDataset=$usesValidationDataset, usesTrainingDataset=$usesTrainingDataset, usesReferenceDataset=$usesReferenceDataset, usesProductionData=$usesProductionData, additionalProperties=$additionalProperties}"
Expand All @@ -1340,17 +1331,14 @@ private constructor(
return true
}

return /* spotless:off */ other is Item && this.id == other.id && this.goal == other.goal && this.goalId == other.goalId && this.projectVersionId == other.projectVersionId && this.inferencePipelineId == other.inferencePipelineId && this.dateCreated == other.dateCreated && this.dateUpdated == other.dateUpdated && this.dateDataStarts == other.dateDataStarts && this.dateDataEnds == other.dateDataEnds && this.status == other.status && this.statusMessage == other.statusMessage && this.additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is Item && id == other.id && goal == other.goal && goalId == other.goalId && projectVersionId == other.projectVersionId && inferencePipelineId == other.inferencePipelineId && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && dateDataStarts == other.dateDataStarts && dateDataEnds == other.dateDataEnds && status == other.status && statusMessage == other.statusMessage && additionalProperties == other.additionalProperties /* spotless:on */
}

private var hashCode: Int = 0
/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(id, goal, goalId, projectVersionId, inferencePipelineId, dateCreated, dateUpdated, dateDataStarts, dateDataEnds, status, statusMessage, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(id, goal, goalId, projectVersionId, inferencePipelineId, dateCreated, dateUpdated, dateDataStarts, dateDataEnds, status, statusMessage, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun hashCode(): Int = hashCode

override fun toString() =
"Item{id=$id, goal=$goal, goalId=$goalId, projectVersionId=$projectVersionId, inferencePipelineId=$inferencePipelineId, dateCreated=$dateCreated, dateUpdated=$dateUpdated, dateDataStarts=$dateDataStarts, dateDataEnds=$dateDataEnds, status=$status, statusMessage=$statusMessage, additionalProperties=$additionalProperties}"
Expand All @@ -1361,17 +1349,14 @@ private constructor(
return true
}

return /* spotless:off */ other is CommitTestResultListResponse && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is CommitTestResultListResponse && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */
}

private var hashCode: Int = 0
/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(items, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun hashCode(): Int = hashCode

override fun toString() =
"CommitTestResultListResponse{items=$items, additionalProperties=$additionalProperties}"
Expand Down
Loading
Loading