Skip to content

Initial version of libpower-grid-model-java - #4

Closed
gerritdrost wants to merge 14 commits into
PowerGridModel:mainfrom
gerritdrost:develop
Closed

Initial version of libpower-grid-model-java#4
gerritdrost wants to merge 14 commits into
PowerGridModel:mainfrom
gerritdrost:develop

Conversation

@gerritdrost

@gerritdrost gerritdrost commented Aug 4, 2026

Copy link
Copy Markdown

Merge instructions

This PR is a merger of work by @Mahmuttumkaya, @wei-qiang and me. A merge without squash has our preference as it retains authorship of the code, which has our preference.

From now on we aim to provide concise PR's which can then be squash merged.

Changes in this PR

Java project that implements a wrapper to the PGM C library. Currently implemented:

  • a Gradle build pipeline that downloads PGM binaries and headers and uses JExtract to generate a wrapper
  • Java code to:
    • automatically load the included PGM binaries for supported platforms,
    • OR check if (a manually loaded) PGM binary is available, and optionally if version matches the ones of the headers used to generate the Java wrapper (for all unsupported platforms that do support C and Java)
  • automatic application of code style and license headers in Java files
  • basic CI pipeline that builds the project, performs code style checks and runs unit tests
  • A Java translation of the PGM example (power_grid_model_c_example/main.c)

Future improvements

A non-exhaustive list of things we should improve in the future:

  • clean up the build setup (move the custom tasks into a buildSrc-dir, which would clean up the mess in build.gradle)
  • automatic application of license headers in non-Java files
  • write/improve documentation

gerritdrost and others added 11 commits August 4, 2026 15:24
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
Signed-off-by: Mahmut Tumkaya <mahmut.tumkaya@alliander.com>
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
Signed-off-by: Mahmut Tumkaya <mahmut.tumkaya@alliander.com>
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
Signed-off-by: Wei-Qiang Zhou <wei-qiang.zhou@alliander.com>
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
- uses DSA code style (through eclipse code style file)
- adds licence header to all Java files

Signed-off-by: Wei-Qiang Zhou <wei-qiang.zhou@alliander.com>
- Add license header to gradle files
- Remove license header from gradle-wrapper.properties

Signed-off-by: Wei-Qiang Zhou <wei-qiang.zhou@alliander.com>
- Add github workflow
- Move fileTree call out of doLast
- Add license header
- Remove author and description in actions

Signed-off-by: Wei-Qiang Zhou <wei-qiang.zhou@alliander.com>
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
@gerritdrost
gerritdrost marked this pull request as ready for review August 4, 2026 13:32
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # 5.6.0
with:
java-version: ${{ inputs.java_version }}
distribution: 'zulu'

@gerritdrost gerritdrost Aug 4, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azul Zulu is the default JVM inside Alliander (Alliander has a contract). Should we use this here, or should we use Eclipse Temurin?

Comment thread settings.gradle Outdated
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
…n message

Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
Signed-off-by: Gerrit Drost <gerrit.drost@alliander.com>
@TonyXiang8787

Copy link
Copy Markdown
Member

I am closing this PR.

@gerritdrost now you are part of PGM organization. Please re-push the branch to this repo directly (not fork), then create an internal PR.

@TonyXiang8787

Copy link
Copy Markdown
Member

See #5 for active PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants