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> | condarel takes --user flag to checkout from psdm users repo. |
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 ... edit package module code cd <pkg-name> 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 | Create local release directory (once) if it does not exist move in release directory set and activate conda environment add package(s) if necessary work on code when ready to commit update package from repo, if someone else may work on it print info about package status see difference in modules stage modified modules under git control commit changes to git commit changes to github master repo print available tags create new tag commit new tag to github repo |
Special cases | ||
develop pdsdata/psalg | condarel --addpkg --name pdsdata condarel --addpkg --name pdsdata_ext | See also Building the psalg and pdsdata packages With conda, pdsdata and psalg are part of the psana-conda package. They get put in a subdirectory called extpkgs. You need the proxy packages to build/develop. |
develop ndarray | condarel --addpkg --name ndarray --tag HEAD update version in ndarray recipe meta.yaml: | ndarray live in it's own conda package. After tagging your changes to ndarray, a new ndarray conda |