-
Notifications
You must be signed in to change notification settings - Fork 60
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
updating python package to thermal nonEquilibrium #179
Comments
Ehi @ggange, can you attach the script? Such that I can use it to verify the implementation and maybe add a test. |
Hi @rubendibattista, I think the point here is to get familiar with changing the package locally and update it. I am also interested in adding more tests, and it would be nice if @ggange does this update so he can get familiar with the package if he needs to add something more in the future. |
Hi @rubendibattista! indeed, as mentioned by @BBArrosDias, the main concern with it was the update of the python package :) the issue was badly written, my fault! Anyway I am adding the small script I used (which is actually a modified version of the example Air_11_Equilibrium.py ):
|
Ehi @BBArrosDias, I don't understand your question very well, but I'll try to interpolate :). The package on PyPI is updated automatically via Github actions (here). Basically the package is rebuilt and uploaded automatically when the code is tagged. So there's no need to update the local package, it will be done automatically by the CI system. So the only thing needed here is to merge your code update, and then tag a new version. Github will take care of the rest. Also, the package is now still in TestPyPI. Let's test a couple of automatic updates and then we can push it in the mainline PyPI repo. Does this answer your questions? |
If your question arises from the fact that you want to develop locally, i.e. you want to modify the C++ code and get the package updated locally to be used in your Python local code, you can try to use editable mode from pip. When you edit your C++ files you' ll probably need to run |
Ok, you anticipated my question. So we develop locally and then push it to git, and the PyPI package will update automatically. |
Yes. Just to be clear: you don't need to upload to PyPi the new package to have it available locally. Building the package correctly in editable mode will give you straight access to the new version. Then, once you push it upstream, we will let all the other users have access to your improvements. |
Hello guys,
I am trying to exploit the functionality of the MutationPP python package (got from pip).
I wrote a small script to define a mixture using "ChemNonEqTTv" but, as soon as I tried to setState, I get this error
mix.setState(rho, T, 1)
TypeError: setState(): incompatible function arguments. The following argument types are supported:
1. (self: mutationpp._mutationpp.Mixture, arg0: float, arg1: float, arg2: int) -> None
2. (self: mutationpp._mutationpp.Mixture, arg0: List[float], arg1: float, arg2: int) -> None
Both rho and T are set as lists but the same happens with numpy objects...
After peaking with @BBArrosDias, we think the problem (which I suppose is related to the input arg1 which only allows int) can be solved by modifying pyMixture.cpp adding:
What do you think? How can I then transfer the changes to the actual python package?
Thank you!
The text was updated successfully, but these errors were encountered: