Installation for developerΒΆ

Here is the step-by-step guide for the library developer of irfpy.jcat.

Here “developer” means the persons who will change the codes under src/irfpy/ in the source tree.

  1. Clone the source code of irfpy.jcat.
% git clone git@gitlab.irf.se:irfpy/jcat
  1. Clone depending source code tree(s)
% git clone git@gitlab.irf.se:irfpy/util
% git clone git@gitlab.irf.se:irfpy/planets
  1. (Optional, but recommended) Create a new environment in Anaconda.
% conda create -n irfpy.jcat-develop -y anaconda

This will create a new python environment. (See http://conda.pydata.org/docs/using/envs.html for details about environment.)

Everytime you work on this environment, you use

% source activate irfpy.jcat-develop

for command line.

If you are working with development environment (e.g. PyCharm, Spyder, etc), you can point the python interpreter to ~/anaconda/envs/irfpy.jcat-develop/bin/python by setting of each program.

  1. Install the irfpy with “develop” option
% cd jcat
% python setup.py develop
% cd ../util
% python setup.py develop
% cd ../planets
% python setup.py develop

The difference from the python setup.py install is

  • “develop” installs the python codes as editable. Thus, when you modify the code, the change is automatically reflected. It is very useful option when you develop library, and test it. (In other words, the installation by “develop” is like a link.)
  • “install” installs the python codes as fixed installation. Thus, when you modify the code under “src/irfpy”, the change will not propagate to the installation. If you want to reflect the change, you need to install again by python setup.py install explicitly. (In other words, the installation by “install” is like a copy.)
  1. Check if the installation is successful.
% pip list | grep irfpy
irfpy.jcat (4.0.1a1, /home/user/Documents/my-development/jcat/src)
irfpy.planets (4.0.1, /home/user/Documents/my-development/planets/src)
irfpy.util (4.2.5, /home/user/Documents/my-development/util/src)