Skip to content

Commit

Permalink
Merge pull request #1049 from aphearin/docs_v08
Browse files Browse the repository at this point in the history
Docs v08
  • Loading branch information
aphearin authored Sep 25, 2022
2 parents 1b95a85 + 958bdbf commit c66ba58
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 54 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build wheels

on: [push, pull_request]
on:
workflow_dispatch:
release:
types:
- published

jobs:
build_wheels:
Expand Down
8 changes: 3 additions & 5 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
0.9 (2022-9-14)
0.8 (unreleased)
----------------

- No changes yet
- Change packaging tools to pyproject.toml


0.8 (2022-9-14)
----------------
- Drop dependency on astropy-helpers

- Add new calculator for uber_hostid quantity

Expand Down
38 changes: 31 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ The core feature of Halotools is a modular platform for creating mock universes

The code is publicly available at https://github.com/astropy/halotools.

Documentation
Installation
-------------
The latest build of the documentation can be found at http://halotools.readthedocs.io. The documentation includes installation instructions, quickstart guides and step-by-step tutorials. The *Basic features* section below gives an overview of the primary functionality of the package.
The simplest way to install the latest release of the code is with conda-forge::

conda install -c conda-forge halotools

Installation
-------------
Or alternatively, you can install using pip::

pip install halotools

You can find detailed installation instructions
in the **Package Installation** section of http://halotools.readthedocs.io. After installing the package, you should navigate to the *Quickstart Guides and Tutorials* section and follow the *Getting started with Halotools* 10-minute tutorial. This will get you set up with the default halo catalog so that you can quickly get started with creating mock galaxy populations.


Documentation
-------------
The latest build of the documentation can be found at http://halotools.readthedocs.io. The documentation includes installation instructions, quickstart guides and step-by-step tutorials. The *Basic features* section below gives an overview of the primary functionality of the package.


Basic features
--------------
Expand Down Expand Up @@ -107,7 +113,7 @@ Although the **sim_manager** provides an object-oriented framework for creating
Project status
--------------

Halotools is a fully open-source package with contributing scientists spread across many universities. The latest stable release of the package, v0.7, is now available on pip and conda-forge. You can also install the development version of the package by cloning the master branch on GitHub and locally building the source code, as described in the installation instructions.
Halotools is a fully open-source package with contributing scientists spread across many universities. The latest stable release of the package, v0.8, is now available on pip and conda-forge. You can also install the development version of the package by cloning the master branch on GitHub and locally building the source code, as described in the installation instructions.


## Asking questions and staying up-to-date
Expand All @@ -117,8 +123,26 @@ You can contact Andrew Hearin directly by email at ahearin-at-anl-dot-gov, or by

Citing Halotools
----------------
If you use Halotools modules to support your science publication, we ask that you cite the code-release paper, http://arxiv.org/abs/1606.04106 paper, ideally taking note of the version of the code you used, e.g., v0.7. Depending on what modules you use, other citations may also be appropriate; see the **License and Citation Information** section of http://halotools.readthedocs.io for further information about how to properly cite Halotools and its supporting science and software.

If you use Halotools modules to support your science publication, please cite `Hearin et al. (2017) <https://arxiv.org/abs/1606.04106>`_, ideally taking note of the version of the code you used, e.g., v0.8::

