IRISpy Installation Instructions

DanRyanIrish edited this page Mar 14, 2018 · 24 revisions

This page outlines how to install the development version of IRISpy. The two primary packages on which IRISpy relies are ndcube and SunPy. Both of these have stable released versions that work with IRISpy. However, some developers may want to use the latest updates of these packages in their work on IRISpy. Below we will first outline how to install IRISpy with its stable dependencies, and then with the development versions of ndcube and SunPy.

To install these packages we will use a combination of conda, conda environments, pip and git. We will assume these are all installed on your current system. If you do not have anaconda installed, see the anaconda download webpage for instructions.

Finally IRISpy requires Python 3. Python 2 is not supported.

Stable Dependencies Install

1. Create Conda Environment: irispy-dev

From command line in any directory, do:

$ conda config --append channels conda-forge
$ conda create -n irispy-dev sunpy hypothesis pytest-mock pip sphinx coverage ipython jupyter ndcube

$ source activate irispy-dev on windows this is $ activate irispy-dev

The first line opens a conda channel so that sunpy and its dependencies can be installed. The second line creates the irispy-dev conda environment with a list of dependencies. The final line activates, or puts us into the new environment.

2. Clone IRISpy Repositories

First we will create a directory to hold the IRISpy repo.

$ cd
$ mkdir github_repos
$ cd github_repos
$ git clone https://github.com/sunpy/irispy.git irispy_dev

3. Install the IRISpy

$ cd ~/github_repos/irispy_dev
$ pip install -e .

You should now be ready to use IRISpy. To check it's installed, open an Python/IPython/Jupyter Notebook session from any directory and try
>>> import irispy

N.B. To ensure you continue to have the latest version of IRISpy, be sure to regularly update the irispy git repo by doing $ cd ~/github_repos/irispy_dev
$ git pull origin master

assuming that origin is the remote pointing to the main irispy repo, i.e. https://github.com/sunpy/irispy.git. To determine what the correct remote name is, cd into the repo's directory and do

$ git remote -v

Development Dependencies Install

This section outlines how to install the development version of IRISpy with the development versions of ndcube and sunpy.

1. Create Conda Environment: irispy-dev

From command line in any directory, do:

$ conda config --append channels conda-forge
$ conda create -n irispy-dev sunpy hypothesis pytest-mock pip sphinx coverage ipython jupyter
$ source activate irispy-dev on windows this is $ activate irispy-dev

The first line opens a conda channel so that sunpy and its dependencies can be installed. The second line creates the irispy-dev conda environment with a list of dependencies. The final line activates, or puts us into the new environment.

2. Remove the Stable Version of SunPy

We installed the stable version of SunPy through conda to get all its dependencies. However we want to replace the stable version with the development version. The first step is to remove this stable SunPy version.
CAUTION: Make sure you are in (have activated) the irispy-dev conda environment otherwise the next step will remove sunpy from the wrong conda environment.
From the command line in any directory, do

$ conda remove sunpy

3. Clone Required Repositories: sunpy, ndcube, irispy

First we will create a directory to hold the repos. The repos are not required to be in the same place but is more convenient. We will then clone the required repos.

$ cd
$ mkdir github_repos
$ cd github_repos
$ git clone https://github.com/sunpy/sunpy.git sunpy_dev
$ git clone https://github.com/sunpy/ndcube.git ndcube_dev
$ git clone https://github.com/sunpy/irispy.git irispy_dev

If you already have these repos cloned, make sure they are up-to-date but by pulling the latest version of the master branches. For example, for sunpy, do:

$ cd ~/github_repos/sunpy_dev
$ git pull origin master

assuming that origin is the remote pointing to the main sunpy repo, i.e. https://github.com/sunpy/sunpy.git. The same should be done for ndcube and irispy. To determine what the correct remote name is, cd into the repo's directory and do

$ git remote -v

4. Install the Development Versions of the Repos

$ cd ~/github_repos/sunpy_dev
$ pip install -e .
$ cd ~/github_repos/ndcube_dev
$ pip install -e .
$ cd ~/github_repos/irispy_dev
$ pip install -e .

You should now be ready to use IRISpy. To check it's installed, open an Python/IPython/Jupyter Notebook session from any directory and try
>>> import irispy

N.B. To ensure you continue to have the latest version of IRISpy, be sure to regularly update the sunpy, ndcube and irispy git repos as discussed at the end of Section 3.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.