Skip to content

Commit

Permalink
Merge branch 'release/2024.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Aug 1, 2024
2 parents eee95aa + bbeaddc commit 498e3b1
Show file tree
Hide file tree
Showing 624 changed files with 10,362 additions and 23,344 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ jobs:

- uses: kiancross/checkstyle-annotations-action@v1

- name: Checkstyle
run: ./gradlew checkstyleAll --console=plain --warn

- name: Build all Java packages
run: ./gradlew build
run: ./gradlew build --console=plain --warn

- name: Resolve OpenEMS bundles
run: ./gradlew resolve
run: ./gradlew resolve --console=plain --warn

- name: Validate BackendApp.bndrun
run: git diff --exit-code io.openems.backend.application/BackendApp.bndrun
Expand Down Expand Up @@ -64,13 +67,12 @@ jobs:
- name: Build OpenEMS UI
run: |
cd ui
npm install
npm ci --prefer-offline --cache ~/.npm
node_modules/.bin/ng config cli.cache.path "~/.ng"
node_modules/.bin/ng build -c "openems,openems-edge-prod,prod"
node_modules/.bin/ng lint
export CHROME_BIN=/usr/bin/google-chrome-stable
npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
npm run test -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessCI
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
type=raw,value=develop,enable=${{ github.ref == 'refs/heads/develop' }}
- name: Build and push Docker images
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ${{ matrix.dockerfile }}
platforms: linux/amd64, linux/arm64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: ./gradlew buildAntoraDocs --continue

- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.DOCS }}
external_repository: OpenEMS/openems.io
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:

- uses: kiancross/checkstyle-annotations-action@v1

- name: Checkstyle
run: ./gradlew checkstyleAll --console=plain --warn

- name: Build all Java packages
run: ./gradlew build
run: ./gradlew build --console=plain --warn

- name: Resolve OpenEMS bundles
run: ./gradlew resolve
run: ./gradlew resolve --console=plain --warn

- name: Validate BackendApp.bndrun
run: git diff --exit-code io.openems.backend.application/BackendApp.bndrun
Expand All @@ -33,12 +36,12 @@ jobs:
run: git diff --exit-code io.openems.edge.application/EdgeApp.bndrun

- name: Prepare Edge+Backend assets
run: ./gradlew buildEdge buildBackend
run: ./gradlew buildEdge buildBackend --console=plain --warn

