Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readthedocs: Add search ranking and use latest Python version #242

Merged
merged 9 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -18,11 +18,22 @@ sphinx:
# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf
- htmlzip

# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
install:
- requirements: docs/requirements.txt

# Settings for more control over Server side search.
# https://docs.readthedocs.io/en/stable/config-file/v2.html#search
search:
# Define which files pop up higher in the search results
ranking:
'docs/source/': 3
'ema_workbench/**': 2
'ema_workbench/examples/*': 1
'**/models/*': -1

# Exclude some files from the search
ignore: ['MANIFEST.in', '.gitattributes', '**/.gitignore', '**/data/*', '.eggs/**']
19 changes: 19 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Docs requirements
sphinx>=6
sphinx_rtd_theme>=1.2
readthedocs-sphinx-search>=0.3
nbsphinx
myst
pyscaffold
myst-parser

# General requirements
numpy
pandas
scikit-learn
salib>=1.4.6
platypus-opt
matplotlib
statsmodels
seaborn
tqdm
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
# -- General configuration

# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.3'
needs_sphinx = "6.0"
needs_extensions = {"sphinx_rtd_theme": "1.0"}

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand All @@ -43,6 +44,7 @@
"sphinx.ext.doctest",
"sphinx.ext.napoleon",
"sphinx.ext.mathjax",
"sphinxcontrib.jquery",
"nbsphinx",
"myst_parser",
]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ all = ["ema_workbench[jupyter,dev,cov,docs,graph,parallel]"]
jupyter = ["jupyter", "jupyter_client", "ipython", "ipykernel"]
dev = ["pytest", "pytest-mock", "jupyter_client", "ipyparallel"]
cov = ["pytest-cov", "coverage", "coveralls"]
docs = ["sphinx", "nbsphinx", "myst", "pyscaffold", "myst-parser"]
docs = ["sphinx", "sphinx-rtd-theme", "readthedocs-sphinx-search", "nbsphinx", "myst", "pyscaffold", "myst-parser"]
graph = ["altair", "pydot", "graphviz"]
parallel = ["ipyparallel", "traitlets"]

Expand Down