Environment Setup of the Tree

This page describes the creation of the SDSS config environment files necessary for most SDSS software and filesystem navigation on the Science Archive Server (SAS). Running this script will permanently setup the SDSS tree system in your local shell environment.

Note

If you are only interested in using the Tree Python package and having dynamic environments, you do not need to perform this step, and can safely ignore this page.

Checkout the tree product

First checkout the product from github. Navigate to the bin directory

git clone https://github.com/sdss/tree tree
cd bin/

The main script to create environment files is setup_tree.py. To create corresponding module, bash, and tcsh configuration files, run

python setup_tree.py

This will take all config files located in tree/data and create environment files inside tree/etc, which can then be sourced into your corresponding shell environment. The script uses the environment variables $SAS_BASE_DIR and $TREE_DIR when identifying and creating environment files. If it cannot find an existing TREE_DIR it will create one corresponding to the top level directory of the git repo. If it cannot find an existing SAS_BASE_DIR it will prompt you to create one.

ModuleFiles

If you are using the modules environment manager, this script attempts to copy the module files located in tree/etc into your local $MODULES_DIR. If no modules path is specified, the script attempts to identify your modules directory by taking the first path directory found in the $MODULEPATH environment variable. To specify a custom MODULES_DIR, use the modulesdir keyword argument.

python setup_tree.py -m '/my/custom/path/modules/'

It will copy all module files found in tree/etc and place them inside $MODULES_DIR/tree/. For example the etc/dr14.module file would get copied to /my/custom/path/modules/tree/dr14.

Example Files

Example config files with created environment files.

SDSS Config Data Dir Etc Dir
dr14dr14.cfgdr14.module, dr14.sh dr14.csh
sdssworksdsswork.cfgsdsswork.module, sdsswork.sh sdsswork.csh