You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling cantera from source, the python samples are not part of the sample folder; instead, they are part of the python package, which is oftentimes deep inside a folder structures. Merging Python samples with other samples will make access much more intuitive.
Motivation
This is the output of a current scons install on Win10 using Anaconda:
[...]
Cantera has been successfully installed.
File locations:
applications C:/Users/<user>/cantera\bin
library files C:/Users/<user>/cantera\lib
C++ headers C:/Users/<user>/cantera\include
samples C:/Users/<user>/cantera\samples
data files C:/Users/<user>/cantera\data
Python package (cantera) C:\Users\<user>\anaconda3\envs\cantera-dev\Lib\site-packages
Python samples C:\Users\<user>\anaconda3\envs\cantera-dev\Lib\site-packages\cantera\examples
Matlab toolbox C:/Users/<user>/cantera\matlab\toolbox
Matlab samples C:/Users/<user>/cantera\samples\matlab
An m-file to set the correct matlab path for Cantera is at:
C:/Users/<user>/cantera\matlab\toolbox\ctpath.m
scons: done building targets.
While the location of samples based on the prefix (C:/Users/<user>/cantera) is intuitive, getting to the Python example folder is unnecessarily involved.
What problem is it trying to solve? ... see above
Who is affected by the change? ... everyone compiling Cantera from source (20% of users per recent survey)
Why is this a good solution? ... all examples would be handled in a consistent fashion
Possible Solutions
The simplest solution would merge all examples into a single location as defined by scons's PREFIX using a slightly modified scons installer.
An alternative - potentially more robust - approach would be to make environment-specific examples stand-alone GitHub repositories. This would have the advantage of also addressing other installation options, especially those where installation paths use system-defined defaults. For those, it may make sense to not package examples, and have users download them from GitHub instead (i.e. similar to what is already done for Cantera/cantera-jupyter). When compiling from source, examples could still be automatically included as git subpackages. … see discussion in #129
Caveats
One sticking point of this discussion would be how to handle conda installations, where other examples are not included. Installation of examples with the toolbox is certainly the easiest approach, but the issue of cumbersome access remains. The alternative route of making examples a stand-alone repo would resolve this.
While I just closed #129, I realized that one way that may cover concerns there is to leave examples in the main repo, but clone the examples folder to a dedicated repo after each merge. There are GH actions for this, e.g. this one
Abstract
When compiling cantera from source, the python samples are not part of the sample folder; instead, they are part of the python package, which is oftentimes deep inside a folder structures. Merging Python samples with other samples will make access much more intuitive.
Motivation
This is the output of a current
scons install
on Win10 using Anaconda:While the location of samples based on the prefix (
C:/Users/<user>/cantera
) is intuitive, getting to the Pythonexample
folder is unnecessarily involved.Possible Solutions
The simplest solution would merge all examples into a single location as defined by scons's
PREFIX
using a slightly modified scons installer.An alternative - potentially more robust - approach would be to make environment-specific examples stand-alone GitHub repositories. This would have the advantage of also addressing other installation options, especially those where installation paths use system-defined defaults. For those, it may make sense to not package examples, and have users download them from GitHub instead (i.e. similar to what is already done for Cantera/cantera-jupyter). When compiling from source, examples could still be automatically included as git subpackages.… see discussion in #129Caveats
One sticking point of this discussion would be how to handle
conda
installations, where other examples are not included. Installation of examples with the toolbox is certainly the easiest approach, but the issue of cumbersome access remains.The alternative route of making examples a stand-alone repo would resolve this.See also
#27
The text was updated successfully, but these errors were encountered: