diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..334fc8d --- /dev/null +++ b/.github/release.yml @@ -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: + - "*" diff --git a/.github/workflows/automate-projects.yml b/.github/workflows/automate-projects.yml index 770803d..8c8449c 100644 --- a/.github/workflows/automate-projects.yml +++ b/.github/workflows/automate-projects.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index afa43cc..d2989de 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -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' diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index 5be2d56..357239d 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -22,7 +22,7 @@ jobs: # Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/. 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' diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index b5f589a..134ba7b 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -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' @@ -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 diff --git a/pom.xml b/pom.xml index ba0b94a..ec05783 100644 --- a/pom.xml +++ b/pom.xml @@ -20,11 +20,9 @@ SPDX-License-Identifier: Apache-2.0 UTF-8 0.0.4 - 1.7.32 - 2.13.0 - 2.3.3 - 5.8.2 - 4.1.0 + 2.7.0.Final + 1.7.35 + 2.3.6 0.9.1 @@ -55,6 +53,14 @@ SPDX-License-Identifier: Apache-2.0 + + io.quarkus + quarkus-universe-bom + ${quarkus.platform.version} + pom + import + + org.lfenergy.compas.core commons @@ -71,40 +77,6 @@ SPDX-License-Identifier: Apache-2.0 ${compas.scl.xsd.version} - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - ${jackson.version} - - - - jakarta.validation - jakarta.validation-api - 2.0.2 - - - org.hibernate.validator - hibernate-validator - 6.2.0.Final - test - - - org.glassfish - jakarta.el - 3.0.4 - test - - - - jakarta.xml.bind - jakarta.xml.bind-api - ${jaxb.bind.version} - com.sun.xml.bind jaxb-impl @@ -116,12 +88,6 @@ SPDX-License-Identifier: Apache-2.0 javax.ws.rs-api 2.1.1 - - org.jboss.resteasy - resteasy-core - 5.0.1.Final - test - org.slf4j @@ -134,30 +100,12 @@ SPDX-License-Identifier: Apache-2.0 ${slf4j.version} - - org.junit.jupiter - junit-jupiter-api - ${junit.jupiter.version} - test - - - org.junit.jupiter - junit-jupiter-engine - ${junit.jupiter.version} - test - com.openpojo openpojo ${openpojo.version} test - - org.mockito - mockito-junit-jupiter - ${mockito-junit-jupiter.version} - test - @@ -200,7 +148,7 @@ SPDX-License-Identifier: Apache-2.0 org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.9.0 @@ -212,7 +160,7 @@ SPDX-License-Identifier: Apache-2.0 org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 diff --git a/scl-extension/src/main/bindings/scl-extensions.xjb b/scl-extension/src/main/bindings/scl-extensions.xjb index c19ff84..374006f 100644 --- a/scl-extension/src/main/bindings/scl-extensions.xjb +++ b/scl-extension/src/main/bindings/scl-extensions.xjb @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 xmlns:jxb="http://java.sun.com/xml/ns/jaxb" version="2.1"> - + diff --git a/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/commons/CompasExtensionsField.java b/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/commons/CompasExtensionsField.java index 008d97c..ae8366d 100644 --- a/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/commons/CompasExtensionsField.java +++ b/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/commons/CompasExtensionsField.java @@ -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; diff --git a/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java b/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java index 220140d..99300e9 100644 --- a/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java +++ b/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java @@ -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"), diff --git a/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd b/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd index 6b20188..42f88ab 100644 --- a/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd +++ b/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd @@ -1,7 +1,6 @@ Version 1.0 Release 2021/06/16 + Version 1.1 Release 2022/01/21 + - + Name of the SCL configuration, extension excluded - + - + File type of the SCL configuration file @@ -75,5 +76,201 @@ SPDX-License-Identifier: Apache-2.0 - - \ No newline at end of file + + + + + IED type to be used to identity the set of LDevice.inst handled by the IED + + + + + + + + + + + + + + + + + + + + + + + + + + Define whether the Flow between two LDevice belonging to two ICDs with-in two System Version (identical or different) are qualified (ACTIVE), not working (INACTIVE) or untested (UNTESTED) + + + + + + + + + + + + + Define whether the LDevice belonging to one ICD with-in one System Version are qualified (ACTIVE), not working (INACTIVE) or untested (UNTESTED) + + + + + + + + + + + + + Define whether the IED with-in one System Version is used as NOMINAL or BACKUP IED + + + + + + + + + + + + + + Define whether the Flow is limited to the Bay(refering to the physical one or cubicles) to which belong the IED (BAY_INTERNAL) or only going outside the BAY (BAY_EXTERNAL) or both (BAY_INTERNAL_EXTERNAL) + + + + + + + + + + + + + Define the link between specific Compas attributes and one ExtRef within the STD file. The dataStreamKey is the key with the ExtRef.desc. The ExtRef attributes are directly linked to the attributes of the ExRef. + The FlowID is used to link additional informations to the flow as the criteria. + The FlowStatus define whether if the flow is qualified, non qualified or untested accordingly to the source IED which is bellonging to a define SystemVersion + + + + + + + + + + + + + + + + + Define the specific Compas attributes linked to the Bay. The Main and Second Labels are label of the bay specific to each user. MainLabel and Version identify uniquely the instanciated Bay as the UUID + The BayCodif is specific to each user to identify the bay kind. + + + + + + + + + + + + + + + Define the specific busbarsection or zone of the connectivity node + + + + + + + + + + Define specific Compas attributes to identify uniquely one ICD file with-in a SystemVersion for a given IEDredundancy. The UUID of this combinaison is defined by the ICDSystemVersionUUID. + This private is intended to be used in the STD file (/IED level) and SSD (/LNode level) + + + + + + + + + + + + + + + + + + + + + Identify the SystemVersion to which the functional Bay and IED belongs to. This Private can be used in /Bay in substation and in the /IED. + + + + + + + + + + Identifies the Function from the user specific catalog of function + + + + + + + + + + Identifies the LDevice from the user specific catalog of LDevice + + + + + + + + + + Identifies the Criteria linked to a Flow or LDevice or Function from the user specific catalog of criteria + + + + + + + + + + + + + + + + +