Installation¶
There are several different ways to install the asdf
package. Each is
described in detail below.
Requirements¶
The asdf
package has several dependencies which are listed in the project’s
build configuration (setup.cfg
/ pyproject.toml
). All dependencies are available on pypi and will be automatically
installed along with asdf
.
Support for units, time, and transform tags requires an implementation of these types. One recommended option is the astropy package.
Optional support for lz4 compression is provided by the lz4 package.
Installing with pip¶
Stable releases of the ASDF Python package are registered at
PyPi. The latest stable version
can be installed using pip
:
$ pip install asdf
Installing with conda¶
asdf
is also distributed as a conda package via
the conda-forge channel. It is also available
through the astroconda
channel.
To install asdf
within an existing conda environment:
$ conda install -c conda-forge asdf
To create a new conda environment and install asdf
:
$ conda create -n new-env-name -c conda-forge python asdf
Building from source¶
The latest development version of ASDF is available from the master
branch
on github. To clone the project:
$ git clone https://github.com/asdf-format/asdf
To install:
$ cd asdf
$ 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 ".[tests]"
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[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>