Skip to content

Commit

Permalink
Remove support for Java and Scala (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomascayuelas authored Nov 13, 2023
1 parent ea1be66 commit 7222268
Show file tree
Hide file tree
Showing 124 changed files with 18 additions and 3,012 deletions.
36 changes: 2 additions & 34 deletions .github/workflows/publish-development-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -x:xef-java-examples:assemble -x:xef-scala:assemble -x:xef-scala-examples:assemble
arguments: assemble

- name: Upload reports
if: failure()
Expand All @@ -46,36 +46,4 @@ jobs:
- name: Publish development version
uses: gradle/gradle-build-action@v2
with:
arguments: publishToSonatype -x:xef-scala:publishToSonatype closeAndReleaseSonatypeStagingRepository

publish-modules-with-loom:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 20

- name: assemble
uses: gradle/gradle-build-action@v2
with:
arguments: :xef-scala:assemble :xef-java-examples:assemble

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Publish development version
uses: gradle/gradle-build-action@v2
with:
arguments: :xef-scala:publishToSonatype closeAndReleaseSonatypeStagingRepository
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository
36 changes: 2 additions & 34 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -x:xef-java-examples:assemble -x:xef-scala:assemble -x:xef-scala-examples:assemble
arguments: assemble

- name: Upload reports
if: failure()
Expand All @@ -44,36 +44,4 @@ jobs:
- name: Publish final version
uses: gradle/gradle-build-action@v2
with:
arguments: publishToSonatype -x:xef-scala:publishToSonatype closeSonatypeStagingRepository

publish-modules-with-loom:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 20

- name: assemble
uses: gradle/gradle-build-action@v2
with:
arguments: :xef-scala:assemble :xef-java-examples:assemble

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Publish final version
uses: gradle/gradle-build-action@v2
with:
arguments: :xef-scala:publishToSonatype closeSonatypeStagingRepository
arguments: publishToSonatype closeSonatypeStagingRepository
51 changes: 4 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Our goal is to make the move to this new world as simple as possible for the dev
xef.ai is packaged in two layers:
1. Core libraries bringing integration with the basic services in an AI application.
These libraries expose an _idiomatic_ interface, so there's one per programming language.
At this moment we support Kotlin and Scala.
At this moment we support Kotlin.
2. Integrations with other libraries which complement the core mission of xef.ai.

xef.ai draws inspiration from libraries like [LangChain](https://docs.langchain.com/docs/)
Expand Down Expand Up @@ -47,11 +47,9 @@ strategies.

Libraries are published in Maven Central, under the `com.xebia` group.

1. `xef-kotlin` for Kotlin support, `xef-scala` for Scala, `xef-java` for Java.
1. `xef-kotlin` for Kotlin support.
2. The name of a library we provide integration for, like `xef-lucene`.

<details>
<summary><img src="https://upload.wikimedia.org/wikipedia/commons/3/37/Kotlin_Icon_2021.svg" height="15px" alt="Kotlin logo"> Gradle (Kotlin DSL)</summary>

Libraries are published in Maven Central. You may need to add that repository explicitly
in your build, if you haven't done it before.
Expand All @@ -73,51 +71,10 @@ We publish all libraries at once under the same version, so
[version catalogs](https://docs.gradle.org/current/userguide/platforms.html#sec:sharing-catalogs)
could be useful.

</details>

<details>
<summary><img src="https://www.scala-lang.org/resources/img/frontpage/scala-spiral.png" height="15px" alt="Scala logo"> SBT</summary>

```sbt
libraryDependencies += "com.xebia" %% "xef-scala" % "<version>"
```

> **Warning**
> `xef-scala` is currently only available for Scala 3, and depends on project [Loom](https://openjdk.org/projects/loom/),
> so you will need at least Java 20 to use the library.
</details>

<details>
<summary><img src="https://upload.wikimedia.org/wikipedia/commons/5/52/Apache_Maven_logo.svg" height="15px" alt="Maven logo"> Maven</summary>

Libraries are published in Maven Central. You may need to add that repository explicitly
in your build, if you haven't done it before.

```xml
<dependency>
<groupId>com.xebia</groupId>
<artifactId>xef-java</artifactId>
<version>x.x.x</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
```

</details>

## 📖 Quick Introduction

In this small introduction we look at the main features of xef, including the `conversation` function.

- [<img src="https://upload.wikimedia.org/wikipedia/commons/3/37/Kotlin_Icon_2021.svg" height="15px" alt="Kotlin logo"> Kotlin version](https://github.com/xebia-functional/xef/blob/main/docs/intro/kotlin.md)
- [<img src="https://www.scala-lang.org/resources/img/frontpage/scala-spiral.png" height="15px" alt="Scala logo"> Scala version](https://github.com/xebia-functional/xef/blob/main/docs/intro/scala.md)
- [<img src="https://upload.wikimedia.org/wikipedia/en/thumb/3/30/Java_programming_language_logo.svg/234px-Java_programming_language_logo.svg.png" height="15px" alt="Java logo"> Java version](https://github.com/xebia-functional/xef/blob/main/docs/intro/java.md)
In [this](https://github.com/xebia-functional/xef/blob/main/docs/intro.md) small introduction we look at the main features of xef, including the `conversation` function.

## 🚀 Examples

You can also have a look at the examples to have a feeling of how using the library looks like.

- [<img src="https://upload.wikimedia.org/wikipedia/commons/3/37/Kotlin_Icon_2021.svg" height="15px" alt="Kotlin logo"> Examples in Kotlin](https://github.com/xebia-functional/xef/tree/main/examples/kotlin/src/main/kotlin/com/xebia/functional/xef/conversation)
- [<img src="https://www.scala-lang.org/resources/img/frontpage/scala-spiral.png" height="15px" alt="Scala logo"> Examples in Scala](https://github.com/xebia-functional/xef/tree/main/examples/scala/src/main/scala/com/xebia/functional/xef/examples/scala)
- [<img src="https://upload.wikimedia.org/wikipedia/en/thumb/3/30/Java_programming_language_logo.svg/234px-Java_programming_language_logo.svg.png" height="15px" alt="Java logo"> Examples in Java](https://github.com/xebia-functional/xef/tree/main/examples/java/src/main/java/com/xebia/functional/xef/java/auto)
You can also have a look at the [examples](https://github.com/xebia-functional/xef/tree/main/examples/src/main/kotlin/com/xebia/functional/xef/conversation) to have a feeling of how using the library looks like.
60 changes: 0 additions & 60 deletions buildSrc/src/main/kotlin/ScalaPublishingConventionsPlugin.kt

This file was deleted.

This file was deleted.

8 changes: 3 additions & 5 deletions core/TECHNICAL.MD
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ The breakdown is only in terms of JVM, since that's where we _mostly_ care about

We include the following dependencies in our _core_ module to implement a _common_ layer to interact with LLMs.
The dependency on Kotlin Stdlib is unavoidable, since we use Kotlin as our main language.
We also require KotlinX Coroutines such that we can leverage the `suspend` keyword in our API and expose `Future` to the
Java/Scala API.
Additionally, we also have a need for a HTTP client, and a serialization framework. Here we use Ktor and KotlinX
Serialization respectively,
and Xef relies on the CIO engine for Ktor, which avoids any additional dependencies.
We also require KotlinX Coroutines such that we can leverage the `suspend` keyword in our API.
Additionally, we also have a need for an HTTP client, and a serialization framework. Here we use Ktor and KotlinX
Serialization respectively, and Xef relies on the CIO engine for Ktor, which avoids any additional dependencies.

- kotlin-stdlib (1810 Kb = 1598 Kb + 212 Kb)
- kotlinx-coroutines-core (1608 Kb = 1442 Kb + 166 Kb)
Expand Down

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 7222268

Please sign in to comment.