Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
Use RTD v2.
Browse files Browse the repository at this point in the history
Move doc requirement files to docs/requirements.txt.
  • Loading branch information
pllim committed Sep 19, 2019
1 parent 34c5256 commit 64217e6
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 23 deletions.
20 changes: 18 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
requirements_file: requirements.txt
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

# Set the version of Python and requirements required to build your docs
python:
version: 3.5
version: 3.7
system_packages: true
install:
- requirements: docs/requirements.txt
- method: setuptools
path: .

# Don't build any extra formats
formats: []
2 changes: 1 addition & 1 deletion QUESTIONS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ a description of each of the prompts.
12. ``github_project``: This is the GitHub identifier for the edit on GitHub extension and the changelog link extension.
13. ``project_version``: The current version number of your project.
14. ``use_travis_ci``: If 'y' the template will include an example ``.travis.yml`` file for the Travis CI service.
15. ``use_read_the_docs``: If 'y' the ``read_the_docs.yml`` and ``.rtd-environment.yml`` files will be included for using conda on Read the Docs.
15. ``use_read_the_docs``: If 'y' the ``.readthedocs.yml`` and ``docs/requirements.txt`` files will be included for using pip on Read the Docs.
16. ``sphinx_theme``: The value of the ``html_theme`` variable in the sphinx configuration file.
17. ``minimum_python_version``: Version string of minimum supported Python version
2 changes: 1 addition & 1 deletion docs/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ a description of each of the prompts:
#. ``edit_on_github_extension``: Set to ``True`` to enable the edit on GitHub sphinx extension.
#. ``github_project``: This is the GitHub identifier for the edit on GitHub extension and the changelog link extension.
#. ``use_travis_ci``: If ``'y'`` the template will include an example ``.travis.yml`` file for the Travis CI service.
#. ``use_read_the_docs``: If ``'y'`` the ``read_the_docs.yml`` and ``.rtd-environment.yml`` files will be included for using conda on Read the Docs.
#. ``use_read_the_docs``: If ``'y'`` the ``.readthedocs.yml`` and ``docs/requirements.txt`` files will be included for using pip on Read the Docs.
#. ``sphinx_theme``: The value of the ``html_theme`` variable in the sphinx configuration file.
#. ``initialize_git_repo``: If `gitpython <https://gitpython.readthedocs.io/en/stable/>`_ is installed this option will turn the rendered package into a git repository and add and initilize the ``astropy_helpers`` submodule.
#. ``astropy_helpers_version``: The version number of the ``astropy_helpers`` submodule to be used, only used if ``initialize_git_repo`` is true.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def process_licence(licence_name):
remove_file('.travis.yml')

if '{{ cookiecutter.use_read_the_docs }}' != 'y':
remove_file('.rtd-environment.yml')
remove_file('readthedocs.yml')
remove_file('docs/requirements.txt')
remove_file('.readthedocs.yml')

if '{{ cookiecutter.include_cextern_folder }}' != 'y':
remove_dir("cextern")
Expand Down
26 changes: 23 additions & 3 deletions {{ cookiecutter.package_name }}/.readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
conda:
file: .rtd-environment.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2

# Set "fail_on_warning: true" for RTD to fail on warnings.
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: false

# Set the version of Python and requirements required to build your docs
# NOTE: This does not follow {{ cookiecutter.minimum_python_version }}
python:
setup_py_install: true
version: 3.7
system_packages: true
install:
- requirements: docs/requirements.txt
- method: setuptools
path: .

submodules:
include: all

# Don't build any extra formats
formats: []
14 changes: 0 additions & 14 deletions {{ cookiecutter.package_name }}/.rtd-environment.yml

This file was deleted.

5 changes: 5 additions & 0 deletions {{ cookiecutter.package_name }}/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Cython
numpy
matplotlib
astropy
sphinx-astropy

0 comments on commit 64217e6

Please sign in to comment.