- name: Save build-artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
name: java-build-artifacts
path: |
build/openems-edge.jar
build/openems-backend.jar
Expand All @@ -65,7 +68,6 @@ jobs:
- name: Build OpenEMS UI
run: |
cd ui
npm install
npm ci --prefer-offline --cache ~/.npm
node_modules/.bin/ng config cli.cache.path "~/.ng"
node_modules/.bin/ng build -c "openems,openems-edge-prod,prod"
Expand All @@ -75,24 +77,28 @@ jobs:
- name: Prepare UI asset
run: |
mkdir build
cd ui/target
zip -r ../../build/openems-ui.zip ./*
tar --xz --transform 's|^ui/target|openems-ui|' -cvf openems-ui.tar.xz ui/target/
- name: Save build-artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build/openems-ui.zip
name: ui-build-artifacts
path: openems-ui.tar.xz

release:
runs-on: ubuntu-latest
needs: [build-java, build-ui]
steps:
- name: Load build-artifacts
- name: Load Java build-artifacts
uses: actions/download-artifact@v4
with:
name: java-build-artifacts
path: build

- name: Load UI build-artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
name: ui-build-artifacts
path: build

- name: Create draft Release
Expand All @@ -102,4 +108,4 @@ jobs:
files: |
build/openems-edge.jar
build/openems-backend.jar
build/openems-ui.zip
build/openems-ui.tar.xz
2 changes: 1 addition & 1 deletion .gradle-wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 6 additions & 6 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<!-- Changelog: https://github.com/PgBulkInsert/PgBulkInsert/blob/master/CHANGELOG.md-->
<groupId>de.bytefish</groupId>
<artifactId>pgbulkinsert</artifactId>
<version>8.1.3</version>
<version>8.1.4</version>
</dependency>
<!-- eu -->
<dependency>
Expand Down Expand Up @@ -203,7 +203,7 @@
<!-- Changelog: https://github.com/apache/felix-dev/commits/master/http -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.jetty</artifactId>
<version>5.1.22</version>
<version>5.1.24</version>
</dependency>
<dependency>
<!-- Apache Felix Servlet API -->
Expand Down Expand Up @@ -237,7 +237,7 @@
<!-- Changelog: https://github.com/apache/felix-dev/blob/master/webconsole/README.md#releases -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
<version>5.0.4</version>
<version>5.0.6</version>
</dependency>
<dependency>
<!-- Apache Felix Web Console Service Component Runtime/Declarative Services Plugin -->
Expand All @@ -260,12 +260,12 @@
<dependency>
<groupId>org.dhatim</groupId>
<artifactId>fastexcel</artifactId>
<version>0.18.0</version>
<version>0.18.1</version>
</dependency>
<dependency>
<groupId>org.dhatim</groupId>
<artifactId>fastexcel-reader</artifactId>
<version>0.18.0</version>
<version>0.18.1</version>
</dependency>
<dependency>
<!-- Eclipse Paho MQTTv5 Client -->
Expand Down Expand Up @@ -312,7 +312,7 @@
<!-- HTML processing -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.17.2</version>
<version>1.18.1</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand Down
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/edge/deploy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This guide covers a simple, manual approach. For productive systems it is requir
Prerequisites:
* A target device running Debian Linux like a Raspberry Pi, Beaglebone Black or an IoT gateway. You need the IP address and SSH access.
* Create a JAR-file that should be deployes. See xref:edge/build.adoc[Build OpenEMS Edge] for details. Alternatively you may download the latest release `openems-edge.jar` file from https://github.com/OpenEMS/openems/releases[GitHub] under _Assets_.
* Create a JAR-file that should be deployed. See xref:edge/build.adoc[Build OpenEMS Edge] for details. Alternatively you may download the latest release `openems-edge.jar` file from https://github.com/OpenEMS/openems/releases[GitHub] under _Assets_.
* Setup an SSH client to connect to the Linux console, e.g. http://www.9bis.net/kitty/[KiTTY]
* Setup an SCP client to copy the JAR file via SSH, e.g. https://winscp.net/eng/docs/lang:de[WinSCP]
Expand Down Expand Up @@ -132,4 +132,4 @@ Execute `systemctl restart openems --no-block; journalctl -lfu openems`
The command restarts the service (_systemctl restart openems_) while not waiting for the OpenEMS startup notification (_--no-block_). Then it directly prints the OpenEMS system log (_journalctl -lfu openems_).
+
.OpenEMS Edge start-up
image::deploy-openems-start.png[OpenEMS Edge start-up]
image::deploy-openems-start.png[OpenEMS Edge start-up]
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
11 changes: 5 additions & 6 deletions io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

-runbundles: \
Java-WebSocket;version='[1.5.4,1.5.5)',\
com.fasterxml.aalto-xml;version='[1.3.2,1.3.3)',\
com.fasterxml.aalto-xml;version='[1.3.3,1.3.4)',\
com.google.gson;version='[2.11.0,2.11.1)',\
com.google.guava;version='[33.2.1,33.2.2)',\
com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\
Expand Down Expand Up @@ -101,18 +101,17 @@
io.openems.wrapper.retrofit-converter-scalars;version=snapshot,\
io.openems.wrapper.retrofit2;version=snapshot,\
io.reactivex.rxjava3.rxjava;version='[3.1.8,3.1.9)',\
org.apache.commons.commons-compress;version='[1.26.1,1.26.2)',\
org.apache.commons.commons-compress;version='[1.26.2,1.26.3)',\
org.apache.commons.commons-csv;version='[1.10.0,1.10.1)',\
org.apache.commons.commons-io;version='[2.15.1,2.15.2)',\
org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\
org.apache.felix.eventadmin;version='[1.6.4,1.6.5)',\
org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\
org.apache.felix.http.jetty;version='[5.1.22,5.1.23)',\
org.apache.felix.http.jetty;version='[5.1.24,5.1.25)',\
org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\
org.apache.felix.inventory;version='[2.0.0,2.0.1)',\
org.apache.felix.metatype;version='[1.2.4,1.2.5)',\
org.apache.felix.scr;version='[2.2.12,2.2.13)',\
org.apache.felix.webconsole;version='[5.0.4,5.0.5)',\
org.apache.felix.webconsole;version='[5.0.6,5.0.7)',\
org.apache.felix.webconsole.plugins.ds;version='[2.3.0,2.3.1)',\
org.jetbrains.kotlin.osgi-bundle;version='[2.0.0,2.0.1)',\
org.jsr-305;version='[3.0.2,3.0.3)',\
Expand All @@ -125,4 +124,4 @@
org.owasp.encoder;version='[1.2.3,1.2.4)',\
org.postgresql.jdbc;version='[42.7.3,42.7.4)',\
reactive-streams;version='[1.0.4,1.0.5)',\
stax2-api;version='[4.2.0,4.2.1)'
stax2-api;version='[4.2.2,4.2.3)'
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
package io.openems.backend.edge.application;

import java.net.URI;
import java.util.Map;

import org.java_websocket.WebSocket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.openems.common.websocket.AbstractWebsocketClient;
import io.openems.common.websocket.OnClose;
import io.openems.common.websocket.OnError;
import io.openems.common.websocket.OnNotification;
import io.openems.common.websocket.OnOpen;
import io.openems.common.websocket.OnRequest;
import io.openems.common.websocket.WsData;

public class TestClient extends AbstractWebsocketClient<WsData> {

private final Logger log = LoggerFactory.getLogger(TestClient.class);

private OnOpen onOpen;
private OnRequest onRequest;
private OnNotification onNotification;
private OnError onError;
private OnClose onClose;

protected TestClient(URI serverUri, Map<String, String> httpHeaders) {
super("WebsocketPerformanceTestApp", serverUri, httpHeaders);
this.onOpen = (ws, handshake) -> {
return null;
};
this.onRequest = (ws, request) -> {
this.log.info("OnRequest: " + request);
return null;
};
this.onNotification = (ws, notification) -> {
this.log.info("OnNotification: " + notification);
};
this.onError = (ws, ex) -> {
this.log.info("onError: " + ex.getMessage());
};
this.onClose = (ws, code, reason, remote) -> {
this.log.info("onClose: " + reason);
};
}

@Override
public OnOpen getOnOpen() {
return this.onOpen;
}

public void setOnOpen(OnOpen onOpen) {
this.onOpen = onOpen;
}

@Override
public OnRequest getOnRequest() {
return this.onRequest;
}

public void setOnRequest(OnRequest onRequest) {
this.onRequest = onRequest;
}

@Override
public OnError getOnError() {
return this.onError;
}

public void setOnError(OnError onError) {
this.onError = onError;
}

@Override
public OnClose getOnClose() {
return this.onClose;
}

public void setOnClose(OnClose onClose) {
this.onClose = onClose;
}

@Override
protected OnNotification getOnNotification() {
return this.onNotification;
}

public void setOnNotification(OnNotification onNotification) {
this.onNotification = onNotification;
}

@Override
protected WsData createWsData(WebSocket ws) {
return new WsData(ws) {
@Override
public String toString() {
return "TestClient.WsData []";
}
};
}

@Override
protected void logInfo(Logger log, String message) {
log.info(message);
}

@Override
protected void logWarn(Logger log, String message) {
log.warn(message);
}

@Override
protected void logError(Logger log, String message) {
log.error(message);
}

@Override
protected void execute(Runnable command) {
command.run();
}
}
Loading

0 comments on commit 498e3b1

Please sign in to comment.