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

Move get_var_value_as_double up hierarchy, as it was inadvertently duplicated as a non-override #677

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

PhilMiller
Copy link
Contributor

@PhilMiller PhilMiller commented Nov 13, 2023

This method exists in both Bmi_Module_Formulation (from which it's overridden by the language-specific implementations) and Bmi_Multi_Formulation, with the exact same interface and apparent intended use.

Changes

  • Declare get_var_value_as_double at the common base class, not separately in different child classes

Testing

  • Ordinary CI

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

@PhilMiller PhilMiller requested a review from program-- November 13, 2023 21:31
program--
program-- previously approved these changes Nov 13, 2023
Copy link
Contributor

@program-- program-- left a comment

Choose a reason for hiding this comment

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

I don't think we hit this case, but we don't have any diamond inheritance schemes, correct? (i.e. needing virtual inheritance on either Bmi_Formulation or Bmi_Module_Formulation) -- Particularly w.r.t. the BMI base class. (This is probably out of scope for this PR, but still partly relevant, so I figured I'd ask in case we noticed this) -- Other than that, this looks good to me.

@PhilMiller
Copy link
Contributor Author

There is some multiple inheritance in the current code (which I'm not thrilled about), but I don't think any of it hits diamond inheritance; it's all just interface mix-in sorts of things.

Thanks for the quick review

@PhilMiller PhilMiller merged commit 1dcd255 into NOAA-OWP:master Nov 13, 2023
@PhilMiller PhilMiller deleted the unify-get-var-value branch November 13, 2023 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants