-
Notifications
You must be signed in to change notification settings - Fork 0
First implementation for gridsuite-computation lib #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
4a1c7dc
7e946ce
c30dd59
55a7807
52b65be
b47e501
ddc6b37
0ede4d1
13ab75e
e2dc317
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
uses: powsybl/github-ci/.github/workflows/build-backend-lib-generic.yml@39565de6fd7d394ed76fa09e5197ffb1350ff1e6 | ||
with: | ||
eventType: computation_updated | ||
secrets: | ||
sonar-token: ${{ secrets.SONAR_TOKEN }} | ||
repo-token: ${{ secrets.REPO_ACCESS_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Patch | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branchRef: | ||
description: 'Patch branch (format: release-vX.Y.Z)' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
run-patch: | ||
uses: powsybl/github-ci/.github/workflows/patch-backend-lib-generic.yml@39565de6fd7d394ed76fa09e5197ffb1350ff1e6 | ||
with: | ||
githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }} | ||
branchRef: ${{ github.event.inputs.branchRef }} | ||
secrets: | ||
VERSIONBUMP_GHAPP_PRIVATE_KEY: ${{ secrets.VERSIONBUMP_GHAPP_PRIVATE_KEY }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
versionType: | ||
description: 'Version type increment (major | minor)' | ||
required: true | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
|
||
jobs: | ||
run-release: | ||
uses: powsybl/github-ci/.github/workflows/release-backend-lib-generic.yml@39565de6fd7d394ed76fa09e5197ffb1350ff1e6 | ||
with: | ||
githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }} | ||
versionType: ${{ github.event.inputs.versionType }} | ||
secrets: | ||
VERSIONBUMP_GHAPP_PRIVATE_KEY: ${{ secrets.VERSIONBUMP_GHAPP_PRIVATE_KEY }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# VSCode | ||
/.vscode | ||
/.settings | ||
.classpath | ||
.factorypath | ||
.project | ||
|
||
target/ | ||
|
||
# IntelliJ | ||
/.idea | ||
*.iml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
# computation | ||
# computation | ||
|
||
[](https://github.com/gridsuite/computation/actions) | ||
[](https://sonarcloud.io/component_measures?id=org.gridsuite%computation&metric=coverage) | ||
[](https://www.mozilla.org/en-US/MPL/2.0/) | ||
|
||
Shared library for common computation and filter classes. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import target/configs/powsybl-build-tools.jar!powsybl-build-tools/lombok.config |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,271 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<?xml version="1.0" encoding="UTF-8"?> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<!-- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright (c) 2025, RTE (http://www.rte-france.com) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This Source Code Form is subject to the terms of the Mozilla Public | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
License, v. 2.0. If a copy of the MPL was not distributed with this | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
xmlns="http://maven.apache.org/POM/4.0.0" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<modelVersion>4.0.0</modelVersion> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<parent> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<groupId>com.powsybl</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<artifactId>powsybl-parent</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<version>23</version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<relativePath/> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</parent> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<groupId>org.gridsuite</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<artifactId>gridsuite-computation</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<version>1.0.0-SNAPSHOT</version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<packaging>jar</packaging> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<name>Computation library</name> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<description>A shared library for common computation and filter classes</description> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
<description>A shared library for common computation and filter classes</description> | |
<description>Common library for computation and result filtering.</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okey
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<spring-boot.version>3.3.3</spring-boot.version> | |
<spring-cloud.version>2023.0.1</spring-cloud.version> | |
<powsybl-dependencies.version>2025.0.2</powsybl-dependencies.version> | |
<powsybl-network-store-client.version>1.27.2</powsybl-network-store-client.version> | |
<lombok.version>1.18.34</lombok.version> | |
<org-apache-commons.version>4.4</org-apache-commons.version> | |
<org.hamcrest.version>2.2</org.hamcrest.version> | |
<gridsuite-filter.version>1.4.0</gridsuite-filter.version> | |
<sonar.organization>gridsuite</sonar.organization> | |
<sonar.projectKey>org.gridsuite:computation</sonar.projectKey> | |
<powsybl-ws-dependencies.version>2.22.0</powsybl-ws-dependencies.version> | |
<powsybl-network-store.version>1.28.0</powsybl-network-store.version> | |
<gridsuite-filter.version>1.5.0</gridsuite-filter.version> | |
<spring-boot.version>3.3.3</spring-boot.version> | |
<spring-cloud.version>2023.0.1</spring-cloud.version> | |
<lombok.version>1.18.34</lombok.version> | |
<org-apache-commons.version>4.4</org-apache-commons.version> | |
<org.hamcrest.version>2.2</org.hamcrest.version> | |
<sonar.organization>gridsuite</sonar.organization> | |
<sonar.projectKey>org.gridsuite:computation</sonar.projectKey> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<powsybl-network-store-client.version>1.28.0</powsybl-network-store-client.version> and not <powsybl-network-store.version>1.28.0</powsybl-network-store.version>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, powsybl-network-store-client always matches the powsybl-network-store.version. Therefore, when overriding the client, it's more appropriate to use powsybl-network-store.version
However, it should include a TODO: To be removed comment for the next powsybl-ws-dependencies migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
powsybl-network-store-client always matches the powsybl-network-store.version
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<version>${powsybl-network-store-client.version}</version> |
we do not need version except override but we use ${powsybl-network-store}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright (c) 2025, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package org.gridsuite.computation; | ||
|
||
import com.fasterxml.jackson.databind.InjectableValues; | ||
import com.powsybl.commons.report.ReportNodeDeserializer; | ||
import com.powsybl.commons.report.ReportNodeJsonModule; | ||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ComputationConfig { | ||
@Bean | ||
public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() { | ||
return builder -> builder.modulesToInstall(new ReportNodeJsonModule()) | ||
.postConfigurer(objMapper -> objMapper.setInjectableValues(new InjectableValues.Std().addValue(ReportNodeDeserializer.DICTIONARY_VALUE_ID, null))); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or just Library for computation and result filtering ( I mean without Common ) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it is okey for Common
done