Skip to content

Refactor examples #110

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 9 commits into from
May 23, 2025
Merged

Refactor examples #110

merged 9 commits into from
May 23, 2025

Conversation

pelesh
Copy link
Collaborator

@pelesh pelesh commented May 21, 2025

Description

Several minor issues related to examples are addressed here:

  • Some examples return redundant output, which may obscure important error messages.
  • Distributed generator and microgrid examples did not test for result accuracy.
  • Helper functions specific to Matpower parser testing were included in general GridKit testing utilities.
  • Some examples built with compiler warnings.

@alexander-novo @abdourahmanbarry

Proposed changes

Comment out redundant output, add accuracy checks where missing and fix compiler warnings for all examples.

Move helper functions for Matpower parser tests to examples/PowerFlow/MatPowerTesting/MatPowerTesting.hpp.

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • N/A There are unit tests for the new code.
  • N/A The new code is documented.
  • The feature branch is rebased with respect to the target branch.

Further comments

None.

@pelesh pelesh requested review from reid-g and nkoukpaizan May 21, 2025 23:37
@pelesh pelesh self-assigned this May 21, 2025
@pelesh pelesh added the testing label May 21, 2025
Copy link
Collaborator

@nkoukpaizan nkoukpaizan left a comment

Choose a reason for hiding this comment

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

Tests currently pass. I left a few suggestions and would like to test again after they are addressed.

Copy link
Collaborator

@nkoukpaizan nkoukpaizan left a comment

Choose a reason for hiding this comment

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

Approving, as we've discussed that command line arguments for verbosity (#112) and the isEqual template design are out of scope for this PR.

@pelesh pelesh merged commit b38b38a into develop May 23, 2025
3 checks passed
@pelesh pelesh deleted the slaven/refactor_examples_dev branch June 10, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants