Skip to content

Commit

Permalink
Merge pull request #113 from com-pas/develop
Browse files Browse the repository at this point in the history
New release of the CoMPAS Core
  • Loading branch information
Dennis Labordus authored Feb 8, 2022
2 parents b1dc75d + 22451e1 commit a9d10ef
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 86 deletions.
26 changes: 26 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

changelog:
exclude:
labels:
- wontfix
- duplicate
- invalid
categories:
- title: New Features
labels:
- enhancement
- title: Bugfixes
labels:
- bug
- title: Tooling changes
labels:
- tooling
- title: Dependency updates
labels:
- dependencies
- title: Other Changes
labels:
- "*"
8 changes: 5 additions & 3 deletions .github/workflows/automate-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

name: Add issues and pull request to project boards

on: [ issues, pull_request ]
on: [ issues, pull_request, pull_request_target ]

jobs:
github-actions-automate-projects:
runs-on: ubuntu-latest

if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
steps:
- name: add-new-issues-to-repository-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
Expand All @@ -19,7 +21,7 @@ jobs:
GITHUB_PROJECT_COLUMN_NAME: To do
- name: add-new-pull-request-to-repository-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
if: github.event_name == 'pull_request' && github.event.action == 'opened'
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-core/projects/2
Expand All @@ -33,7 +35,7 @@ jobs:
GITHUB_PROJECT_COLUMN_NAME: To do
- name: add-new-pull-request-to-organization-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
if: github.event_name == 'pull_request' && github.event.action == 'opened'
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
env:
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v2.4.0
uses: actions/setup-java@v2.5.0
with:
distribution: 'zulu'
java-version: '11'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
- name: Set up JDK 1.11
uses: actions/setup-java@v2.4.0
uses: actions/setup-java@v2.5.0
with:
distribution: 'zulu'
java-version: '11'
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,24 @@ on:
branches:
- 'main'
- 'develop'
pull_request_target:
branches:
- 'main'
- 'develop'

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15

if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 1.11
uses: actions/setup-java@v2.4.0
uses: actions/setup-java@v2.5.0
with:
distribution: 'zulu'
java-version: '11'
Expand Down Expand Up @@ -52,4 +59,5 @@ jobs:
-Dsonar.projectKey=com-pas_compas-core \
-Dsonar.organization=com-pas \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
78 changes: 13 additions & 65 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ SPDX-License-Identifier: Apache-2.0
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<compas.scl.xsd.version>0.0.4</compas.scl.xsd.version>
<slf4j.version>1.7.32</slf4j.version>
<jackson.version>2.13.0</jackson.version>
<jaxb.bind.version>2.3.3</jaxb.bind.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<mockito-junit-jupiter.version>4.1.0</mockito-junit-jupiter.version>
<quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
<slf4j.version>1.7.35</slf4j.version>
<jaxb.bind.version>2.3.6</jaxb.bind.version>
<openpojo.version>0.9.1</openpojo.version>
</properties>

Expand Down Expand Up @@ -55,6 +53,14 @@ SPDX-License-Identifier: Apache-2.0

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-universe-bom</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.lfenergy.compas.core</groupId>
<artifactId>commons</artifactId>
Expand All @@ -71,40 +77,6 @@ SPDX-License-Identifier: Apache-2.0
<version>${compas.scl.xsd.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.2.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>3.0.4</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb.bind.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
Expand All @@ -116,12 +88,6 @@ SPDX-License-Identifier: Apache-2.0
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-core</artifactId>
<version>5.0.1.Final</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -134,30 +100,12 @@ SPDX-License-Identifier: Apache-2.0
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.openpojo</groupId>
<artifactId>openpojo</artifactId>
<version>${openpojo.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito-junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -200,7 +148,7 @@ SPDX-License-Identifier: Apache-2.0
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.9.0</version>
</plugin>

<plugin>
Expand All @@ -212,7 +160,7 @@ SPDX-License-Identifier: Apache-2.0
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.2</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
2 changes: 1 addition & 1 deletion scl-extension/src/main/bindings/scl-extensions.xjb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
version="2.1">
<jxb:bindings schemaLocation="../resources/xsd/SCL_CoMPAS.xsd">
<jxb:bindings node="//xs:simpleType[@name='tSclFileType']">
<jxb:bindings node="//xs:simpleType[@name='tCompasSclFileType']">
<jxb:typesafeEnumClass ref="org.lfenergy.compas.scl.extensions.model.SclFileType"/>
</jxb:bindings>
</jxb:bindings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@

/**
* The CoMPAS Extension fields that exists. The fieldName is the name how the element is used in the XML.
* For a description of the fields, see the XSD.
*/
public enum CompasExtensionsField {
/**
* The name of the SCL XML File, will be used in the search and when SCL XML File is saved to the filesystem.
*/
SCL_NAME_EXTENSION("SclName"),
/**
* The type of SCL XML File it is, like IID, SCD and more. TSclFileType indicates which values are allowed.
*/
SCL_FILETYPE_EXTENSION("SclFileType");
SCL_FILETYPE_EXTENSION("SclFileType"),
FLOW("Flow"),
CONNECTIVITY_NODE("ConnectivityNode"),
BAY("Bay"),
L_DEVICE("LDevice"),
CRITERIA("Criteria"),
ICD_HEADER("ICDHeader"),
SYSTEM_VERSION("SystemVersion"),
FUNCTION("Function");

private final String fieldName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "tSclFileType", namespace = "https://www.lfenergy.org/compas/extension/v1")
import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_EXTENSION_NS_URI;

@XmlType(name = "tCompasSclFileType", namespace = COMPAS_EXTENSION_NS_URI)
@XmlEnum
public enum SclFileType {
SSD("Substation Specification Description"),
Expand Down
Loading

0 comments on commit a9d10ef

Please sign in to comment.