Skip to content

Keep only important integration tests: step 2 #841

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

Merged
merged 11 commits into from
Nov 27, 2024

Conversation

mgovers
Copy link
Member

@mgovers mgovers commented Nov 25, 2024

Relates to #833
Relates to #486

  • move all tests in test_main_model_sc.cpp to validation cases
  • remove already duplicate tests in test_main_model.cpp

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers mgovers added the improvement Improvement on internal implementation label Nov 25, 2024
@mgovers mgovers self-assigned this Nov 25, 2024
mgovers and others added 3 commits November 25, 2024 08:46
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Base automatically changed from feature/only-important-integration-tests to main November 25, 2024 11:01
@mgovers mgovers marked this pull request as ready for review November 25, 2024 11:02
…t-integration-tests-2

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@Jerry-Jinfeng-Guo Jerry-Jinfeng-Guo changed the title Keep only important integration tests - step 2 Keep only important integration tests: step 2 Nov 25, 2024
@TonyXiang8787
Copy link
Member

@mgovers one suggestion. Sensor output in power flow calculations is undefined. We should not test them. So remove the tests in the current test_main_model.cpp, and do not re-test them.

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers
Copy link
Member Author

mgovers commented Nov 26, 2024

@mgovers one suggestion. Sensor output in power flow calculations is undefined. We should not test them. So remove the tests in the current test_main_model.cpp, and do not re-test them.

while i'm OK with not testing, it does feel a little bit weird to call it UB, though, because we do by default output it if there are sensors in the grid

@TonyXiang8787
Copy link
Member

@mgovers one suggestion. Sensor output in power flow calculations is undefined. We should not test them. So remove the tests in the current test_main_model.cpp, and do not re-test them.

while i'm OK with not testing, it does feel a little bit weird to call it UB, though, because we do by default output it if there are sensors in the grid

UB means the C-API users are not supposed to provide a sensor output buffer in the dataset if you are running power flow. If you do, there is no guarantee what data will be written (or not at all) in the sensor output buffer. It just happens to have some non-sense output now in the sensor buffer. It can change to anything in the future.

NOTE: Python API never creates the sensor output buffer anyway. This is for C-API user.

@mgovers
Copy link
Member Author

mgovers commented Nov 26, 2024

@mgovers one suggestion. Sensor output in power flow calculations is undefined. We should not test them. So remove the tests in the current test_main_model.cpp, and do not re-test them.

while i'm OK with not testing, it does feel a little bit weird to call it UB, though, because we do by default output it if there are sensors in the grid

UB means the C-API users are not supposed to provide a sensor output buffer in the dataset if you are running power flow. If you do, there is no guarantee what data will be written (or not at all) in the sensor output buffer. It just happens to have some non-sense output now in the sensor buffer. It can change to anything in the future.

NOTE: Python API never creates the sensor output buffer anyway. This is for C-API user.

ohhhh right, i completely forgot about the existence of https://github.com/PowerGridModel/power-grid-model/blob/main/src/power_grid_model/_core/power_grid_model.py#L171-L195

Agreed with the conclusion, although this still does feel weird
image

In addition, shouldn't we add it explicitly to the sensor output documentation?
image

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Copy link

@TonyXiang8787 TonyXiang8787 added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit e599096 Nov 27, 2024
27 checks passed
@TonyXiang8787 TonyXiang8787 deleted the feature/only-important-integration-tests-2 branch November 27, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement on internal implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants