-
Notifications
You must be signed in to change notification settings - Fork 0
installing_4gp
4GP is distributed with a standard setuptools
installation script setup.py
which allows you to install its
constituent modules into your local python environment.
Note that 4GP is currently only tested against python 3.5.
We recommended that you install them in a python virtual environment, rather than tampering with your system-wide python installation.
Follow these steps in a Linux shell to do this:
# Check out code from GitHub
git clone https://github.com/dcf21/4most-4gp.git
# Sometimes this line is necessary, if your locale settings are broken
export LC_ALL=C
# Set up a python 3 virtual environment
virtualenv -p python3 virtualenv
source virtualenv/bin/activate
# Install some of the python packages we required
pip install numpy scipy astropy mysqlclient flask matplotlib tables
# Install 4GP code
cd 4most-4gp/src/pythonModules/fourgp_speclib
python setup.py develop
cd ../fourgp_cannon
python setup.py develop
cd ../fourgp_degrade
python setup.py develop
cd ../fourgp_rv
python setup.py develop
cd ../fourgp_specsynth
python setup.py develop
cd ../fourgp_telescope_data
python setup.py develop
cd ../fourgp_fourfs
python setup.py develop
cd ../fourgp_payne
python setup.py develop
cd ../fourgp_pipeline
python setup.py develop
4GP includes a set of scripts which produce auto-generated HTML documentation of its programmatic API.
These use a tool called Sphinx to automatically extract comments from the 4GP source code, and turn them into documentation of the methods which are available within each Python class.
After running the commands above, you can create the API documentation as follows:
# Create API documentation using sphinx
pip install Sphinx
cd ../../../docs
make html
After doing this, a directory _build
will have appeared within the docs
directory containing HTML documentation. To view its contents, you should open a web browser and enter the address:
file:///path_to_your_4gp_installation/docs/_build/index.html
Once you have completed these steps, and have 4GP installed, you will probably want to install some of the tools which 4GP wraps.
Introduction
Installation
Testing your installation
Using 4GP