Skip to content

Commit

Permalink
Merge pull request #152 from cyrraz/documentation-build-fix
Browse files Browse the repository at this point in the history
Add requirements for readthedoc to build
  • Loading branch information
0ctagon authored Apr 19, 2024
2 parents ece072a + b9a6752 commit e653a09
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py

# Install required packages
python:
install:
- requirements: docs/requirements.txt
14 changes: 1 addition & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

import subprocess

subprocess.check_call(["pip", "install", "sphinx-gallery"])
subprocess.check_call(["pip", "install", "flit"])
subprocess.check_call(["pip", "install", "matplotlib"])
subprocess.check_call(["pip", "install", "boost_histogram"])
subprocess.check_call(["pip", "install", "PyYAML"])
subprocess.check_call(["pip", "install", "sphinx_rtd_theme"])
subprocess.check_call(["flit", "install", "-s"], cwd="../")
from sphinx_gallery.sorting import FileNameSortKey

project = "plothist"
copyright = "2023-2024, Cyrille Praz, Tristan Fillinger"
Expand Down Expand Up @@ -75,7 +65,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -213,8 +203,6 @@ def __call__(self, *args, **kwargs):
]
),
"nested_sections": False,
# specify that examples should be ordered according to filename
# 'within_subsection_order': FileNameSortKey,
"inspect_global_variables": False,
# 'thumbnail_size': (600, 400),
"reset_modules": (reset_mpl),
Expand Down
6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
boost_histogram
flit
matplotlib
PyYAML
sphinx-gallery
sphinx_rtd_theme

0 comments on commit e653a09

Please sign in to comment.