Skip to content

Commit

Permalink
getting badges from md readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Apr 25, 2019
1 parent 6f4723b commit d6ba6ec
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 67 deletions.
64 changes: 0 additions & 64 deletions README.rst

This file was deleted.

10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-

import os
import re
import sys
import glob
import subprocess
Expand Down Expand Up @@ -31,6 +32,15 @@ def setup(app):
"theano",
]

# Get the badges from the README
readme_txt = open("../README.md").read()
badges = "\n".join(re.findall(r"^<p>(.+)</p>", readme_txt, re.M | re.S))
with open("badges.rst", "w") as f:
f.write(".. raw:: html\n\n <p>")
for line in badges.splitlines():
f.write(" " + line + "\n")
f.write(" </p>\n")

# Convert the tutorials
for fn in chain(glob.glob("_static/notebooks/*.ipynb"),
glob.glob("_static/notebooks/gallery/*.ipynb")):
Expand Down
40 changes: 39 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
.. include:: ../README.rst
exoplanet
=========

.. include:: badges.rst

*exoplanet* is a toolkit for probabilistic modeling of transit and/or radial
velocity observations of `exoplanets <https://en.wikipedia.org/wiki/Exoplanet>`_
and other astronomical time series using `PyMC3 <https://docs.pymc.io>`_.
*PyMC3* is a flexible and high-performance model building language and
inference engine that scales well to problems with a large number of
parameters. *exoplanet* extends *PyMC3*'s language to support many of the
custom functions and distributions required when fitting exoplanet datasets.
These features include:

* A fast and robust solver for Kepler's equation.
* Scalable Gaussian Processes using `celerite
<https://celerite.readthedocs.io>`_.
* Fast and accurate limb darkened light curves using `starry
<https://rodluger.github.io/starry>`_.
* Common reparameterizations for `limb darkening parameters
<https://arxiv.org/abs/1308.0009>`_, and `planet radius and impact
parameter <https://arxiv.org/abs/1811.04859>`_.
* And many others!

All of these functions and distributions include methods for efficiently
calculating their *gradients* so that they can be used with gradient-based
inference methods like `Hamiltonian Monte Carlo <https://arxiv.org/abs/1206.1901>`_,
`No U-Turns Sampling <https://arxiv.org/abs/1111.4246>`_, and `variational
inference <https://arxiv.org/abs/1603.00788>`_. These methods tend to be more
robust than the methods more commonly used in astronomy (like `ensemble
samplers <https://emcee.readthedocs.io>`_ and `nested sampling
<https://ccpforge.cse.rl.ac.uk/gf/project/multinest/>`_) especially when the
model has more than a few parameters. For many exoplanet applications,
*exoplanet* (the code) can improve the typical performance by orders of
magnitude.

*exoplanet* is being actively developed in `a public repository on GitHub
<https://github.com/dfm/exoplanet>`_ so if you have any trouble, `open an issue
<https://github.com/dfm/exoplanet/issues>`_ there.

User guide
----------
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
install_requires = f.read().splitlines()


with open(os.path.join(dirname, "README.rst"), encoding="utf-8") as f:
with open(os.path.join(dirname, "README.md"), encoding="utf-8") as f:
readme = f.read()


Expand All @@ -37,8 +37,9 @@
],
description="Fast & scalable MCMC for all your exoplanet needs",
long_description=readme,
long_description_content_type="text/markdown",
install_requires=install_requires,
package_data={"": ["README.rst", "LICENSE"]},
package_data={"": ["README.md", "LICENSE"]},
include_package_data=True,
classifiers=[
"Development Status :: 4 - Beta",
Expand Down

0 comments on commit d6ba6ec

Please sign in to comment.