ImagingLSS on NERSC Jupyter Portal

This example will guide you setup imaginglss at NERSC with Jupyter.

https://jupyter.nersc.gov

This guide will not work on Cori or Edison. Refer to the documentation for using imaginglss in a Batch environment.

First time install

This will checkout the imaginglss source code to ~/imaginglss

If you'd like to put the code some other places, change the path.


In [2]:
%%bash 

cd ~

git clone https://github.com/desihub/imaginglss
cd imaginglss

/anaconda/bin/pip install --user -e .


Initialized empty Git repository in /global/project/projectdirs/m779/yfeng1/source/imaginglss/imaginglss-notebooks/imaginglss/.git/
Obtaining file:///global/project/projectdirs/m779/yfeng1/source/imaginglss/imaginglss-notebooks/imaginglss
Requirement already satisfied (use --upgrade to upgrade): numpy in /anaconda/lib/python2.7/site-packages (from imaginglss==0.1.0rc0)
Installing collected packages: imaginglss
  Running setup.py develop for imaginglss
Successfully installed imaginglss-0.1.0rc0
You are using pip version 7.0.3, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Update

This will abandon all of your local changes!


In [3]:
%%bash 

cd ~/imaginglss

git stash
git pull


No local changes to save
Already up-to-date.
You are using pip version 7.0.3, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
--user should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

Head start for Developers

For developers, it is preferable to do updates with git pull from a true terminal window, or follow other standard git practice of merging in upstream changes. (e.g. git fetch)

The main development of imaginglss is done this way:

  • One terminal window connected to NERSC
  • One notebook connected to http://jupyter.nersc.gov
  • Write up some ideas in the notebook
  • git checkout -b mybigidea
  • implement it from the terminal window
  • Reload the notebook kernel and test the implementation
  • If it works, git add, git commit, git push, and file a Pull Request.
  • If it does not work, go to 'implement' step.
  • Wait till the feature is merged,
  • git checkout master; git branch -d mybigidea.

Reinstall

Usually not needed, but if things go severely wrong, try this.


In [ ]:
%%bash

cd ~/imaginglss
/anaconda/bin/pip uninstall imaginglss
/anaconda/bin/pip install --user -e .

In [4]:
import imaginglss
print imaginglss


<module 'imaginglss' from '/global/project/projectdirs/m779/yfeng1/source/imaginglss/imaginglss-notebooks/imaginglss/imaginglss/__init__.py'>

In [5]:
decals = imaginglss.DECALS('/global/project/projectdirs/m779/imaginglss/dr2.conf.py')

In [ ]: