Installation

Install Python 3

The DAP is supported for Python 3 only. To install Python, you can do so along with a full package manager, like Anaconda, or you can install python 3 directly from python.org.

Python environment setup

You are strongly encouraged to build an isolated python environment specifically for the DAP. This can be done using virtualenv:

virtualenv dap
source dap/bin/activate

or conda:

conda create -n dap python=3.9
conda activate dap

See the Virtualenv documentation and/or Managing Environments with Conda for more details. See also virtualenvwrapper as an option for more easily managing virtualenv environments.

Install the DAP code

You can install the DAP directly from pip;

pip install sdss-mangadap

To uninstall:

pip uninstall sdss-mangadap

Test your installation

To test the installation, make sure you have pytest installed and then

cd mangadap/tests
pytest . -W ignore

Some tests require a set of “remote” data that are not located in the repo for space considerations. You can download these data by running the following script:

python download_test_data.py

And then executing the tests with the same commands above.

Note

If you have SDSS Collaboration Access and you have a ~/.netrc file (e.g., from using collaboration access with Marvin), this script will pull the data from the (still public) mangawork directory on the SAS.

Installation from source

To install from the sources, first clone the mangadap GitHub repo by executing:

git clone https://github.com/sdss/mangadap.git

This will create a mangadap directory in the current directory. Although we try to keep the main branch of the repository stable, we recommend using the most recent tag. You can do so by executing:

cd mangadap
./checkout_current_tag

If you plan to develop the code (e.g., in your own fork of the code), you should install the development dependencies as follows:

pip install -e ".[dev]"

Note

The use of the quotations above is shell dependent; e.g., you need them for zshell, but not for bash. Also beware the exact characters used in the html above may not be the quotation characters you need for the command line (i.e., copy-pasting the line above may throw an error).

Problems?

If you have problems, particularly those that you think may be a more general problem, please Submit an issue.