Installation

There are several different ways to install the The asdf-astropy Extension Package package. Each is described in detail below.

Requirements

The The asdf-astropy Extension Package package has several dependencies which are all listed in the project’s setup.cfg file. All dependencies are available on pypi and will be automatically installed along with The asdf-astropy Extension Package. Most importantly, both the asdf and Getting Started packages will be installed along with The asdf-astropy Extension Package which should enable full functionality.

Installation with pip

Stable releases of the asdf-astropy python package are registered at PyPi. The latest stable version can be installed using pip:

$ pip install asdf-astropy

Installing with conda

The asdf-astropy Extension Package is also distributed as a conda package via the conda-forge channel.

To install The asdf-astropy Extension Package within an existing conda environment

$ conda install -c conda-forge asdf-astropy

To create a new conda environment and install The asdf-astropy Extension Package

$ conda create -n new-env-name -c conda-forge python asdf-astropy

Building from source

The latest development version of asdf-astropy is available from the main branch on github. To clone the project:

$ git clone https://github.com/astropy/asdf-astropy

To install:

$ cd asdf-astropy
$ pip install .

To install in development mode

$ pip install -e .

Running the tests

To install the test dependencies from a source checkout of the repository:

$ pip install -e ".[test]"

To run the unit tests from a source checkout of the repository:

$ pytest

It is also possible to run the test suite from an installed version of the package.

$ pip install "asdf-astropy[test]"
$ pytest --pyargs asdf-astropy

It is also possible to run the tests using tox.

$ pip install tox

To list all available environments:

$ tox -va

To run a specific environment:

$ tox -e <envname>