Conversation
- BMI only supports flux output for now
- config variables are the same as for CustomOutput:
- To:SOIL[0]: flux
- From:SOIL[0]: flux
- Between:SOIL[0].And.SOIL[1]: flux
- check if state var named in config.txt is present in model - check if model was previously initialized when executing 'CRavenBMI::Finalize'
- previously the output array was indexed by the values in the index array e.g requesting indices [0, 5, 10] would try to write to out[0], out[5] and out[10] - now the output array is indexed by the the position of the index in the index array
The python bindings are a thin wrapper around the c++ BMI code and do not implement the BMI python standard, but the resulting python module can be wrapped in pure python to more easily implement the BMI python variant. List of changes / additions: - move c++ and python code related to python module into './python' directory - 'Binder' was used to generate the Pybind11 bindings for BMI c++ code (https://github.com/RosettaCommons/binder), auto generated bindings have been cleaned up manualy and no dependency on Binder has been added - use 'scikit-build-core' to build python module / wheel - add static library build of raven to staticly link the raven code with the python module - some small 'CMakeLists.txt' clean ups
GetValue and SetValue use void pointer arguments for the destination and source arrays respectively. Wrap these functions to use vectors for the python bindings.
GetValueAtIndices and SetValueAtIndices use void pointer arguments for the destination and source arrays respectively. Wrap these functions to use vectors for the python bindings.
- replace vectors with Numpy arrays - revert getter functions signatures back to C++ BMI style with provided output array; the BMI python bindings also do this
for more information, see https://pre-commit.ci
This was referenced Sep 18, 2026
analytophile
requested changes
Sep 23, 2026
analytophile
left a comment
Collaborator
There was a problem hiding this comment.
Suggest that the python wrapper is maintained as an independent repo
The rest of the changes were integrated from a parallel commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This pull request supersedes pull request #111. It includes the same changes on top which the functionality of this pull request is implemented. Only one of the two should be accepted. Please see issue #110 for a discussion of both pull requests.
This pull request adds Python bindings for Raven's Basic Model Interface to the project.
For a detailed description, discussion and examples please see issue #110.