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

Check installed version of preCICE when import precice (python bindings) #165

Open
BenjaminRodenberg opened this issue Feb 16, 2023 · 2 comments
Labels
enhancement New feature or request usability

Comments

@BenjaminRodenberg
Copy link
Member

I think it would be helpful to raise a warning, if the version of the python bindings does not match the installed preCICE version. Example: User updates preCICE from version 2.3 to version 2.5 but forgets to run pip3 install --upgrade pyprecice. This works, but might lead to strange errors, because the API is not up-to-date.

We could to the following:

>> import precice
<stdin>:1: UserWarning: You are using pyprecice 2.3.0.0, but it looks like you are using preCICE version 2.5.0. Please upgrade your python bindings by running pip3 install --upgrade pyprecice.
@IshaanDesai
Copy link
Member

Good idea! Although I think we should do such checks carefully. In principle pyprecice v2.3.0.0 should work with preCICE v2.5.0 as it is only a difference of minor versions. The API should not break between v2.3.0.0 and v2.5.0 right?

@BenjaminRodenberg
Copy link
Member Author

You can use python bindings v2.3.0.0 with preCICE v2.5.0, but you will miss some features that might exist in preCICE v2.5.0 if there was no corresponding API already in python bindings v2.3.0.0. For example, the waveform API was only introduced in v2.5.0.2 (see #167). This leads to confusing errors, if a user has upgraded to preCICE v2.5.0 and wants to use a feature from that version but there is no support in the python bindings. Therefore, a warning, not an error 😏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability
Projects
None yet
Development

No branches or pull requests

2 participants