Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- master
tags:
- '*'
# Release Please dispatches this at the new tag; a tag it pushes starts no run by itself.
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -73,7 +75,7 @@ jobs:
publish-testpypi:
name: Publish wheels and source distribution to Test PyPI
runs-on: ubuntu-24.04
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
permissions:
id-token: write
needs:
Expand All @@ -97,7 +99,7 @@ jobs:
publish-pypi:
name: Publish wheels and source distribution to PyPI
runs-on: ubuntu-24.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && !contains(github.ref, '-rc')
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags') && !contains(github.ref, '-rc')
permissions:
id-token: write
needs:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
# SPDX-License-Identifier: MPL-2.0

name: Release Please

on:
push:
branches: [master]
workflow_dispatch:

permissions:
actions: write
contents: write
pull-requests: write

jobs:
release-please:
name: Prepare Release
runs-on: ubuntu-latest
steps:
- id: release
uses: googleapis/release-please-action@v4

Check failure on line 22 in .github/workflows/release-please.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=sogno-platform_dpsim&issues=AZ-zbLfMhAKrAKl75iZh&open=AZ-zbLfMhAKrAKl75iZh&pullRequest=608
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
target-branch: master

# A tag pushed with GITHUB_TOKEN starts no workflow, but a dispatch always does.
- name: Start the publish pipeline
if: steps.release.outputs.release_created == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.release.outputs.tag_name }}
run: gh workflow run publish_to_pypi.yaml --repo "${GITHUB_REPOSITORY}" --ref "${TAG}"
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ repos:
rev: "v0.13.0"
hooks:
- id: markdownlint
# CHANGELOG.md is generated by Release Please and trips MD012.
exclude: ^CHANGELOG\.md$
args: [-r, "~MD013,~MD033,~MD024"]
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add SPDX header to new manifest file
severity: medium · confidence: 95%

The new file .release-please-manifest.json lacks an SPDX header. All new source, script, and workflow files must carry an SPDX header with SPDX-FileCopyrightText and SPDX-License-Identifier in the file's own comment syntax (# for JSON).

Suggested fix: Add the SPDX header at the top of the file using the correct JSON comment syntax:
// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
// SPDX-License-Identifier: MPL-2.0

Suggested change
{
// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
// SPDX-License-Identifier: MPL-2.0
{
".": "1.2.1"
}

Checked against the source: new manifest starts directly with JSON and contains no SPDX-FileCopyrightText or SPDX-License-Identifier header

stage: process-compliance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing SPDX header in new JSON file
severity: medium · confidence: 95%

All new source files must include an SPDX license header per project policy. The newly added .release-please-manifest.json lacks the required SPDX-FileCopyrightText and SPDX-License-Identifier lines, violating the Development/guidelines rule for new files.

Suggested fix: Add the appropriate SPDX header comment at the top of the JSON file, matching the project's licensing (MPL-2.0).

Suggested change
{
# SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
# SPDX-License-Identifier: MPL-2.0
{
".": "1.2.1"
}

Checked against the source: new manifest starts directly with JSON and contains no SPDX-FileCopyrightText or SPDX-License-Identifier header

stage: domain-modeling

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing SPDX header in new JSON manifest
severity: medium · confidence: 95%

New source files must contain an SPDX license header using the file's comment syntax. JSON has no native comment syntax, but the project convention requires a header (e.g. // SPDX-FileCopyrightText ... // SPDX-License-Identifier ...) at the top of the file. The manifest currently starts directly with JSON content, violating the SPDX requirement and breaking automated license compliance checks.

Suggested fix: Add a SPDX header as the first two lines using // comments before the JSON object. This will satisfy the project's SPDX policy while remaining ignored by JSON parsers.

Suggested change
{
// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
// SPDX-License-Identifier: MPL-2.0
{

Checked against the source: new manifest starts directly with JSON and contains no SPDX-FileCopyrightText or SPDX-License-Identifier header

stage: process-compliance

".": "1.2.1"
}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Please keep 3.14 as minimum requirement for building on OPAL-RT targets
cmake_minimum_required(VERSION 3.14...3.23)
project(DPsim
VERSION 1.2.1
VERSION 1.2.1 # x-release-please-version
DESCRIPTION "C++ Power System Simulation Library"
LANGUAGES CXX
HOMEPAGE_URL "https://dpsim.fein-aachen.org/")
Expand Down
71 changes: 71 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add missing SPDX header to release-please config
severity: medium · confidence: 95%

The new release-please configuration file lacks the required SPDX license identifier and copyright header. DPsim requires SPDX headers in all new files to comply with REUSE and licensing policy.

Suggested fix: Add the SPDX header to the release-please-config.json file as shown in other DPsim configuration files. The header should be:
// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
// SPDX-License-Identifier: MPL-2.0

Suggested change
{
// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
// SPDX-License-Identifier: MPL-2.0
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",

Checked against the source: new release-please config starts directly with JSON and contains no SPDX-FileCopyrightText or SPDX-License-Identifier header

stage: tests-docs-coverage

"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"changelog-sections": [
{
"type": "feat",
"section": "Added"
},
{
"type": "fix",
"section": "Fixed"
},
{
"type": "perf",
"section": "Changed"
},
{
"type": "refactor",
"section": "Changed"
},
{
"type": "revert",
"section": "Removed"
},
{
"type": "security",
"section": "Security"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "build",
"section": "Changed",
"hidden": true
},
{
"type": "chore",
"section": "Changed",
"hidden": true
},
{
"type": "ci",
"section": "Changed",
"hidden": true
},
{
"type": "style",
"section": "Changed",
"hidden": true
},
{
"type": "test",
"section": "Changed",
"hidden": true
}
],
"packages": {
".": {
"extra-files": [
"CMakeLists.txt",
{
"type": "toml",
"path": "pyproject.toml",
"jsonpath": "$.project.version"
}
]
}
}
}
Loading