From ec0c36069be58383981fb164cf57435a777ec687 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Fri, 22 Nov 2024 10:01:01 +0100 Subject: [PATCH 1/4] Fix implausible test cases of HpModelSpec --- CHANGELOG.md | 1 + .../model/participant/HpModelSpec.scala | 56 +++++++++---------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c42a0b055..1bd8545b67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Refactoring to use zeroKW and zeroKWH in thermal grid unit tests [#1023](https://github.com/ie3-institute/simona/issues/1023) - Refactor `ResultFileHierarchy` [#1031](https://github.com/ie3-institute/simona/issues/1031) - Removing logs in `logs/simona` [#1017](https://github.com/ie3-institute/simona/issues/1017) +- Fix implausible test cases of HpModelSpec [#1042](https://github.com/ie3-institute/simona/issues/1042) ### Fixed - Fix rendering of references in documentation [#505](https://github.com/ie3-institute/simona/issues/505) diff --git a/src/test/scala/edu/ie3/simona/model/participant/HpModelSpec.scala b/src/test/scala/edu/ie3/simona/model/participant/HpModelSpec.scala index 81c62e549d..0479798610 100644 --- a/src/test/scala/edu/ie3/simona/model/participant/HpModelSpec.scala +++ b/src/test/scala/edu/ie3/simona/model/participant/HpModelSpec.scala @@ -55,7 +55,7 @@ class HpModelSpec true, 95, 15.6, - Some(HouseTemperatureUpperBoundaryReached(31711L)), + Some(HouseTemperatureUpperBoundaryReached(31711)), ), ( HpState( @@ -70,7 +70,7 @@ class HpModelSpec true, 95, 16.4, - Some(HouseTemperatureUpperBoundaryReached(30642L)), + Some(HouseTemperatureUpperBoundaryReached(30642)), ), ( HpState( @@ -85,7 +85,7 @@ class HpModelSpec true, 95, 18.0, - Some(HouseTemperatureUpperBoundaryReached(27771L)), + Some(HouseTemperatureUpperBoundaryReached(27771)), ), ( HpState( @@ -100,7 +100,7 @@ class HpModelSpec false, 0, 19.6, - Some(HouseTemperatureLowerBoundaryReached(13200L)), + Some(HouseTemperatureLowerBoundaryReached(13200)), ), ( HpState( @@ -115,7 +115,7 @@ class HpModelSpec false, 0, 20.4, - Some(HouseTemperatureLowerBoundaryReached(15508L)), + Some(HouseTemperatureLowerBoundaryReached(15508)), ), ( HpState( @@ -124,13 +124,13 @@ class HpModelSpec Some(hpData.ambientTemperature), Kilowatts(95d), Kilowatts(80d), - thermalState(Celsius(17)), + thermalState(Celsius(17), Kilowatts(80d)), None, ), - true, - 95, - 15.6, - Some(HouseTemperatureUpperBoundaryReached(31711L)), + false, + 0, + 31.6, + Some(HouseTemperatureLowerBoundaryReached(29867)), ), ( HpState( @@ -139,13 +139,13 @@ class HpModelSpec Some(hpData.ambientTemperature), Kilowatts(95d), Kilowatts(80d), - thermalState(Celsius(18)), + thermalState(Celsius(18), Kilowatts(80d)), None, ), - true, - 95, - 16.4, - Some(HouseTemperatureUpperBoundaryReached(30642L)), + false, + 0, + 32.4, + Some(HouseTemperatureLowerBoundaryReached(30343)), ), ( HpState( @@ -154,13 +154,13 @@ class HpModelSpec Some(hpData.ambientTemperature), Kilowatts(95d), Kilowatts(80d), - thermalState(Celsius(20)), + thermalState(Celsius(20), Kilowatts(80d)), None, ), - true, - 95, - 18.0, - Some(HouseTemperatureUpperBoundaryReached(27771L)), + false, + 0, + 34.0, + Some(HouseTemperatureLowerBoundaryReached(31200)), ), ( HpState( @@ -169,13 +169,13 @@ class HpModelSpec Some(hpData.ambientTemperature), Kilowatts(95d), Kilowatts(80d), - thermalState(Celsius(22)), + thermalState(Celsius(22), Kilowatts(80d)), None, ), - true, - 95, - 19.6, - Some(HouseTemperatureUpperBoundaryReached(23200L)), + false, + 0, + 35.6, + Some(HouseTemperatureLowerBoundaryReached(31950)), ), ( HpState( @@ -184,13 +184,13 @@ class HpModelSpec Some(hpData.ambientTemperature), Kilowatts(95d), Kilowatts(80d), - thermalState(Celsius(25)), + thermalState(Celsius(25), Kilowatts(80d)), None, ), false, 0, - 22.0, - Some(HouseTemperatureLowerBoundaryReached(19200L)), + 38.0, + Some(HouseTemperatureLowerBoundaryReached(32914)), ), ) From b4044496f61b1b6086d6e4c9f0d4c7e5a5dda69c Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Fri, 22 Nov 2024 12:13:14 +0100 Subject: [PATCH 2/4] Unlimited fetch depth Signed-off-by: Sebastian Peter --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 182819f0a1..e09485924c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Checkout Source uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 0 ref: ${{ github.event.pull_request.head.ref || github.ref }} repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} From a728fa211a8f80d0edf52a3cc7012438693e73b3 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Fri, 22 Nov 2024 12:13:37 +0100 Subject: [PATCH 3/4] Test: removing ref and repository Signed-off-by: Sebastian Peter --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e09485924c..6d58167b6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref || github.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} - name: Setup Java uses: actions/setup-java@v4 From 823d5e0b0d65b28355e821a8f640f5dfdb338669 Mon Sep 17 00:00:00 2001 From: Sebastian Peter Date: Fri, 22 Nov 2024 12:30:56 +0100 Subject: [PATCH 4/4] Adding to changelog Signed-off-by: Sebastian Peter --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c42a0b055..c5c51c6c00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -140,6 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix grammar and spelling in docs and comments [#1022](https://github.com/ie3-institute/simona/issues/1022) - Fix some minor issues and findings from inspections [#1019](https://github.com/ie3-institute/simona/issues/1019) - Fix initialisation freezing on empty primary data [#981](https://github.com/ie3-institute/simona/issues/981) +- Shallow fetch in CI [#1041](https://github.com/ie3-institute/simona/issues/1041) ## [3.0.0] - 2023-08-07