From c7c5065bd60c2d466f550da0121c6e56d6dbf385 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Mon, 2 Dec 2024 15:26:55 +0100 Subject: [PATCH 01/33] Increasing working version --- version.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.properties b/version.properties index 142da6e0..e0fffb42 100644 --- a/version.properties +++ b/version.properties @@ -1,8 +1,8 @@ #Generated by the Semver Plugin for Gradle -#Fri Aug 09 15:42:54 CEST 2024 +#Mon Dec 02 15:26:40 CET 2024 version.buildmeta= version.major=0 -version.minor=6 +version.minor=7 version.patch=0 version.prerelease= -version.semver=0.6.0 +version.semver=0.7.0 From c593d2db3c5a675427a1aa11108950fd4d61c02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:48:56 +0000 Subject: [PATCH 02/33] Bump org.apache.logging.log4j:log4j-bom from 2.24.2 to 2.24.3 (#225) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6f315615..cf30907a 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies{ } // logging - implementation platform('org.apache.logging.log4j:log4j-bom:2.24.2') + implementation platform('org.apache.logging.log4j:log4j-bom:2.24.3') implementation 'org.apache.logging.log4j:log4j-api' // log4j implementation 'org.apache.logging.log4j:log4j-core' // log4j implementation 'org.apache.logging.log4j:log4j-slf4j-impl' // log4j -> slf4j From bd829ef888b39ebf58157a175635a4aae406854e Mon Sep 17 00:00:00 2001 From: Philipp Schmelter Date: Tue, 17 Dec 2024 14:11:11 +0100 Subject: [PATCH 03/33] Rev --- .github/dependabot.yml | 3 ++- CHANGELOG.md | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 262a6298..a7045ce9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,6 +9,7 @@ updates: target-branch: dev reviewers: - t-ober - - sensarmad + - jo-bao - danielfeismann - sebastian-peter + - staudtMarius diff --git a/CHANGELOG.md b/CHANGELOG.md index b8984b2b..0f12bc04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +### Added +- Added Bao and Staudt to the list of reviewers [#216](https://github.com/ie3-institute/simonaAPI/issues/216) + ## [0.6.0] - 2024-12-02 ### Added From db635abe490876295cd47dd7fc34eed9348462af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 14:22:10 +0000 Subject: [PATCH 04/33] Bump com.github.spotbugs from 6.0.26 to 6.0.27 (#227) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index cf30907a..d9d3bbef 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '6.25.0'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.0.26' // code check, working on byte code + id 'com.github.spotbugs' version '6.0.27' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From 1b1b530c06393263c8c867cb670bdff98007f7bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:18:02 +0000 Subject: [PATCH 05/33] Bump tech.units:indriya from 2.2.1 to 2.2.2 (#228) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d9d3bbef..f11c0726 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ repositories { dependencies{ - implementation 'tech.units:indriya:2.2.1' // quantities + implementation 'tech.units:indriya:2.2.2' // quantities // scala (needed for pekko) implementation "org.scala-lang:scala-library:${scalaBinaryVersion}" From 4d767ead942244c2b2650df805012ee60acd95d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 09:27:13 +0000 Subject: [PATCH 06/33] Bump com.diffplug.spotless from 6.25.0 to 7.0.0 (#229) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f11c0726..501f5266 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'groovy' // groovy support id 'java' // java support - id 'com.diffplug.spotless' version '6.25.0'//code format + id 'com.diffplug.spotless' version '7.0.0'//code format id 'pmd' // code check, working on source code id 'com.github.spotbugs' version '6.0.27' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube From 4e86e7fcf7fd3ed4593f6c03e8cb5bfdcaaaff6b Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 12:10:49 +0100 Subject: [PATCH 07/33] Adding documentation for this API. --- CHANGELOG.md | 1 + docs/readthedocs/Makefile | 20 +++++ docs/readthedocs/conf.py | 73 +++++++++++++++++++ docs/readthedocs/connections/connections.md | 1 + docs/readthedocs/createextsims.md | 27 +++++++ docs/readthedocs/extlinkinterface.md | 28 +++++++ docs/readthedocs/gettingstarted.md | 52 +++++++++++++ docs/readthedocs/index.md | 39 ++++++++++ docs/readthedocs/make.bat | 35 +++++++++ docs/readthedocs/requirements.txt | 6 ++ .../simulations/externalsimulation.md | 34 +++++++++ .../simulations/extsimadapterdata.md | 10 +++ 12 files changed, 326 insertions(+) create mode 100644 docs/readthedocs/Makefile create mode 100644 docs/readthedocs/conf.py create mode 100644 docs/readthedocs/connections/connections.md create mode 100644 docs/readthedocs/createextsims.md create mode 100644 docs/readthedocs/extlinkinterface.md create mode 100644 docs/readthedocs/gettingstarted.md create mode 100644 docs/readthedocs/index.md create mode 100644 docs/readthedocs/make.bat create mode 100644 docs/readthedocs/requirements.txt create mode 100644 docs/readthedocs/simulations/externalsimulation.md create mode 100644 docs/readthedocs/simulations/extsimadapterdata.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f12bc04..841c859a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added Bao and Staudt to the list of reviewers [#216](https://github.com/ie3-institute/simonaAPI/issues/216) +- Documentation for this API [#230](https://github.com/ie3-institute/simonaAPI/issues/230) ## [0.6.0] - 2024-12-02 diff --git a/docs/readthedocs/Makefile b/docs/readthedocs/Makefile new file mode 100644 index 00000000..bfd7a7e6 --- /dev/null +++ b/docs/readthedocs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= python3 -msphinx +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/readthedocs/conf.py b/docs/readthedocs/conf.py new file mode 100644 index 00000000..f60e1403 --- /dev/null +++ b/docs/readthedocs/conf.py @@ -0,0 +1,73 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'simonaAPI' +copyright = u'2023. TU Dortmund University, Institute of Energy Systems, Energy Efficiency and Energy Economics, Research group Distribution grid planning and operation ' +author = 'Institute of Energy Systems, Energy Efficiency and Energy Economics' + +# The full version, including alpha/beta/rc tags +version = '0.6.0' +release = '0.6.0' + +pygments_style = 'tango' +add_function_parentheses = True +# Will point sphinx to use 'index.rst' as the master document +master_doc = 'index' + +# -- General configuration --------------------------------------------------- +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.intersphinx', + 'myst_parser' +] + +myst_enable_extensions = ["dollarmath", "amsmath"] +myst_heading_anchors = 4 + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'venv'] +exclude_trees = ['.build'] +source_suffix = ['.rst', '.md'] +source_encoding = 'utf-8-sig' + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'sphinx_rtd_theme' +html_short_title = "SIMONA" +htmlhelp_basename = 'SIMONA-doc' +html_use_index = True +html_show_sourcelink = False + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + + +def setup(app): + app.add_css_file("css/theme_override.css") diff --git a/docs/readthedocs/connections/connections.md b/docs/readthedocs/connections/connections.md new file mode 100644 index 00000000..39643269 --- /dev/null +++ b/docs/readthedocs/connections/connections.md @@ -0,0 +1 @@ +# Data connections \ No newline at end of file diff --git a/docs/readthedocs/createextsims.md b/docs/readthedocs/createextsims.md new file mode 100644 index 00000000..f511cc47 --- /dev/null +++ b/docs/readthedocs/createextsims.md @@ -0,0 +1,27 @@ +# How to create external simulations for SIMONA + +This page contains all information on how to create external simulations. + +SIMONA uses the java service loader, to load external simulations. Each external simulations needs to have an +implementation of the [ExtLinkInterface](/extlinkinterface), that is provided to the service loader as a service. + + +## Defining the service + +To define a service for an external simulation you need to create the following path inside your project: +`resources/META-INF/services/edu.ie3.simona.api.ExtLinkInterface`. Inside this file you need to add the implementation +of the `ExtLinkInterface`. + + +## Project with multiple external simulations +Your project could contain multiple external simulations by creating multiple implementations of the `ExtLinkInterface` +and adding them to the service file. When doing this SIMONA will give you a warning. Each asset in SIMONA can only +receive external data from **one** external simulation. If two external simulations are set up to provide data to the +same asset, SIMONA will exit with an exception. Therefore, it is encouraged to create an own project for each external +simulation. + + + + + + diff --git a/docs/readthedocs/extlinkinterface.md b/docs/readthedocs/extlinkinterface.md new file mode 100644 index 00000000..db2ea8c7 --- /dev/null +++ b/docs/readthedocs/extlinkinterface.md @@ -0,0 +1,28 @@ +# External link interface + +The external link interface, or short `ExtLinkInterface`, is used to provide SIMONA with all methods necessary to load +the external simulation. + +There are currently these methods: +1. [setup](#setting-up-the-external-simulation) +2. [getExtSimulation](#getting-the-external-simulation) + +Both method will be called by SIMONA to set up and get the external simulation. + + +## Setting up the external simulation + +This method receives an [external simulation adapter data](/simulations/extsimadapterdata) that contains the following +information: +- CLI arguments SIMONA is initiated with +- Reference to the actor that handles scheduler control flow in SIMONA +- Queue with triggers the external simulation needs to handle + +The method can use these data, if necessary, to set up the external simulation. In all cases, this method needs to +forward the adapter data to the external simulation. + + +## Getting the external simulation + +This method should return the [external simulation](/simulations/externalsimulation). + diff --git a/docs/readthedocs/gettingstarted.md b/docs/readthedocs/gettingstarted.md new file mode 100644 index 00000000..ecf268a1 --- /dev/null +++ b/docs/readthedocs/gettingstarted.md @@ -0,0 +1,52 @@ +# Getting started +Welcome, this section is meant to give you some help getting hands on our project. +If you feel, something is missing, please contact us! + +## Requirements + +Java > v 17 + +## Where to get + +Checkout latest from [GitHub](https://github.com/ie3-institute/simonaAPI) or use maven for dependency +management: + +### Stable releases + +On [Maven central](https://search.maven.org/artifact/com.github.ie3-institute/simonaAPI): + +```xml + + com.github.ie3-institute + simonaAPI + 0.6.0 + +``` + +### Snapshot releases + +Available on [OSS Sonatype](https://s01.oss.sonatype.org/). +Add the correct repository: + +```xml + + https://s01.oss.sonatype.org/content/repositories/snapshots + +``` + +and add the dependency: + +```xml + + com.github.ie3-institute + simonaAPI + 0.7-SNAPSHOT + +``` + +## Important changes + +With the release of version `0.6.0` there were major changes in the way external simulations are +set up. Therefore, older simulations no longer work with the version `0.6.0`. + + diff --git a/docs/readthedocs/index.md b/docs/readthedocs/index.md new file mode 100644 index 00000000..e6a59247 --- /dev/null +++ b/docs/readthedocs/index.md @@ -0,0 +1,39 @@ +# Documentation of the SIMONA API + +Welcome to the documentation of the SIMONA API. +This API is used to create extensions for [SIMONA](https://github.com/ie3-institute/simona). +One example are external simulations, that can be used in co-simulations with SIMONA. + + +```{toctree} +:caption: 'Contents:' +:maxdepth: 2 + +gettingstarted +createextsims +extlinkinterface + +simulations/externalsimulation + +simulations/extsimadapterdata + +connections/connections +``` + +## Contact the (Main) Maintainers + +If you feel, something this missing, wrong or misleading, please contact one of our main contributors: + +> - [@t-ober](https://github.com/t-ober) +> - [@danielfeismann](https://github.com/danielfeismann) +> - [@sebastian-peter](https://github.com/sebastian-peter) +> - [@jo-bao](https://github.com/jo-bao) +> - [@staudtMarius](https://github.com/staudtMarius) + +Hat tip to all other contributors! + +# Indices and tables + +- {ref}`genindex` +- {ref}`modindex` +- {ref}`search` diff --git a/docs/readthedocs/make.bat b/docs/readthedocs/make.bat new file mode 100644 index 00000000..922152e9 --- /dev/null +++ b/docs/readthedocs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt new file mode 100644 index 00000000..a22c632a --- /dev/null +++ b/docs/readthedocs/requirements.txt @@ -0,0 +1,6 @@ +commonmark==0.9.1 +recommonmark==0.7.1 +Sphinx==8.1.3 +sphinx-rtd-theme==3.0.2 +myst-parser==4.0.0 +markdown-it-py==3.0.0 diff --git a/docs/readthedocs/simulations/externalsimulation.md b/docs/readthedocs/simulations/externalsimulation.md new file mode 100644 index 00000000..d47f1054 --- /dev/null +++ b/docs/readthedocs/simulations/externalsimulation.md @@ -0,0 +1,34 @@ +# External simulation + +An external simulation needs to extend the class `edu.ie3.simona.api.simulation.ExtSimulation`. This class extends the +java `Runnable` interface, because each external simulation is running in its own thread. The class contains the code to +run the external simulation and to exchange messages with SIMONA. + +It will provide the following three abstract methods, that needs to be implemented by the subclass: +1. [initialize](#initializing-the-external-simulation) +2. [doActivity](#performing-an-activity) +3. [getDataConnections](#returning-the-data-connections) + +There is also a `terminate` method that receives information is the simulation was successfully finished. This method +can be used e.g. to release resources, that are used by your external simulation. + + +## Initializing the external simulation + +This method is called to initialize the external simulation. In this step, every data or connection, that is needed, is +loaded and/or set up. + +After everything is initialized, this method should return the first tick, for which this external simulation should be +triggered by SIMONA. + + +## Performing an activity + +The method `doActivity(long tick)` is called for every tick this external simulation should perform an activity. This +method should provide a new tick as long as there are future activities. + + +## Returning the data connections + +The method `getDataConnections` returns all [data connections](/connections/connections) that are used to connect the +external simulation to SIMONA. diff --git a/docs/readthedocs/simulations/extsimadapterdata.md b/docs/readthedocs/simulations/extsimadapterdata.md new file mode 100644 index 00000000..d4810b14 --- /dev/null +++ b/docs/readthedocs/simulations/extsimadapterdata.md @@ -0,0 +1,10 @@ +# External simulation adapter data + +The adapter data contains the following: +1. Reference to the actor that handles the scheduler control flow in SIMONA +2. The CLI arguments SIMONA is started with +3. A blocking queue with triggers, that the external simulation needs to handle + +This class also contains two method to exchange messages with SIMONA. +1. queueExtMsg: This method is called by SIMONA to provide the external simulation with a control message +2. send: This method is used to send a response message to SIMONA as an answer to a control message From a92b6f82cca2f95cd03387c36e1914c58a6ae154 Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 12:14:03 +0100 Subject: [PATCH 08/33] fmt --- docs/readthedocs/connections/connections.md | 2 +- docs/readthedocs/createextsims.md | 6 ------ docs/readthedocs/extlinkinterface.md | 1 - docs/readthedocs/gettingstarted.md | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/readthedocs/connections/connections.md b/docs/readthedocs/connections/connections.md index 39643269..a48fb91a 100644 --- a/docs/readthedocs/connections/connections.md +++ b/docs/readthedocs/connections/connections.md @@ -1 +1 @@ -# Data connections \ No newline at end of file +# Data connections diff --git a/docs/readthedocs/createextsims.md b/docs/readthedocs/createextsims.md index f511cc47..8ac99738 100644 --- a/docs/readthedocs/createextsims.md +++ b/docs/readthedocs/createextsims.md @@ -19,9 +19,3 @@ and adding them to the service file. When doing this SIMONA will give you a warn receive external data from **one** external simulation. If two external simulations are set up to provide data to the same asset, SIMONA will exit with an exception. Therefore, it is encouraged to create an own project for each external simulation. - - - - - - diff --git a/docs/readthedocs/extlinkinterface.md b/docs/readthedocs/extlinkinterface.md index db2ea8c7..08e99e67 100644 --- a/docs/readthedocs/extlinkinterface.md +++ b/docs/readthedocs/extlinkinterface.md @@ -25,4 +25,3 @@ forward the adapter data to the external simulation. ## Getting the external simulation This method should return the [external simulation](/simulations/externalsimulation). - diff --git a/docs/readthedocs/gettingstarted.md b/docs/readthedocs/gettingstarted.md index ecf268a1..43709208 100644 --- a/docs/readthedocs/gettingstarted.md +++ b/docs/readthedocs/gettingstarted.md @@ -48,5 +48,3 @@ and add the dependency: With the release of version `0.6.0` there were major changes in the way external simulations are set up. Therefore, older simulations no longer work with the version `0.6.0`. - - From 4a40ff802cb9a355525c72d5862f80c48337fb4e Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 12:19:14 +0100 Subject: [PATCH 09/33] fmt --- gradle/scripts/documentation.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gradle/scripts/documentation.gradle b/gradle/scripts/documentation.gradle index 137a552d..961a6e8c 100644 --- a/gradle/scripts/documentation.gradle +++ b/gradle/scripts/documentation.gradle @@ -3,6 +3,17 @@ * - sphinx -> Generate HTML output of *.rst files in /docs/readthedocs */ +/** + * Configuring the sphinx plugin + */ +sphinx { + description 'Generate high level HTML documentation output.' + group 'Documentation' + + sourceDirectory = "${project.projectDir}/docs/readthedocs" + outputDirectory = "${project.rootDir}/build/docs/readthedocs" +} + /** * Task to generate the JavaDoc incl. build failure on warning (build always fails on JavaDoc error by default) */ From a30eacec959861cb8a794c14d00a7bcc350045a5 Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 12:21:28 +0100 Subject: [PATCH 10/33] fmt --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 501f5266..5605ee7d 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,7 @@ plugins { id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) id 'jacoco' // java code coverage plugin id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning + id 'kr.motd.sphinx' version '2.10.1' // documentation generation } ext { From aea262e3213fa99a043743427df1620bdda98046 Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 12:29:19 +0100 Subject: [PATCH 11/33] Add `.readthedocs.yaml` file. --- .readthedocs.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..e169b21e --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Configure python +python: + install: + - requirements: docs/readthedocs/requirements.txt + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/readthedocs/conf.py + fail_on_warning: true From d9dc417b41fbf4c537fe699642d3944059748c5a Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 13:43:30 +0100 Subject: [PATCH 12/33] Implementing reviewer's comments. --- .github/dependabot.yml | 8 +++++ .readthedocs.yaml | 4 +-- docs/readthedocs/Makefile | 20 ----------- .../_static/css/theme_override.css | 17 +++++++++ docs/readthedocs/conf.py | 4 +-- docs/readthedocs/make.bat | 35 ------------------- 6 files changed, 29 insertions(+), 59 deletions(-) delete mode 100644 docs/readthedocs/Makefile create mode 100644 docs/readthedocs/_static/css/theme_override.css delete mode 100644 docs/readthedocs/make.bat diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a7045ce9..8535344a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,3 +13,11 @@ updates: - danielfeismann - sebastian-peter - staudtMarius + +- package-ecosystem: pip + directory: "/docs/readthedocs" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 8 + target-branch: dev diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e169b21e..fc3aa5c6 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,9 +7,9 @@ version: 2 # Set the version of Python and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.11" + python: "3.13" # Configure python python: diff --git a/docs/readthedocs/Makefile b/docs/readthedocs/Makefile deleted file mode 100644 index bfd7a7e6..00000000 --- a/docs/readthedocs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= python3 -msphinx -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/readthedocs/_static/css/theme_override.css b/docs/readthedocs/_static/css/theme_override.css new file mode 100644 index 00000000..47be427c --- /dev/null +++ b/docs/readthedocs/_static/css/theme_override.css @@ -0,0 +1,17 @@ +/* Suppress spacing after multi-line entries in tables + * Inspired by this issue: https://github.com/readthedocs/sphinx_rtd_theme/issues/117 */ +.wy-table-responsive table td div.line-block { + margin-bottom: 0; + font-size: 90%; +} +.wy-table-responsive table th div.line-block { + margin-bottom: 0; + font-size: 90%; +} +.wy-table-responsive table th p { + margin-bottom: 0; +} + +table.wrapping td { + white-space: normal; +} diff --git a/docs/readthedocs/conf.py b/docs/readthedocs/conf.py index f60e1403..fa091f3c 100644 --- a/docs/readthedocs/conf.py +++ b/docs/readthedocs/conf.py @@ -58,8 +58,8 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'sphinx_rtd_theme' -html_short_title = "SIMONA" -htmlhelp_basename = 'SIMONA-doc' +html_short_title = "simonaAPI" +htmlhelp_basename = 'simonaAPI-doc' html_use_index = True html_show_sourcelink = False diff --git a/docs/readthedocs/make.bat b/docs/readthedocs/make.bat deleted file mode 100644 index 922152e9..00000000 --- a/docs/readthedocs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd From 2a6fce08e4727a67baa35bad96f84d41f8679f33 Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 7 Jan 2025 14:16:35 +0100 Subject: [PATCH 13/33] Improving some spelling. --- docs/readthedocs/extlinkinterface.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/readthedocs/extlinkinterface.md b/docs/readthedocs/extlinkinterface.md index 08e99e67..030c09f6 100644 --- a/docs/readthedocs/extlinkinterface.md +++ b/docs/readthedocs/extlinkinterface.md @@ -3,11 +3,11 @@ The external link interface, or short `ExtLinkInterface`, is used to provide SIMONA with all methods necessary to load the external simulation. -There are currently these methods: +Currently, these methods exist: 1. [setup](#setting-up-the-external-simulation) 2. [getExtSimulation](#getting-the-external-simulation) -Both method will be called by SIMONA to set up and get the external simulation. +Both method will be called by SIMONA to initialize and retrieve the external simulation. ## Setting up the external simulation From d4ce3fa830c9564602ff4b9ef1830f229a6dc92c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 06:31:39 +0000 Subject: [PATCH 14/33] Bump com.diffplug.spotless from 7.0.0 to 7.0.1 (#235) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5605ee7d..d15da5b8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'groovy' // groovy support id 'java' // java support - id 'com.diffplug.spotless' version '7.0.0'//code format + id 'com.diffplug.spotless' version '7.0.1'//code format id 'pmd' // code check, working on source code id 'com.github.spotbugs' version '6.0.27' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube From ea0aa8e8fe4d5e7d789a9ac90bccbbd4d233ab7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 08:19:57 +0000 Subject: [PATCH 15/33] Bump com.github.spotbugs from 6.0.27 to 6.0.28 (#240) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d15da5b8..d2bc07b1 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.1'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.0.27' // code check, working on byte code + id 'com.github.spotbugs' version '6.0.28' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From 8b63b4f438da1ea16da49554ab9be519df7688eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 08:24:05 +0000 Subject: [PATCH 16/33] Bump pekkoVersion from 1.1.2 to 1.1.3 (#239) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d2bc07b1..170f6386 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ ext { // required for pekko scalaVersion = "2.13" scalaBinaryVersion = "2.13.15" - pekkoVersion = "1.1.2" + pekkoVersion = "1.1.3" } group = 'com.github.ie3-institute' From 5f95da4380775fd5c82bc56fb7500896f2aa961a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:40:07 +0000 Subject: [PATCH 17/33] Bump com.github.spotbugs from 6.0.28 to 6.1.0 (#242) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 170f6386..31bc460f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.1'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.0.28' // code check, working on byte code + id 'com.github.spotbugs' version '6.1.0' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From 32697f7f62dde004f6e9826f39e6a91141eb34a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 08:52:45 +0000 Subject: [PATCH 18/33] Bump com.diffplug.spotless from 7.0.1 to 7.0.2 (#243) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 31bc460f..22aced73 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'groovy' // groovy support id 'java' // java support - id 'com.diffplug.spotless' version '7.0.1'//code format + id 'com.diffplug.spotless' version '7.0.2'//code format id 'pmd' // code check, working on source code id 'com.github.spotbugs' version '6.1.0' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube From fb222379b501d42ea3a970b5b219d02ff78c704f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:38:55 +0000 Subject: [PATCH 19/33] Bump org.scala-lang:scala-library from 2.13.15 to 2.13.16 (#241) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 22aced73..d566eccf 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ ext { // required for pekko scalaVersion = "2.13" - scalaBinaryVersion = "2.13.15" + scalaBinaryVersion = "2.13.16" pekkoVersion = "1.1.3" } From 167700e6981ec77bdae53ceb77ee647141139b6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:57:55 +0000 Subject: [PATCH 20/33] Bump com.github.spotbugs from 6.1.0 to 6.1.3 (#245) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d566eccf..aa5fecf2 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.2'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.1.0' // code check, working on byte code + id 'com.github.spotbugs' version '6.1.3' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From b21e13e2a004293eba52d1c1595e8a3c9fc1ecda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 08:34:25 +0000 Subject: [PATCH 21/33] Bump com.github.spotbugs from 6.1.3 to 6.1.4 (#246) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index aa5fecf2..1fa5b4a9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.2'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.1.3' // code check, working on byte code + id 'com.github.spotbugs' version '6.1.4' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From bc4f7b85563bc3e30a74c1956414dc8583e7773d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:46:36 +0000 Subject: [PATCH 22/33] Bump com.github.spotbugs from 6.1.4 to 6.1.5 (#250) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1fa5b4a9..9998f852 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.2'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.1.4' // code check, working on byte code + id 'com.github.spotbugs' version '6.1.5' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From 95305f09d4b9b102cfd6490ee1e8229fcb416604 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:35:26 +0000 Subject: [PATCH 23/33] Bump sphinx from 8.1.3 to 8.2.0 in /docs/readthedocs (#253) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index a22c632a..d4e83029 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,6 +1,6 @@ commonmark==0.9.1 recommonmark==0.7.1 -Sphinx==8.1.3 +Sphinx==8.2.0 sphinx-rtd-theme==3.0.2 myst-parser==4.0.0 markdown-it-py==3.0.0 From 682789c9fd32ea7a05d306f42263031136194c34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:31:49 +0000 Subject: [PATCH 24/33] Bump myst-parser from 4.0.0 to 4.0.1 in /docs/readthedocs (#249) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index d4e83029..257fa67e 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -2,5 +2,5 @@ commonmark==0.9.1 recommonmark==0.7.1 Sphinx==8.2.0 sphinx-rtd-theme==3.0.2 -myst-parser==4.0.0 +myst-parser==4.0.1 markdown-it-py==3.0.0 From 9f76f74505fd2960ba4c30a1e4d6a7a8823f46cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:56:37 +0000 Subject: [PATCH 25/33] Bump sphinx from 8.2.0 to 8.2.1 in /docs/readthedocs (#254) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index 257fa67e..dabb2b30 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,6 +1,6 @@ commonmark==0.9.1 recommonmark==0.7.1 -Sphinx==8.2.0 +Sphinx==8.2.1 sphinx-rtd-theme==3.0.2 myst-parser==4.0.1 markdown-it-py==3.0.0 From 8b7620613a14358ffa7a2b0b877a133e7c11226b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:30:20 +0000 Subject: [PATCH 26/33] Bump com.github.spotbugs from 6.1.5 to 6.1.6 (#255) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9998f852..9456e6fd 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.2'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.1.5' // code check, working on byte code + id 'com.github.spotbugs' version '6.1.6' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From bf77b86eb2f0b377c4ed7ccec4ffff1f97ff6271 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 04:35:29 +0000 Subject: [PATCH 27/33] Bump com.github.ie3-institute:PowerSystemDataModel from 5.1.0 to 6.0.0 Bumps [com.github.ie3-institute:PowerSystemDataModel](https://github.com/ie3-institute/PowerSystemDatamodel) from 5.1.0 to 6.0.0. - [Release notes](https://github.com/ie3-institute/PowerSystemDatamodel/releases) - [Changelog](https://github.com/ie3-institute/PowerSystemDataModel/blob/dev/CHANGELOG.md) - [Commits](https://github.com/ie3-institute/PowerSystemDatamodel/compare/5.1.0...6.0.0) --- updated-dependencies: - dependency-name: com.github.ie3-institute:PowerSystemDataModel dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9456e6fd..b167ed69 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ dependencies{ } //PSDM - implementation('com.github.ie3-institute:PowerSystemDataModel:5.1.0') { + implementation('com.github.ie3-institute:PowerSystemDataModel:6.0.0') { exclude group: 'org.apache.logging.log4j' exclude group: 'org.slf4j' /* Exclude our own nested dependencies */ From 823f24bbdbf1392cda450bb8987aae2c8f4f7f47 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Mon, 3 Mar 2025 16:57:47 +0100 Subject: [PATCH 28/33] Adaptations in spotless.gradle --- gradle/scripts/spotless.gradle | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gradle/scripts/spotless.gradle b/gradle/scripts/spotless.gradle index 7021b9f2..b72b5d27 100644 --- a/gradle/scripts/spotless.gradle +++ b/gradle/scripts/spotless.gradle @@ -20,17 +20,15 @@ spotless { licenseHeader "#!groovy\n\n" + ie3LicHead, "////////////////////////////////" // the Groovy Eclipse formatter extends the Java Eclipse formatter, // so it formats Java files by default (unless `excludeJava` is used). - // FIXME rolled back greclipse version https://github.com/diffplug/spotless/issues/1860 - greclipse('4.27') - indentWithSpaces 2 + greclipse() + leadingTabsToSpaces 2 } groovyGradle { // same as groovy, but for .gradle (defaults to '*.gradle') target '*.gradle', 'gradle/scripts/*.gradle' - // FIXME rolled back greclipse version https://github.com/diffplug/spotless/issues/1860 - greclipse('4.27') - indentWithSpaces 2 + greclipse() + leadingTabsToSpaces 2 } //sets a license header, removes unused imports and formats conforming to the scala fmt formatter @@ -43,7 +41,7 @@ spotless { format 'misc', { target '**/.gitignore', 'configs/**' trimTrailingWhitespace() - indentWithTabs() + leadingSpacesToTabs() endWithNewline() } @@ -51,7 +49,7 @@ spotless { * enumerations) */ format 'md', { target '**/*.md' - indentWithSpaces 2 + leadingTabsToSpaces 2 endWithNewline() } } From 51763c95cfa59206cef5ebf14d01f6bb9aee61b0 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Mon, 3 Mar 2025 16:57:55 +0100 Subject: [PATCH 29/33] Adapting to changes --- .../simona/api/data/results/ExtResultContainer.java | 10 +++++----- .../api/data/results/ExtResultDataConnection.java | 10 +++++----- .../data/results/ontology/ProvideResultEntities.java | 6 +++--- .../edu/ie3/simona/api/simulation/ExtCoSimulation.java | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/edu/ie3/simona/api/data/results/ExtResultContainer.java b/src/main/java/edu/ie3/simona/api/data/results/ExtResultContainer.java index 531faf7c..30ad84d1 100644 --- a/src/main/java/edu/ie3/simona/api/data/results/ExtResultContainer.java +++ b/src/main/java/edu/ie3/simona/api/data/results/ExtResultContainer.java @@ -8,8 +8,8 @@ import static edu.ie3.util.quantities.PowerSystemUnits.PU; -import edu.ie3.datamodel.models.result.ModelResultEntity; import edu.ie3.datamodel.models.result.NodeResult; +import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.models.result.connector.LineResult; import edu.ie3.datamodel.models.result.system.SystemParticipantResult; import edu.ie3.simona.api.data.ExtDataContainer; @@ -32,7 +32,7 @@ public class ExtResultContainer implements ExtDataContainer { * Map external id to result from SIMONA ATTENTION: The time stamp of the result entities is not * necessarily corresponding to the tick */ - private final Map simonaResultsMap; + private final Map simonaResultsMap; /** * Container class for result data from SIMONA @@ -42,17 +42,17 @@ public class ExtResultContainer implements ExtDataContainer { * @param nextTick tick the external simulation can expect the next results */ public ExtResultContainer( - long tick, Map simonaResultsMap, Optional nextTick) { + long tick, Map simonaResultsMap, Optional nextTick) { this.tick = tick; this.simonaResultsMap = simonaResultsMap; this.maybeNextTick = nextTick; } - public ExtResultContainer(long tick, Map simonaResultsMap) { + public ExtResultContainer(long tick, Map simonaResultsMap) { this(tick, simonaResultsMap, Optional.empty()); } - public Map getResults() { + public Map getResults() { return simonaResultsMap; } diff --git a/src/main/java/edu/ie3/simona/api/data/results/ExtResultDataConnection.java b/src/main/java/edu/ie3/simona/api/data/results/ExtResultDataConnection.java index de90fa41..a5414e26 100644 --- a/src/main/java/edu/ie3/simona/api/data/results/ExtResultDataConnection.java +++ b/src/main/java/edu/ie3/simona/api/data/results/ExtResultDataConnection.java @@ -6,8 +6,8 @@ package edu.ie3.simona.api.data.results; -import edu.ie3.datamodel.models.result.ModelResultEntity; import edu.ie3.datamodel.models.result.NodeResult; +import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.models.result.system.SystemParticipantResult; import edu.ie3.simona.api.data.ExtOutputDataConnection; import edu.ie3.simona.api.data.ontology.ScheduleDataServiceMessage; @@ -74,7 +74,7 @@ public List getParticipantResultDataAssets() { } /** Method that an external simulation can request results from SIMONA as a list. */ - private List requestResultList(long tick) throws InterruptedException { + private List requestResultList(long tick) throws InterruptedException { sendExtMsg(new RequestResultEntities(tick)); return receiveWithType(ProvideResultEntities.class).results(); } @@ -82,12 +82,12 @@ private List requestResultList(long tick) throws InterruptedE /** * Method that an external simulation can request results from SIMONA as a map string to object. */ - public Map requestResults(long tick) throws InterruptedException { + public Map requestResults(long tick) throws InterruptedException { return createResultMap(requestResultList(tick)); } - protected Map createResultMap(List results) { - Map resultMap = new HashMap<>(); + protected Map createResultMap(List results) { + Map resultMap = new HashMap<>(); results.forEach( result -> { if (result instanceof NodeResult nodeResult) { diff --git a/src/main/java/edu/ie3/simona/api/data/results/ontology/ProvideResultEntities.java b/src/main/java/edu/ie3/simona/api/data/results/ontology/ProvideResultEntities.java index 525d702c..0c0d003f 100644 --- a/src/main/java/edu/ie3/simona/api/data/results/ontology/ProvideResultEntities.java +++ b/src/main/java/edu/ie3/simona/api/data/results/ontology/ProvideResultEntities.java @@ -6,15 +6,15 @@ package edu.ie3.simona.api.data.results.ontology; -import edu.ie3.datamodel.models.result.ModelResultEntity; +import edu.ie3.datamodel.models.result.ResultEntity; import java.util.List; import java.util.Map; import java.util.UUID; /** Provides a list of results from SIMONA to an external simulation. */ -public record ProvideResultEntities(List results) +public record ProvideResultEntities(List results) implements ResultDataResponseMessageToExt { - public ProvideResultEntities(Map resultMap) { + public ProvideResultEntities(Map resultMap) { this(resultMap.values().stream().toList()); } } diff --git a/src/main/java/edu/ie3/simona/api/simulation/ExtCoSimulation.java b/src/main/java/edu/ie3/simona/api/simulation/ExtCoSimulation.java index f07ec9bd..76923312 100644 --- a/src/main/java/edu/ie3/simona/api/simulation/ExtCoSimulation.java +++ b/src/main/java/edu/ie3/simona/api/simulation/ExtCoSimulation.java @@ -6,7 +6,7 @@ package edu.ie3.simona.api.simulation; -import edu.ie3.datamodel.models.result.ModelResultEntity; +import edu.ie3.datamodel.models.result.ResultEntity; import edu.ie3.datamodel.models.value.Value; import edu.ie3.simona.api.data.DataQueueExtSimulationExtSimulator; import edu.ie3.simona.api.data.ExtInputDataContainer; @@ -169,7 +169,7 @@ protected void sendDataToExt( ExtResultDataConnection connection, long tick, Optional maybeNextTick, Logger log) throws InterruptedException { log.debug("Request results from SIMONA!"); - Map resultsToBeSend = connection.requestResults(tick); + Map resultsToBeSend = connection.requestResults(tick); log.debug("Received results from SIMONA!"); dataQueueSimonaApiToExtCoSimulator.queueData( new ExtResultContainer(tick, resultsToBeSend, maybeNextTick)); From 3c54b159357a989095c77ad505dc100658a1eee2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:39:00 +0000 Subject: [PATCH 30/33] Bump sphinx from 8.2.1 to 8.2.3 in /docs/readthedocs (#257) --- docs/readthedocs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/readthedocs/requirements.txt b/docs/readthedocs/requirements.txt index dabb2b30..875163e2 100644 --- a/docs/readthedocs/requirements.txt +++ b/docs/readthedocs/requirements.txt @@ -1,6 +1,6 @@ commonmark==0.9.1 recommonmark==0.7.1 -Sphinx==8.2.1 +Sphinx==8.2.3 sphinx-rtd-theme==3.0.2 myst-parser==4.0.1 markdown-it-py==3.0.0 From e7e2221d72da106b0984b0243dc7617da7e704f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:51:08 +0000 Subject: [PATCH 31/33] Bump com.github.spotbugs from 6.1.6 to 6.1.7 (#258) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b167ed69..e2707c9f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' // java support id 'com.diffplug.spotless' version '7.0.2'//code format id 'pmd' // code check, working on source code - id 'com.github.spotbugs' version '6.1.6' // code check, working on byte code + id 'com.github.spotbugs' version '6.1.7' // code check, working on byte code id "org.sonarqube" version "6.0.1.5171" // sonarqube id 'signing' id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined) From 7ccf34a5dc02e9104567ef7e5f2f3fe3f1925051 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Tue, 11 Mar 2025 16:46:39 +0100 Subject: [PATCH 32/33] Adapting changelog to changes --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 841c859a..ee954f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased/Snapshot] +## [0.7.0] - 2025-03-11 + ### Added - Added Bao and Staudt to the list of reviewers [#216](https://github.com/ie3-institute/simonaAPI/issues/216) - Documentation for this API [#230](https://github.com/ie3-institute/simonaAPI/issues/230) +#### Changed +- Updated PSDM to 6.0.0 + ## [0.6.0] - 2024-12-02 ### Added @@ -51,7 +56,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Renamed messages to ease understanding [#62](https://github.com/ie3-institute/simonaAPI/issues/62) - Separating departures and arrivals in message protocol, properly handling exceptions [#77](https://github.com/ie3-institute/simonaAPI/issues/77) -[Unreleased/Snapshot]: https://github.com/ie3-institute/simonaapi/compare/0.6.0...HEAD +[Unreleased/Snapshot]: https://github.com/ie3-institute/simonaapi/compare/0.7.0...HEAD +[0.7.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/0.6.0...0.7.0 [0.6.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/0.5.0...0.6.0 [0.5.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/0.4.0...0.5.0 [0.4.0]: https://github.com/ie3-institute/powersystemdatamodel/compare/0.3.0...0.4.0 From e11673d734a1658fb30ef3b03868bd2f809374f9 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Tue, 11 Mar 2025 16:47:29 +0100 Subject: [PATCH 33/33] Updating gradle to 8.13 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e2847c82..37f853b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME