Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate Tests for the Datastructure PowerGrid #53

Conversation

franziska-wegner
Copy link
Owner

@franziska-wegner franziska-wegner commented Dec 26, 2023

This PR enables the tests for the power grid data structure. Due to the fact that the coverage tests fail with PyPSAExample, we excluded these tests for now. Note that the tests itself do not fail, only the accumulation process of the gcov execution. Further investigation is required and we merge the working tests in for now to have a solid base as the error is not obvious to the author at the moment. It might be due to the file destination that differs from the Matlab examples.

Screenshot 2024-01-02 at 2 10 04 AM Screenshot 2024-01-02 at 2 10 09 AM

@franziska-wegner franziska-wegner self-assigned this Dec 26, 2023
@franziska-wegner franziska-wegner added the tests Add or update tests to EGOA label Dec 26, 2023
franziska-wegner and others added 26 commits December 26, 2023 15:04
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…isting VertexId with Exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…d with Exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…with Exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…with Exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…ing `VertexId` with exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…ator` with exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…xception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…eption

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…rtex` with exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…rtex` with exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…ception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
@franziska-wegner franziska-wegner force-pushed the franziska-wegner/2023/december/tests/datastructures/PowerGrid-activate branch from f46f46a to 3f04229 Compare December 30, 2023 20:22
franziska-wegner and others added 12 commits December 30, 2023 12:37
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
…orId` & `Timestamp` with exception

Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
Changes to be committed:
	modified:   tests/DataStructures/Graphs/TestPowerGrid.cpp
What?
* warning: escaped string literal can be written as a raw string literal [modernize-raw-string-literal]
@franziska-wegner franziska-wegner force-pushed the franziska-wegner/2023/december/tests/datastructures/PowerGrid-activate branch from ea7def8 to a425337 Compare January 2, 2024 10:16
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3322f93) 93.26% compared to head (346a27a) 94.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   93.26%   94.53%   +1.26%     
==========================================
  Files          29       42      +13     
  Lines        2823     4556    +1733     
