========================== Installation for developer ========================== Here is the step-by-step guide for the library developer of ``irfpy.sara``. Here "developer" means the persons who will change the codes under ``src/irfpy/`` in the source tree. 1. Clone the source code of ``irfpy.sara``. .. code-block:: sh % git clone git@gitlab.irf.se:irfpy/sara 2. Clone depending source code tree(s) .. code-block:: sh % git clone git@gitlab.irf.se:irfpy/util % git clone git@gitlab.irf.se:irfpy/planets 3. (Optional, but recommended) Create a new environment in Anaconda. .. code-block:: sh % conda create -n irfpy.sara-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 .. code-block:: sh % source activate irfpy.sara-develop from command line. If you are working with development environment (e.g. PyCharm, Spyder, etc), you can point the python interpreter to ``~/anaconda/envs/irfpy.sara-develop/bin/python`` by setting of each program. 4. Install the depending libraries ``irfpy.sara`` depends on Spiceypy and basemap. .. code-block:: sh % conda install -c conda-forge spiceypy % conda install -c conda-forge basemap 5. Install ``Sadppac`` Sadppac should be intalled, following the instruction :ref:`here `. 6. Install the ``irfpy`` with "develop" option .. code-block:: sh % cd sara % 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.) 7. Check if the installation is successful. .. code-block:: sh % 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) 8. Install Sadppac .. code-block:: sh % cd irfpy-deps/libsadppac-mirror % python setup.py install 9. Check if Sadppac is installed. .. code-block:: sh % pip list | grep Sadppac Sadppac 0.4 .. note:: 2020-06-03: Sadppac >=0.4 should be used.