develop¶
Installation for development¶
Creating environment¶
conda create -n cohere3.7.6 python=3.7.6
conda activate cohere
Pre-requisites¶
- Python packages installation:
conda install Cython
pip install tifffile
pip install pylibconfig2
pip install GPUtil
pip install pyparsing
pip install mayavi
pip install xrayutilities
pip install psutil
conda install pyqt
pip install sklearn
Initialization¶
git clone https://github.com/advancedPhotonSource/cohere
cd cohere
cp dev/linux/* . // for linux
cp dev/mac/* . //for mac
source init.sh
sets the compilation library and include directory to the entered directories
compiles
installs in conda environment
sets the LD_LIBRARY_PATH/DYLD_LIBRARY_PATH in this session
sets the LD_LIBRARY_PATH/DYLD_LIBRARY_PATH in the setenv.sh script
python setup.py install
compile and install¶
python setup.py install
Activating environment¶
source setenv.sh
Adding new trigger¶
In cohere/include/common.h file insert a new definition for the flow_item to the flow_def array in the correct order.
Update the flow_seq_len defined in cohere/include/common.h (i.e. increase by 1).
Add code to parse feature’s parameters in cohere/include/parameters.hpp and cohere/src_cpp/parameters.cpp.
Add the new function to the cohere/include/worker.hpp and cohere/src_cpp/worker.cpp
add the pair (func_name, fp) to the flow_ptr_map in worker.cpp.
Adding new algorithm¶
Conda Build¶
In the cohere directory create “lib” and “include” directories. Copy content of <arrayfire installation directory>/lib64 to lib directory. Copy content of <arrayfire installation directory>/include to include directory.
Copy development scripts/files
cp dev/linux/* . // for linux
cp dev/mac/* . //for mac
change version in meta.yaml and setup.py files to the new version
run conda build:
conda build -c conda-forge -c bfrosik -c defaults .
upload build to anaconda cloud