Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

393 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Zenodo DOI CI Status

This package serves two purposes: it provides a default Sphinx configuration and set of extensions specific to the Astropy project, and it acts as a meta-package by installing all required Sphinx extensions for the core Astropy package and other packages.

Sphinx configuration

The default Sphinx configuration can be imported by putting:

from sphinx_astropy.conf import *

at the top of your conf.py file. You can then override specific settings from this default configuration, such as adding extensions or intersphinx packages. To give a clearer error messages for users, you can instead write:

try:
    from sphinx_astropy.conf import *
except ImportError:
    print('ERROR: the documentation requires the sphinx-astropy package to be installed')
    sys.exit(1)

Dependencies/extensions

Installing sphinx-astropy will automatically install (if not already present):

  • Sphinx
  • astropy-sphinx-theme - the default 'bootstrap' theme use by Astropy and a number of affiliated packages. This goes with sphinx_astropy.conf.v1.
  • sphinx-automodapi - an extension that makes it easy to automatically generate API documentation.
  • sphinx-gallery - an extension to generate example galleries
  • numpydoc - an extension to parse docstrings in NumpyDoc format
  • pillow - a package to deal with images, used by some examples in the astropy core documentation.
  • pytest-doctestplus - providing the 'doctestplus' extension to skip code snippets in narrative documentation.

pydata-sphinx-theme (confv2)

To use the new pydata-sphinx-theme with sphinx_astropy.conf.v2, you have to install the optional [confv2] dependencies:

pip install sphinx-astropy[confv2]

That would pull in the following as well:

astropy-unified theme (confv3)

To use the new astropy-unified theme, which is a derivative of pydata-sphinx-theme and sunpy-sphinx-theme with sphinx_astropy.conf.v3, you have to install the optional [confv3] dependencies:

pip install sphinx-astropy[confv3]

This would pull in the following as well:

  • astropy-sphinx-theme >=3.0
  • All confv3 dependencies.

About

Sphinx functionality for Astropy

Resources

Code of conduct

Stars

7 stars

Watchers

8 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages