Last term I started taking a look at the bmi-tester, which is really neat. I really like the idea of being able to go further than the syntactic interface of a BMI model and probe its semantics; essentially bmi-tester implements a behaviour specification for BMI-implementing models.
Given that BMI models are potentially stateful, via input and output variables, I thought that it would make sense to extend the behaviour specification with testing of the ‘get’/‘set’ behaviour. i.e., that if you ‘set’ then you can ‘get’ the same value back, and if you ‘set’ a value twice you get the same behaviour as just setting it once, i.e., there is not ‘extra side effects’ going on with setting a variable. I codified this idea in a PR here: Extending testing of set_value and get_value by dorchard · Pull Request #46 · csdms/bmi-tester · GitHub I would be interested to hear if people agree that this should hold for all models.
This could be extended to work over get-value-at-indices
and set-value-at-indices
too if the overall idea makes sense.
I also made some other PRs around the way time works. Following a discussion on the GitHub, pre this forum, I made a couple of PRs:
- Allow non-zero start by dorchard · Pull Request #45 · csdms/bmi-tester · GitHub simply removes the condition that the start needs to be 0.0
- Allow inverse (negative timestep) or instantaneous (0 timestep) models by dorchard · Pull Request #49 · csdms/bmi-tester · GitHub accounts for the possibility of negative timesteps and also 0.0 timesteps (what I’ve called here ‘instantaneous’ models, in which case I think it makes sense for the start and end times to be the same).
There are a few other potential properties I can think of as well. Is there appetite for extending the bmi-tester in general?