How to install QMCTools python files
Describe the bug QMCTools python files need proper installation. How to organize them?
Our current instructions are to export PYTHONPATH=/PATH_TO_QMCPACK/qmcpack/src/QMCTools:\$PYTHONPATH. However this does not work for an installation which needs to work with the source directory completely deleted. $INSTALL_DIR/QMCTools? $INSTALL_DIR/lib? The former seems clearer.
nexus carries a similar problem.
There are only 3 python files that sit inside QMCTools. In order to minimize the number of installs (PYTHONPATH updates), why not just place these 3 files inside nexus/lib or a subdirectory therein?
Perhaps this next one is a bit wilder, but maybe Nexus should finally branch out into its own repo? Nexus already exists independently of the all but one of the codes it drives, why not QMCPACK as well? This would lead to easy install instructions, e.g.,
# download Nexus
wget https://github.com/QMCPACK/nexus/archive/refs/tags/nexus-develop.tar.gz
# untar
tar -zxvf nexus-develop.tar.gz
# Define PYTHONPATH
export PYTHONPATH = \${PWD}/nexus-develop:\$PYTHONPATH
# remove tar file
rm nexus-develop.tar.gz
These few bash commands could be provided in QMCPACK as an install script.
The reason we are not putting QMCTools inside Nexus is for the answer you implicitly gave - we are trying to keep Nexus and QMCPACK independent so that if it it decided to put Nexus in its own repo in future we could do so.
I think that getting a better grip of our python dependencies and giving appropriate installation advice for them will yield more immediate benefits than e.g. two repos.
Then maybe a bash script could be written that asks the user where QMCTools rests, and also suggests a best guess.
#!/bin/bash
deftoolsloc=${PWD}/src/QMCTools
echo Installing QMCTools ...
# Ask the user for the path
echo Where is QMCTools located on this machine? [$deftoolsloc]
read vartoolsloc
if [ -z "$vartoolsloc" ]; then
vartoolsloc=$deftoolsloc
fi
# Then something like
echo export PYTHONPATH = $vartoolsloc:$PYTHONPATH >> ${HOME}/.bash_profile
The above is not meant to be final form, but gets the idea across