==========================================
+ Hits         2633     4307    +1674     
- Misses        190      249      +59     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@franziska-wegner franziska-wegner force-pushed the franziska-wegner/2023/december/tests/datastructures/PowerGrid-activate branch from d4573dc to 346a27a Compare January 2, 2024 12:06
@franziska-wegner franziska-wegner enabled auto-merge (squash) January 2, 2024 12:15
@franziska-wegner franziska-wegner merged commit 8d8b6c9 into main Jan 2, 2024
17 checks passed
@franziska-wegner franziska-wegner deleted the franziska-wegner/2023/december/tests/datastructures/PowerGrid-activate branch January 2, 2024 12:23
github-actions bot added a commit that referenced this pull request Jan 2, 2024
* Activate Test for the Datastructure PowerGrid
* DeathTest Condition for AddGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt with Exception
* DeathTest Condition for HasGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt using generator Id & non-existing VertexId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & GeneratorId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest condition for `RemoveGeneratorAt` using generator non-existing `VertexId` with exception
* DeathTest condition for `RemoveGeneratorAt` using `VertexId` & `Generator` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `Vertex` object with exception
* DeathTest condition for `GeneratorId`s with exception
* DeathTest condition for `GeneratorAt` with exception
* DeathTest condition for `GeneratorsAt` using `VertexId` with exception
* DeathTest condition for `GeneratorsAt` using `Vertex` object with exception
* DeathTest condition for `TotalRealPowerGenerationBoundAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationBoundAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `Vertex` object with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` & `LoadId` with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` where `LoadId` does not exists with exception
* DeathTest condition for `HasLoadAt` with exception
* DeathTest condition for `LoadIds` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` using `VertexId` with exception
* DeathTest condition for `LoadAt` using `Vertex` with exception
* DeathTest condition for `RealPowerLoadAt` with exception
* DeathTest condition for `RealPowerLoadAt` using `Vertex` with exception
* DeathTest condition for `TotalRealPowerLoadBoundAt` with exception
* DeathTest condition for `AddGeneratorRealPowerSnapshotAt` with exception
* DeathTest condition for `AddLoadSnapshotAt` with exception
* DeathTest condition for `AddSnapshotTimestamp` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `LoadSnapshotOfLoadsSize` with exception
* DeathTest condition for `LoadSnapshotOfConstNoneDeath` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* Add missing namespace
* Repair path to test cases
* Update to Psa to PSA
* DeathTest condition for `AddSnapshotWeighting` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotAt` using `GeneratorId` & `Timestamp` with exception
* Remove assertion from exception handling part/release mode path
* Comment out some tests that need further investigation
* DeathTest condition for `TimestampAt` with exception
* Comment out some tests that need further investigation
* Add missing header for "Helper/TestHelper.hpp"
* Remove clang linter warning
  What?
    * warning: escaped string literal can be written as a raw string literal [modernize-raw-string-literal]
* Comment out TestPowerGridPyPsaExample test
  Why?
    * Cause coverage process to fail due to unknown problem
* Remove and add some `ctest` flags 8d8b6c9
github-actions bot added a commit that referenced this pull request Jan 2, 2024
* Activate Test for the Datastructure PowerGrid
* DeathTest Condition for AddGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt with Exception
* DeathTest Condition for HasGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt using generator Id & non-existing VertexId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & GeneratorId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest condition for `RemoveGeneratorAt` using generator non-existing `VertexId` with exception
* DeathTest condition for `RemoveGeneratorAt` using `VertexId` & `Generator` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `Vertex` object with exception
* DeathTest condition for `GeneratorId`s with exception
* DeathTest condition for `GeneratorAt` with exception
* DeathTest condition for `GeneratorsAt` using `VertexId` with exception
* DeathTest condition for `GeneratorsAt` using `Vertex` object with exception
* DeathTest condition for `TotalRealPowerGenerationBoundAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationBoundAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `Vertex` object with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` & `LoadId` with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` where `LoadId` does not exists with exception
* DeathTest condition for `HasLoadAt` with exception
* DeathTest condition for `LoadIds` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` using `VertexId` with exception
* DeathTest condition for `LoadAt` using `Vertex` with exception
* DeathTest condition for `RealPowerLoadAt` with exception
* DeathTest condition for `RealPowerLoadAt` using `Vertex` with exception
* DeathTest condition for `TotalRealPowerLoadBoundAt` with exception
* DeathTest condition for `AddGeneratorRealPowerSnapshotAt` with exception
* DeathTest condition for `AddLoadSnapshotAt` with exception
* DeathTest condition for `AddSnapshotTimestamp` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `LoadSnapshotOfLoadsSize` with exception
* DeathTest condition for `LoadSnapshotOfConstNoneDeath` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* Add missing namespace
* Repair path to test cases
* Update to Psa to PSA
* DeathTest condition for `AddSnapshotWeighting` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotAt` using `GeneratorId` & `Timestamp` with exception
* Remove assertion from exception handling part/release mode path
* Comment out some tests that need further investigation
* DeathTest condition for `TimestampAt` with exception
* Comment out some tests that need further investigation
* Add missing header for "Helper/TestHelper.hpp"
* Remove clang linter warning
  What?
    * warning: escaped string literal can be written as a raw string literal [modernize-raw-string-literal]
* Comment out TestPowerGridPyPsaExample test
  Why?
    * Cause coverage process to fail due to unknown problem