@ARTICLE{halotools,
author = {{Hearin}, Andrew P. and {Campbell}, Duncan and {Tollerud}, Erik and {Behroozi}, Peter and {Diemer}, Benedikt and {Goldbaum}, Nathan J. and {Jennings}, Elise and {Leauthaud}, Alexie and {Mao}, Yao-Yuan and {More}, Surhud and {Parejko}, John and {Sinha}, Manodeep and {Sip{\"o}cz}, Brigitta and {Zentner}, Andrew},
title = "{Forward Modeling of Large-scale Structure: An Open-source Approach with Halotools}",
journal = {The Astronomical Journal},
keywords = {cosmology: theory, galaxies: halos, galaxies: statistics, large-scale structure of universe, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies},
year = 2017,
month = nov,
volume = {154},
number = {5},
eid = {190},
pages = {190},
doi = {10.3847/1538-3881/aa859f},
archivePrefix = {arXiv},
eprint = {1606.04106},
primaryClass = {astro-ph.IM},
adsurl = {https://ui.adsabs.harvard.edu/abs/2017AJ....154..190H},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

License
-------
Expand Down
19 changes: 8 additions & 11 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ Package Installation
To install Halotools, you can use conda-forge, 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.

Using pip
====================
Using conda-forge and pip
=========================

The simplest way to install the latest release of the code is with conda-forge.
If you will be :ref:`installing_halotools_with_virtualenv`, activate the environment before installing::


conda install -c conda-forge halotools

Alternatively, you can install using pip::
Expand Down Expand Up @@ -65,7 +64,7 @@ All official releases of the code are tagged with their version name, e.g., v0.7
To install a particular release::

git checkout v0.7
python setup.py install
pip install .

This will install the v0.7 release of the code. Other official release versions (e.g., v0.5) can be installed similarly.

Expand All @@ -75,7 +74,7 @@ Installing the most recent master branch
If you prefer to use the most recent version of the code::

git checkout master
python setup.py install
pip install .

This will install the master branch of the code that is currently under development. While the features in the official releases have a stable API, new features being developed in the master branch may not. However, the master branch may have new features and/or performance enhancements that you may wish to use for your science application. A concerted effort is made to ensure that only thoroughly tested and documented code appears in the public master branch, though Halotools users should be aware of the distinction between the bleeding edge version in master and the official release version available through pip.

Expand Down Expand Up @@ -110,28 +109,26 @@ Dependencies

If you install halotools using conda or 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
- `h5py <http://h5py.org/>`_: 3.7 or later

The h5py package is used for fast I/O of large simulated datasets.

If you did not use conda or pip, then you should be aware of the following strict requirements:

- `Python <http://www.python.org/>`_: 3.7.x
- `Python <http://www.python.org/>`_: 3.9.x

- `Numpy <http://www.numpy.org/>`_: 1.9 or later

- `Scipy <http://www.scipy.org/>`_: 0.15 or later

- `Cython <http://www.cython.org/>`_: 0.23 or later
- `Cython <http://www.cython.org/>`_: 0.29.32 or later

- `Astropy`_: 4.0 or later
- `Astropy`_: 5.0 or later

- `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>`_: For crawling the web for halo catalogs.

- `Requests <http://docs.python-requests.org/en/latest/>`_: Also for crawling the web for halo catalogs.

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

Any of the above can be installed with either pip or conda.

.. _verifying_your_installation:
Expand Down
34 changes: 4 additions & 30 deletions docs/quickstart_and_tutorials/development/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,13 @@ Then install the dependencies listed on the :ref:`step_by_step_install` page.
Code
====

Halotools contains a compiled component. To compile all cython (``.pyx``) files inplace run, ::

python3 setup.py build_ext --inplace

If you modify a ``.pyx`` file use the same command to recompile it. Subsequent runs will only compile files whose source has changed and so will be much quicker.

Halotools also has comprehensive unit tests and uses pytest. To run all tests, assuming you are in the base of the repository, first change directory into ``halotools`` and then run ``pytest``. ::

cd halotools
pytest

If you have made a change and only want to run a subset of tests run, ::

pytest -k tests_matching_this_string_will_run

Run ``pytest --help`` for a full list of options.
Halotools testing is handled with tox::

tox -e test

Docs
====

First ensure that the halotools package and sphinx are installed. From the base of the repository run, ::

pip3 install -e .
pip3 install sphinx==1.3.1 # see docs/conf.py for the sphinx version

Then build documentation with, ::

cd docs
make html

You can see the built documentation in ``docs/_build/html/``. The easiest way to view it in your browser is to spin up a local server. One way to do this is to run, from the built directory, ::

python3 -m http.server
Then build documentation with tox, ::

The docs should then be viewable at ``localhost:8000`` (the port will be logged when you start the server).
tox -e build_docs

0 comments on commit c66ba58

Please sign in to comment.