Add C++ & Fortran Backends#87
Merged
Merged
Conversation
…ty with the new Cantera release
ecisneros8
reviewed
Oct 9, 2024
Collaborator
ecisneros8
left a comment
There was a problem hiding this comment.
@henryleberre thanks for working on this. I think this is elegant, and overall fantastic work. I left a few comments that should be easy to address. Let me know if you have any questions.
Collaborator
|
@henryleberre I left some more comments on my original review. I'll also look at the docstrings asap. Thanks again for working on this. Very nice work! |
ecisneros8
reviewed
Oct 16, 2024
Collaborator
ecisneros8
left a comment
There was a problem hiding this comment.
Hi @henryleberre, I went over the docstrings for the backend wrappers. Thanks for adding these. I have just one comment. Great work!
ecisneros8
approved these changes
Oct 16, 2024
Collaborator
ecisneros8
left a comment
There was a problem hiding this comment.
Thanks for working on this @henryleberre !
2 tasks
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.
Purpose
This Pull Request adds C++ and Fortran code generators ("backends") to Pyrometheus.
Testing
In an effort to standardize testing and Pyrometheus' API across languages, bindings from C++ and Fortran to Python are used to keep a single "backend"-agnostic test-suite written in Python (as apposed to writing the tests in all three languages). CMake, f2py, and pybind11 are used to generate the bindings while dynamic module imports and monkeypatching in Python ensures the tests can interact with each implementation seamlessly.
As a result, the C++ and Fortran backends are as well tested as the original Python one is. All three backends are now tested in CI, no matter the branch.
Breaking Changes
The only breaking change I am aware of is the renaming of the
species_nameandspecies_indexmethods to, respectively,get_species_nameandget_species_indexin the Python backend. It keeps the naming scheme consistent.Credit
Esteban (@ecisneros8) and myself (@henryleberre).