Task | Command | Notes |
---|---|---|
Initialization of conda environment | source /reg/g/psdm/bin/conda_setup | Bash only for conda, no .csh |
Local release operations | ||
Create local release directory | condarel --newrel --name <my-rel-directory> | |
Activate local release | cd <my-rel-directory> source conda_setup | |
Activate release in another directory | source conda_setup --reldir </path/to/another/release> | |
Exit conda environment | undo_conda | |
Upgrade release | source activate ana-1.3.31 condarel --chenv source conda_setup scons -c scons | Being in local release directory |
Build code in release directory | scons | Being in local release directory |
Package operations | ||
Checkout package from master repository | condarel --addpkg --name <pkg-name> --tag HEAD | |
Checkout existing package from psdm users repo | condarel --addpkg --user --name <pkg-name> | |
Create new package | condarel --newpkg --name <new-pkg-name> | Creates the directory MyPkg with a minimal structure, include/src/app/data, and SConscript |
Add pkg to psana build control | update the file psana-conda-svn-pkgs in the directory /reg/g/psdm/sw/conda/manage/config that is part of the github repo anarel-manage | |
Information commands | ||
List available releases | conda env list | |
Identify ana-current | more /reg/g/psdm/sw/conda/current/ana/ana-current | |
Identify dm-current | more /reg/g/psdm/sw/conda/current/dm/dm-current | |
Look at source code | ls /reg/g/psdm/sw/conda/scratch/<release>/<pkg> ls $CONDA_PREFIX/lib/python2.7/site-packages/<pkg> | Package source code is available through the scratch directory. In the conda environment only python code is available. |
Example of regular development loop | ||
Check in, work on package, update, stage, commit, check out, create new tag, etc. | condarel --newrel --name <my-rel-directory> cd <my-rel-directory> source conda_setup condarel --addpkg --name <pkg-name> --tag HEAD cd <pkg-name> ... edit package module code git pull git status git diff [module-name] git add -A git commit -m "comment" -a git push origin master git tag git tag -a V01-00-26 -m "comment" git push origin V01-00-26 |