Skip to content

Commit

Permalink
Official release of version 0.1
Browse files Browse the repository at this point in the history
Users who wish to install v0.1 should make sure they have already installed the appropriate dependencies and then run the following two commands in succession:

$ git checkout v0.1
$ python setup.py install
  • Loading branch information
Andrew Hearin committed Mar 13, 2016
1 parent d46e3e4 commit 09410aa
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
@@ -0,0 +1,4 @@
0.1 (2016-03-13)
----------------

- Initial release
26 changes: 20 additions & 6 deletions docs/install.rst
Expand Up @@ -5,29 +5,43 @@ Package Installation
************************

To install Halotools, you can either use pip or clone the repo from GitHub and build the source code.
Either way, be sure to read the :ref:`halotools_dependencies` section prior to installation.

If you use `conda <https://www.continuum.io/downloads>`_ to manage
your python distribution and package dependencies, consider installing Halotools into a
virtual environment created by conda. Setting this up is completely straightforward and takes less than a minute, even if this is your first time using a virtual environment.
Using a virtual environment simplifies not just the current installation
but also package upgrades and your subsequent workflow.
You can find explicit instructions in the :ref:`installing_halotools_with_virtualenv`
section of the documentation.

Using pip
====================

The simplest way to install the latest release of the code is with pip.
The simplest way to install the latest release of the code is with pip. Before installation, be sure you have installed the package dependencies described in the :ref:`halotools_dependencies` section. If you will be :ref:`installing_halotools_with_virtualenv`, activate the environment before installing with pip::

pip install halotools

The pip install option will become available very soon.
This will install the latest release of the code, v0.1. If you want the latest master branch, you will need to build the code from source following the instructions in the next section.

Building from source
====================

The other option for installing Halotools is to clone the source code from github and call the setup file. *Before* doing this, be sure you have already installed the package dependencies described in the following section::
If you don't install v0.1 using pip, you can instead clone the cource code and call the setup file. Before installation, be sure you have installed the package dependencies described in the :ref:`halotools_dependencies` section. If you will be :ref:`installing_halotools_with_virtualenv`, activate the environment before calling the final line below::

git clone https://github.com/astropy/halotools.git
cd halotools
git checkout v0.1
python setup.py install

Note that installation from source compiles the code's Cython-based back-end, which will generate a large number of compiler warnings that you can ignore.
This will install the v0.1 release of the code. If you prefer to use the most recent version of the code, skip the ``git checkout v0.1`` step; this will install the master branch of the code. While the features in v0.1 have a stable API, new features being developed in the master branch may not. Either way, the final step compiles the Cython-based back-end, which will generate a large number of compiler warnings that you can ignore.

.. _halotools_dependencies:

Dependencies
============

If you installed v0.1 using pip, then most of your dependencies will be handled for you automatically. The only additional dependency you may need is:
If you want to install v0.1 using pip, then most of your dependencies will be handled for you automatically. The only additional dependency you may need is:

- `h5py <http://h5py.org/>`_: 2.5 or later

Expand Down Expand Up @@ -58,7 +72,7 @@ Any of the above can be installed with either pip or conda.
Verifying your installation
==============================

After installing the code and its dependencies, navigate to some new working directory and execute the test suite.
After installing the code and its dependencies, navigate to some new working directory and execute the test suite. If you installed Halotools into a virtual environment as described in the :ref:`installing_halotools_with_virtualenv` section of the documentation, activate the environment before spawning a python session and executing the code below.

.. code:: python
Expand Down
36 changes: 36 additions & 0 deletions docs/installing_halotools_with_virtualenv.rst
@@ -0,0 +1,36 @@
:orphan:

.. _installing_halotools_with_virtualenv:

****************************************************
Installing Halotools using a virtual environment
****************************************************

If you use `conda <https://www.continuum.io/downloads>`_ to manage
your python distribution and package dependencies, it is easy to
create a virtual environment that will automatically have compatible versions of the necessary dependencies required by Halotools.
By installing into a virtual environment, you will not change any of the
packages that are already installed system-wide on your machine. We recommend that
you create the following environment that is specific to Halotools v0.1::

conda create -n halotools_v0.1 astropy=1.0.4 numpy=1.9.3 scipy=0.15.1 h5py=2.5.0 requests=2.9.1 beautifulsoup4=4.4.1 cython=0.23.4 python=2.7.11

In order to activate this environment::

source activate halotools_v0.1

You may wish to add additional packages into this environment, depending on what else you want to use when working with Halotools. This can be done by tacking on additional package names when you create the environment, and/or by running *conda install pkg_name* after activating the environment. For example::

conda create -n halotools_v0.1 astropy=1.0.4 numpy=1.9.3 scipy=0.15.1 h5py=2.5.0 requests=2.9.1 beautifulsoup4=4.4.1 cython=0.23.4 python=2.7.11 ipython matplotlib


Within the *halotools_v0.1* environment, you can install v0.1 of the Halotools using pip
and you should encounter no problems with package dependencies.
Then whenever you want to do science involving Halotools v0.1,
just activate the environment and import the code. When you are done
and wish to return to your normal system environment::

source deactivate



2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -57,7 +57,7 @@
builtins._ASTROPY_PACKAGE_NAME_ = PACKAGENAME

# VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386)
VERSION = '0.1.dev'
VERSION = '0.1'

# Indicates if this version is a release version
RELEASE = 'dev' not in VERSION
Expand Down

0 comments on commit 09410aa

Please sign in to comment.