There are several different ways to install the
asdf package. Each is
described in detail below.
asdf package has the following dependencies:
python 3.6 or later
numpy 1.10 or later
jsonschema 3.0.2 or later
pyyaml 3.10 or later
semantic_version 2.8 or later
Support for units, time, transform, wcs, or running the tests also requires:
astropy 3.0 or later
Optional support for lz4 compression is provided by:
lz4 0.10 or later
Installing with pip¶
Stable releases of the ASDF Python package are registered at
PyPi. The latest stable version
can be installed using
$ pip install asdf
Installing with conda¶
asdf within an existing conda environment:
$ conda install -c conda-forge asdf
To create a new conda environment and install
$ conda create -n new-env-name -c conda-forge python asdf
Building from source¶
The latest development version of ASDF is available from the
on github. To clone the project:
$ git clone https://github.com/asdf-format/asdf
$ cd asdf $ git submodule update --init $ pip install .
To install in development mode:
$ pip install -e .
The source repository makes use of a git submodule for referencing the schemas provided by the ASDF standard. While this submodule is automatically initialized when installing the package (including in development mode), it may be necessary for developers to manually update the submodule if changes are made upstream. See the documentation on git submodules for more information.
Running the tests¶
To install the test dependencies from a source checkout of the repository:
$ pip install -e .[tests]
To run the unit tests from a source checkout of the repository:
It is also possible to run the test suite from an installed version of the package.
pip install asdf[tests] pytest --pyargs asdf
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>