Skip to content
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
27 changes: 27 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name-template: '$NEXT_PATCH_VERSION'
tag-template: '$NEXT_PATCH_VERSION'
categories:
- title: 'Features'
labels:
- 'type: new feature'
- 'type: enhancement'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'type: bug'
- 'bug'
- title: 'Maintenance'
label: 'refactor'
change-template: '- $TITLE #$NUMBER'
exclude-labels:
- 'skip-changelog'
template: |
## Changes

$CHANGES

## Contributors
We'd like to thank all the contributors who worked on this release!

$CONTRIBUTORS

4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
ports:
- 6379:6379
redisearch:
image: redislabs/redisearch:1.6.13
image: redislabs/redisearch:latest
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
java-version: 1.8

- name: Build with Maven
run: mvn clean install -DskipTests=true --file pom.xml
run: mvn clean install -DskipTests=true -Dgpg.skip --file pom.xml

- name: Test RedisBloom
run: mvn test -pl redisbloom -DREDIS_HOST=localhost --file pom.xml
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 changes: 15 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![build](https://github.com/dengliming/redis-modules-java/workflows/build/badge.svg) ![java-version](https://img.shields.io/badge/JDK-1.8+-brightgreen.svg) ![maven](https://img.shields.io/badge/maven-3.5+-brightgreen.svg) [![license](https://img.shields.io/github/license/dengliming/redis-modules-java)](/LICENSE) [![codecov](https://codecov.io/gh/dengliming/redis-modules-java/branch/master/graph/badge.svg?token=U8BA091JD5)](https://codecov.io/gh/dengliming/redis-modules-java)
![build](https://github.com/dengliming/redis-modules-java/workflows/build/badge.svg) ![java-version](https://img.shields.io/badge/JDK-1.8+-brightgreen.svg) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.dengliming.redismodule/redis-modules-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.dengliming.redismodule/redis-modules-java) [![license](https://img.shields.io/github/license/dengliming/redis-modules-java)](/LICENSE) [![codecov](https://codecov.io/gh/dengliming/redis-modules-java/branch/master/graph/badge.svg?token=U8BA091JD5)](https://codecov.io/gh/dengliming/redis-modules-java)


Java Client libraries for [redis-modules](https://redis.io/modules), based on [Redisson](https://github.com/redisson/redisson).
Expand All @@ -17,32 +17,11 @@ Java Client libraries for [redis-modules](https://redis.io/modules), based on [R
## Installing

#### Build from source
Execute ./mvnw clean install -DskipTests=true. The build process requires JDK8+.
Execute ./mvnw clean install -DskipTests=true -Dgpg.skip. The build process requires JDK8+.

#### Maven repository
repositories
```xml
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://github.com/dengliming/mvn-repo/master/snapshots</url>
</repository>
<repository>
<id>releases-repo</id>
<url>https://github.com/dengliming/mvn-repo/master/releases</url>
</repository>
</repositories>
```
Include all
```xml
<!-- snapshot -->
<dependency>
<groupId>io.github.dengliming.redismodule</groupId>
<artifactId>all</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
```
or
```xml
<!-- release -->
<dependency>
<groupId>io.github.dengliming.redismodule</groupId>
Expand All @@ -52,22 +31,14 @@ or
```
Include single module like:
```xml
<!-- snapshot -->
<dependency>
<groupId>io.github.dengliming.redismodule</groupId>
<artifactId>redistimeseries</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
```
or
```xml
<!-- release -->
<dependency>
<groupId>io.github.dengliming.redismodule</groupId>
<artifactId>redistimeseries</artifactId>
<version>1.0.0</version>
</dependency>
```

## Usage example
RedisBloom
```java
Expand Down Expand Up @@ -143,6 +114,17 @@ redisTimeSeries.add(new Sample("temperature:2:32", Sample.Value.of(timestamp, 26
.labels(new Label("sensor_id", "2"), new Label("area_id", "32")));
redisTimeSeriesClient.shutdown();
```

RedisAI
```java
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
RedisAIClient redisAIClient = new RedisAIClient(config);

RedisAI redisAI = redisAIClient.getRedisAI();
redisAI.setTensor("tensor1", DataType.FLOAT, new int[]{2, 2}, null, new String[]{"1", "2", "3", "4"});
redisAIClient.shutdown();
```
## License

[Apache License 2.0](/LICENSE)
6 changes: 0 additions & 6 deletions commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,4 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>commons</artifactId>
<name>Commons</name>
<dependencies>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
</dependency>
</dependencies>
</project>
119 changes: 97 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,36 @@
</modules>

<name>Redis-Modules-Java</name>
<description>Java Client libraries for redis-modules.</description>
<url>https://github.com/dengliming/redis-modules-java</url>

<properties>
<scm>
<url>git:git@github.com:dengliming/redis-modules-java.git</url>
<connection>scm:git:git@github.com:dengliming/redis-modules-java.git</connection>
<developerConnection>scm:git:git@github.com:dengliming/redis-modules-java.git</developerConnection>
<tag>HEAD</tag>
</scm>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<developers>
<developer>
<id>dengliming</id>
<name>dengliming</name>
<email>liming.d.pro@gmail.com</email>
<roles>
<role>Founder</role>
<role>Developer</role>
</roles>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<redisson.version>3.13.4</redisson.version>
<junit.version>5.6.2</junit.version>
Expand All @@ -29,15 +56,13 @@
<maven-shade-plugin.version>3.2.1</maven-shade-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<gpg-plugin.version>1.6</gpg-plugin.version>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<surefire-plugin.version>3.0.0-M3</surefire-plugin.version>
<assertj-core.version>3.17.2</assertj-core.version>
<hamcrest-library.version>2.2</hamcrest-library.version>
</properties>

<scm>
<url>scm:git:git@github.com:dengliming/redis-modules-java.git</url>
<connection>scm:git:git@github.com:dengliming/redis-modules-java.git</connection>
<developerConnection>scm:git:git@github.com:dengliming/redis-modules-java.git</developerConnection>
<tag>HEAD</tag>
</scm>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -81,16 +106,24 @@
<artifactId>redistimeseries</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest-library.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand All @@ -110,6 +143,12 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
</dependencies>

<build>
Expand All @@ -136,6 +175,23 @@
</configuration>
</plugin>

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<aggregate>true</aggregate>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -150,6 +206,12 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand All @@ -169,19 +231,32 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>releases</id>
<name>releases</name>
<url>file:/data/mvn-repo/repository/releases/</url>
</repository>
<snapshotRepository>
<id>snapshot</id>
<name>snapshot</name>
<url>file:/data/mvn-repo/repository/snapshots/</url>
<id>oss</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>oss</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
</project>
8 changes: 4 additions & 4 deletions redisai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ See https://oss.redislabs.com/redisai/ for more details.
Redis command|Sync / Async Api|
| --- | --- |
AI.TENSORSET | RedisAI.<br/>setTensor()<br/>setTensorAsync() |
AI.TENSORGET | N/A |
AI.TENSORGET | RedisAI.<br/>getTensor()<br/>getTensorAsync() |
AI.MODELSET | RedisAI.<br/>setModel()<br/>setModelAsync() |
AI.MODELGET | N/A |
AI.MODELGET | RedisAI.<br/>getModel()<br/>getModelAsync() |
AI.MODELDEL | RedisAI.<br/>deleteModel()<br/>deleteModelAsync() |
AI.MODELRUN | N/A |
AI._MODELSCAN | N/A |
AI.SCRIPTSET | RedisAI.<br/>setScript()<br/>setScriptAsync() |
AI.SCRIPTGET | N/A |
AI.SCRIPTGET | RedisAI.<br/>getScript()<br/>getScriptAsync() |
AI.SCRIPTDEL | RedisAI.<br/>deleteScript()<br/>deleteScriptAsync() |
AI.SCRIPTRUN | RedisAI.<br/>runScript()<br/>runScriptAsync() |
AI._SCRIPTSCAN | N/A |
AI.DAGRUN | N/A |
AI.DAGRUN_RO | N/A |
AI.INFO | RedisAI.<br/>getInfo()<br/>getInfoAsync()<br/>resetStat()<br/>resetStatAsync() |
AI.CONFIG | RedisAI.<br/>loadBackend()<br/>loadBackendAsync()<br/>setBackendPath()<br/>setBackendPathAsync() |
AI.CONFIG | RedisAI.<br/>loadBackend()<br/>loadBackendAsync()<br/>setBackendPath()<br/>setBackendPathAsync() |
5 changes: 0 additions & 5 deletions redisai/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
<groupId>io.github.dengliming.redismodule</groupId>
<artifactId>commons</artifactId>
</dependency>

<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
</dependency>
</dependencies>

</project>
Loading