diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4c80ed729..2a55d3633 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,13 +54,17 @@ jobs: parameters: versions: ['3.6'] images: ['ubuntu-18.04'] - package: '-e .[all]' + # don't install package, just build dependencies + package: 'oldest-supported-numpy scipy cython' job: job: 'Docs' displayName: 'Build documentation' dependsOn: 'EvalChanges' condition: eq(dependencies.EvalChanges.outputs['output.buildDocs'], 'True') steps: + - script: 'pip install "scipy>1.4.0" "scikit-learn>0.22.0" sparse "joblib>=0.13.0" "statsmodels>=0.10" pandas "shap>=0.38.1,<0.40.0" "dowhy<0.8" lightgbm' + displayName: 'Install dependencies' + - script: 'sudo apt-get -yq install graphviz' displayName: 'Install graphviz' @@ -70,17 +74,17 @@ jobs: - script: 'pip install git+https://github.com/slundberg/shap.git@d1d2700acc0259f211934373826d5ff71ad514de' displayName: 'Install specific version of shap' - - script: 'pip install sphinx sphinx_rtd_theme' + - script: 'pip install sphinx sphinx_rtd_theme sphinx_multiversion' displayName: 'Install sphinx' - - script: 'python setup.py build_sphinx -W' + - script: 'sphinx-multiversion doc build/sphinx' displayName: 'Build documentation' - publish: 'build/sphinx/html' artifact: 'Documentation' displayName: 'Publish documentation as artifact' - - script: 'python setup.py build_sphinx -b doctest' + - script: 'pip install matplotlib & python setup.py build_sphinx -b doctest' displayName: 'Run doctests' diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html new file mode 100644 index 000000000..f8f7aa6db --- /dev/null +++ b/doc/_templates/layout.html @@ -0,0 +1,19 @@ +{# This content is taken from https://holzhaus.github.io/sphinx-multiversion/master/templates.html#version-banners + but applied to the layout.html document since the Read the Docs template does not have a page.html file. #} +{% extends "!layout.html" %} +{% block document %} +{% if current_version and latest_version and current_version != latest_version %} +
+ + {% if current_version.is_released %} + You're reading an old version of this documentation. + If you want up-to-date information, please have a look at {{latest_version.name}}. + {% else %} + You're reading the documentation for a development version. + For the latest released version, please have a look at {{latest_version.name}}. + {% endif %} + +
+{% endif %} +{{ super() }} +{% endblock %} diff --git a/doc/_templates/versions.html b/doc/_templates/versions.html new file mode 100644 index 000000000..86ece3c1a --- /dev/null +++ b/doc/_templates/versions.html @@ -0,0 +1,28 @@ +{# This content is a slightly tweaked version of the suggestions in https://holzhaus.github.io/sphinx-multiversion/master/templates.html#readthedocs-theme #} +{%- if current_version %} +