Skip to content

Commit

Permalink
Merge branch 'release/v2.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed May 7, 2024
2 parents 2359587 + 00f6447 commit 7bcbaa1
Show file tree
Hide file tree
Showing 48 changed files with 1,633 additions and 735 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: build

# we have multiple workflows - this helps to distinguish for them
run-name: "${{ github.event.pull_request.title && github.event.pull_request.title || github.ref_name }} - Build & Test"

on:
push:
branches: [ develop, release/* ]
pull_request:
branches: [ develop ]
workflow_dispatch:

jobs:
Expand All @@ -14,17 +19,30 @@ jobs:
with:
fetch-depth: 0

- name: Setup Java
- name: Setup - Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Jacoco - Unit Tests
run: mvn --batch-mode clean jacoco:prepare-agent package jacoco:report

- name: Spotless
run: mvn -B spotless:apply
- name: Jacoco - Integration Tests
run: mvn --batch-mode jacoco:prepare-agent-integration failsafe:integration-test failsafe:verify verify jacoco:report

- name: Build with Maven
run: mvn -B verify
- name: Sonar - Analyze
# Dependabot has no access to the SONAR_TOKEN secret, so we need to skip sonar.
if: ${{ github.actor != 'dependabot[bot]' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn --batch-mode sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=ehrbase \
-Dsonar.projectKey=ehrbase_openEHR_SDK \
-Dsonar.exclusions=test/** \
-Dsonar.coverage.exclusions=test/**,test-data/**/*,opt-14/**/*,response-dto/**/* \
-Dsonar.coverage.jacoco.xmlReportPaths=${{ github.workspace }}/test-coverage/target/site/jacoco-overall-coverage/jacoco.xml
3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#
name: "CodeQL"

# we have multiple workflows - this helps to distinguish for them
run-name: "${{ github.event.pull_request.title && github.event.pull_request.title || github.ref_name }} - CodeQL"

on:
push:
branches: [ "develop" ]
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Codestyle"

# we have multiple workflows - this helps to distinguish for them
run-name: "${{ github.event.pull_request.title && github.event.pull_request.title || github.ref_name }} - Codestyle"

on:
push:
branches: [ develop, release/* ]
workflow_dispatch:
pull_request:
branches: [ develop ]

#
# Style-check it's a dedicated workflow. This allows us to open a PR, run all tests and fix styling issue later ;).
#
jobs:
check-codestyle:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Spotless
run: mvn spotless:check
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
OSSRH_TOKEN: ${{ secrets.S01_OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: 'Trigger ehrbase:next build'
- name: 'Trigger ehrbase build'
if: github.ref == 'refs/heads/develop'
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
https://api.github.com/repos/ehrbase/ehrbase/dispatches \
-d '{"event_type":"build-ehrbase-next"}'
-d '{"event_type":"build-and-test-postgres"}'
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

Note: version releases in the 0.x.y range may introduce breaking changes.

## [2.10.0]
### Added
- Added EHRbase AQL `MeataData` debug execution data ([594](https://github.com/ehrbase/openEHR_SDK/pull/594))
### Changed
- OptParser now ignores node_id tags for all RM types that are not subtypes of LOCATABLE ([#596](https://github.com/ehrbase/openEHR_SDK/pull/596))
- Removed OpenEhrClient::getFolder (use directoryCrudEndpoint()::getFolder instead) ([#588](https://github.com/ehrbase/openEHR_SDK/pull/588))
### Fixed
- Migrated test to run against EHRbase v2 ([#588](https://github.com/ehrbase/openEHR_SDK/pull/588))
- ContributionBuilder: set VERSION.lifecycle_state to 'complete'" ([#588](https://github.com/ehrbase/openEHR_SDK/pull/588))

## [2.9.1]
### Added
### Fixed
Expand Down Expand Up @@ -391,3 +401,4 @@ Note: version releases in the 0.x.y range may introduce breaking changes.
[2.8.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.7.0...v2.8.0
[2.9.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.8.0...v2.9.0
[2.9.1]: https://github.com/ehrbase/openEHR_SDK/compare/v2.9.0...v2.9.1
[2.10.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.9.1...v2.10.0
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ In case there is a section of code that you carefully formatted in a special way
```
everything here will be reformatted..
// @formatter:off
// @format:off
This is not affected by spotless-plugin reformatting...
And will stay as is it is!
// @formatter:on
// @format:on
everything here will be reformatted..
```
Please be aware that `@formatter:off/on` should only be used on rare occasions to increase readability of complex code and shall be looked at critically when reviewing merge requests.
Please be aware that `@format:off/on` should only be used on rare occasions to increase readability of complex code and shall be looked at critically when reviewing merge requests.

----

Expand Down
2 changes: 1 addition & 1 deletion aql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.9.1</version>
<version>2.10.0</version>
</parent>

<artifactId>aql</artifactId>
Expand Down
24 changes: 15 additions & 9 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<artifactId>bom</artifactId>
<groupId>org.ehrbase.openehr.sdk</groupId>
<version>2.9.1</version>
<version>2.10.0</version>
<packaging>pom</packaging>

<name>openEHR SDK</name>
Expand Down Expand Up @@ -40,13 +40,13 @@
<properties>
<antlr4.version>4.11.1</antlr4.version>
<archie.version>3.3.0</archie.version>
<assertj.version>3.24.2</assertj.version>
<assertj.version>3.25.3</assertj.version>
<cglib.version>3.3.0</cglib.version>
<classgraph.version>4.8.165</classgraph.version>
<commons-cli.version>1.6.0</commons-cli.version>
<commons-collections4.version>4.4</commons-collections4.version>
<commons-lang3.version>3.14.0</commons-lang3.version>
<commons-io.version>2.15.1</commons-io.version>
<commons-io.version>2.16.1</commons-io.version>
<commons-csv.version>1.10.0</commons-csv.version>
<commons-text.version>1.11.0</commons-text.version>
<ehcache.version>3.10.8</ehcache.version>
Expand All @@ -61,9 +61,9 @@
<javax-jaxb.version>2.3.1</javax-jaxb.version>
<json.version>20231013</json.version>
<json-path.version>2.9.0</json-path.version>
<json-smart.version>2.5.0</json-smart.version>
<json-smart.version>2.5.1</json-smart.version>
<jsonassert.version>1.5.1</jsonassert.version>
<junit.version>5.10.0</junit.version>
<junit.version>5.10.2</junit.version>
<mockito.version>4.11.0</mockito.version>
<slf4j.version>1.7.36</slf4j.version>
<xmlbeans.version>3.1.0</xmlbeans.version>
Expand All @@ -72,11 +72,12 @@
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
<jacoco.version>0.8.11</jacoco.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<jacoco.version>0.8.12</jacoco.version>
<threeten-extra.version>1.7.2</threeten-extra.version>
<jaxb-runtime.version>2.3.9</jaxb-runtime.version>
<sonar.scanner.version>3.11.0.3922</sonar.scanner.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -407,7 +408,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.41.1</version>
<version>2.43.0</version>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
Expand Down Expand Up @@ -454,6 +455,11 @@
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.scanner.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
20 changes: 2 additions & 18 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.ehrbase.openehr.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>2.9.1</version>
<version>2.10.0</version>
</parent>

<artifactId>client</artifactId>
Expand All @@ -35,22 +35,6 @@
<license-header.dir>../</license-header.dir>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration combine.self="override">
<dependenciesToScan>com.github.better-care:web-template-tests</dependenciesToScan>
<includes>
<include>${include.tests}</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>javax.cache</groupId>
Expand Down Expand Up @@ -174,7 +158,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.31</version>
<version>6.1.6</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public interface OpenEhrClient {

DirectoryCrudEndpoint directoryCrudEndpoint(UUID ehrId);

FolderDAO folder(UUID ehrId, String path);

/**
* Get the {@link TemplateEndpoint}
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
import com.nedap.archie.rm.archetyped.Locatable;
import com.nedap.archie.rm.changecontrol.OriginalVersion;
import com.nedap.archie.rm.composition.Composition;
import com.nedap.archie.rm.datatypes.CodePhrase;
import com.nedap.archie.rm.datavalues.DvCodedText;
import com.nedap.archie.rm.directory.Folder;
import com.nedap.archie.rm.generic.AuditDetails;
import com.nedap.archie.rm.support.identification.ObjectVersionId;
import com.nedap.archie.rm.support.identification.TerminologyId;
import com.nedap.archie.rm.support.identification.UIDBasedId;
import javax.annotation.Nullable;
import org.ehrbase.openehr.sdk.client.openehrclient.ContributionChangeType;
Expand Down Expand Up @@ -192,6 +195,8 @@ private void updateContribution(
updateMetadataById(precedingVersionUid, originalVersion, compositionAudit);

originalVersion.setCommitAudit(compositionAudit);
originalVersion.setLifecycleState(
new DvCodedText("complete", new CodePhrase(new TerminologyId("openehr"), "532")));

this.contributionCreateDto.getVersions().add(originalVersion);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import org.ehrbase.openehr.sdk.client.openehrclient.CompositionEndpoint;
import org.ehrbase.openehr.sdk.client.openehrclient.ContributionEndpoint;
import org.ehrbase.openehr.sdk.client.openehrclient.DirectoryCrudEndpoint;
import org.ehrbase.openehr.sdk.client.openehrclient.FolderDAO;
import org.ehrbase.openehr.sdk.client.openehrclient.OpenEhrClient;
import org.ehrbase.openehr.sdk.client.openehrclient.OpenEhrClientConfig;
import org.ehrbase.openehr.sdk.client.openehrclient.TemplateEndpoint;
Expand Down Expand Up @@ -330,11 +329,6 @@ public DirectoryCrudEndpoint directoryCrudEndpoint(UUID ehrId) {
return new DefaultCrudEndpoint(this, ehrId);
}

@Override
public FolderDAO folder(UUID ehrId, String path) {
return new DefaultRestDirectoryEndpoint(this, ehrId).getFolder(path);
}

@Override
public TemplateEndpoint templateEndpoint() {
return new DefaultRestTemplateEndpoint(this);
Expand Down
Loading

0 comments on commit 7bcbaa1

Please sign in to comment.