-
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
Fix missing dependencies in notebooks #43
Merged
speth
merged 4 commits into
Cantera:main
from
Naikless:fix-missing-dependencies-in-notebooks
Dec 4, 2023
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
name: cantera-latest | ||
name: cantera-latest-release | ||
channels: | ||
- cantera | ||
- cantera/label/dev | ||
- conda-forge | ||
dependencies: | ||
- cantera | ||
- matplotlib | ||
- pandas | ||
- scipy | ||
- seaborn | ||
- coolprop | ||
- scikits.odes | ||
- python-graphviz |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the intention of this change. However, adding
conda-forge
will (I believe) result in some packages like NumPy and SciPy coming from that channel rather than thedefaults
. In that case, there will be an incompatibility in the compiled clib code between Cantera/Python/NumPy. There is a Cantera package onconda-forge
, but we don't publish pre-releases there so I don't think that'll work for this purpose. I'm honestly not sure how to continue from here 😦There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of the Jupyter examples require the development version of Cantera at this point, so we could just install everything from
conda-forge
, dropping thecantera
andcantera/label/dev
channels entirely.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems reasonable to me, since the Jupyter examples probably should only contain stuff that is available in the stable release without requiring the user to install the dev version if they want to reproduce the example on their own machine. I'll change
environment.yaml
accordingly.As a side note/question: how serious are these incompatibilities in practice? Because I would assume mixing channels by installing cantera from the cantera channel and everything else from conda-forge is a relatively common thing to do for people that don't pay much attention to this issue (which, until today, included myself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the worst case, I believe they can lead to segmentation faults in the memory which cause an immediate crash of Python. More likely would be that some symbols are named differently or are placed in a different location in the binary, which would also cause errors. Here are some docs from conda-forge about it: https://conda-forge.org/docs/user/tipsandtricks.html#using-multiple-channels