Skip to content

Conversation

mdpiper
Copy link
Member

@mdpiper mdpiper commented Dec 15, 2020

This PR updates the BMI for the heat model to more closely match the signatures of the BMI functions from the bmi-python repo. In particular, the

  • get_grid_shape,
  • get_grid_spacing,
  • get_grid_origin,
  • get_value, and
  • get_value_at_indices

functions all take an output array parameter.

As a convenience, a shape property was added to the Heat class. This makes the get_grid_rank and get_grid_size functions easier to implement.

The unit tests were updated to match the updated BMI.

This makes it easier to implement the BMI.
This better matches the BMI form in bmipy.
This is a convenience.
Also cast the return from *get_grid_size* to `int` to pass the bmi-tester.
This better matches the form from bmipy.
It's found by conda but not by pip.
@mdpiper mdpiper requested a review from mcflugen December 15, 2020 16:20
Copy link
Member

@mcflugen mcflugen left a comment

Choose a reason for hiding this comment

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

Looks great!

The only addition I would suggest is to run bmi-test as part of the testing on Travis.

And added bmi-tester as a testing requirement.
I chose to keep everything in conda to try to avoid mixing package sources.
@mdpiper mdpiper merged commit 9c7c03f into master Dec 16, 2020
@mdpiper mdpiper deleted the mdpiper/match-bmipy branch December 16, 2020 01:22
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