* Remove and add some `ctest` flags 8d8b6c9
github-actions bot added a commit that referenced this pull request Jan 2, 2024
* Activate Test for the Datastructure PowerGrid
* DeathTest Condition for AddGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt with Exception
* DeathTest Condition for HasGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt using generator Id & non-existing VertexId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & GeneratorId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest condition for `RemoveGeneratorAt` using generator non-existing `VertexId` with exception
* DeathTest condition for `RemoveGeneratorAt` using `VertexId` & `Generator` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `Vertex` object with exception
* DeathTest condition for `GeneratorId`s with exception
* DeathTest condition for `GeneratorAt` with exception
* DeathTest condition for `GeneratorsAt` using `VertexId` with exception
* DeathTest condition for `GeneratorsAt` using `Vertex` object with exception
* DeathTest condition for `TotalRealPowerGenerationBoundAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationBoundAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `Vertex` object with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` & `LoadId` with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` where `LoadId` does not exists with exception
* DeathTest condition for `HasLoadAt` with exception
* DeathTest condition for `LoadIds` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` using `VertexId` with exception
* DeathTest condition for `LoadAt` using `Vertex` with exception
* DeathTest condition for `RealPowerLoadAt` with exception
* DeathTest condition for `RealPowerLoadAt` using `Vertex` with exception
* DeathTest condition for `TotalRealPowerLoadBoundAt` with exception
* DeathTest condition for `AddGeneratorRealPowerSnapshotAt` with exception
* DeathTest condition for `AddLoadSnapshotAt` with exception
* DeathTest condition for `AddSnapshotTimestamp` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `LoadSnapshotOfLoadsSize` with exception
* DeathTest condition for `LoadSnapshotOfConstNoneDeath` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* Add missing namespace
* Repair path to test cases
* Update to Psa to PSA
* DeathTest condition for `AddSnapshotWeighting` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotAt` using `GeneratorId` & `Timestamp` with exception
* Remove assertion from exception handling part/release mode path
* Comment out some tests that need further investigation
* DeathTest condition for `TimestampAt` with exception
* Comment out some tests that need further investigation
* Add missing header for "Helper/TestHelper.hpp"
* Remove clang linter warning
  What?
    * warning: escaped string literal can be written as a raw string literal [modernize-raw-string-literal]
* Comment out TestPowerGridPyPsaExample test
  Why?
    * Cause coverage process to fail due to unknown problem
* Remove and add some `ctest` flags 8d8b6c9
github-actions bot added a commit that referenced this pull request Jan 2, 2024
* Activate Test for the Datastructure PowerGrid
* DeathTest Condition for AddGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt with Exception
* DeathTest Condition for HasGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt using generator Id & non-existing VertexId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & GeneratorId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest condition for `RemoveGeneratorAt` using generator non-existing `VertexId` with exception
* DeathTest condition for `RemoveGeneratorAt` using `VertexId` & `Generator` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `Vertex` object with exception
* DeathTest condition for `GeneratorId`s with exception
* DeathTest condition for `GeneratorAt` with exception
* DeathTest condition for `GeneratorsAt` using `VertexId` with exception
* DeathTest condition for `GeneratorsAt` using `Vertex` object with exception
* DeathTest condition for `TotalRealPowerGenerationBoundAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationBoundAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `Vertex` object with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` & `LoadId` with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` where `LoadId` does not exists with exception
* DeathTest condition for `HasLoadAt` with exception
* DeathTest condition for `LoadIds` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` using `VertexId` with exception
* DeathTest condition for `LoadAt` using `Vertex` with exception
* DeathTest condition for `RealPowerLoadAt` with exception
* DeathTest condition for `RealPowerLoadAt` using `Vertex` with exception
* DeathTest condition for `TotalRealPowerLoadBoundAt` with exception
* DeathTest condition for `AddGeneratorRealPowerSnapshotAt` with exception
* DeathTest condition for `AddLoadSnapshotAt` with exception
* DeathTest condition for `AddSnapshotTimestamp` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `LoadSnapshotOfLoadsSize` with exception
* DeathTest condition for `LoadSnapshotOfConstNoneDeath` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* Add missing namespace
* Repair path to test cases
* Update to Psa to PSA
* DeathTest condition for `AddSnapshotWeighting` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotAt` using `GeneratorId` & `Timestamp` with exception
* Remove assertion from exception handling part/release mode path
* Comment out some tests that need further investigation
* DeathTest condition for `TimestampAt` with exception
* Comment out some tests that need further investigation
* Add missing header for "Helper/TestHelper.hpp"
* Remove clang linter warning
  What?
    * warning: escaped string literal can be written as a raw string literal [modernize-raw-string-literal]
* Comment out TestPowerGridPyPsaExample test
  Why?
    * Cause coverage process to fail due to unknown problem
* Remove and add some `ctest` flags 8d8b6c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Add or update tests to EGOA
Projects
Development

Successfully merging this pull request may close these issues.

Investigate into PyPSAExample Coverage Problem in the TestPowerGrid Code
1 participant