Skip to content

Initial version - #5

Open
gerritdrost wants to merge 14 commits into
mainfrom
initial-version
Open

Initial version#5
gerritdrost wants to merge 14 commits into
mainfrom
initial-version

Conversation

@gerritdrost

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 14 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>
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 TonyXiang8787 added the feature New feature or request label Aug 6, 2026
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # 5.6.0
with:
java-version: ${{ inputs.java_version }}
distribution: 'zulu'

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.

Probably needs to become temurin. Double check this.

Comment thread config/pmd/ruleset.xml
<?xml version="1.0"?>
<ruleset name="DSA Rules">
<description>
PMD rules for the Dynamic Safety Analyzer

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.

Remove all occurences of DSA / Dynamic Safety Analyzer

Comment thread build.gradle
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'lib-power-grid-model'

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.

Is this name right?

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

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants