From e990469634ff44c9674f6ab356525aabdc30ea13 Mon Sep 17 00:00:00 2001 From: Benjamin Webb <40066515+webb-ben@users.noreply.github.com> Date: Wed, 23 Feb 2022 14:17:56 -0500 Subject: [PATCH] [WIP] Docs CI (#109) * Add test for docs build * Install nbsphinx with pip * Revert "Install nbsphinx with pip" This reverts commit 527a731caa712afb1ec7d07c7b6dae565fd77841. * Add pandoc to requirements-dev * Install pypandoc As per: https://sphinx-gallery.github.io/stable/configuration.html#using-pypandoc-to-convert-rst-to-markdown * install pandoc with apt-get * Update docs workflow * fix ref * Fix workflow as per: https://github.com/ammaraskar/sphinx-action/issues/33 * alphabetize requirements-dev.txt --- .github/workflows/docs.yml | 15 +++++++++++---- docs/source/data-access/R.ipynb | 8 ++++++++ docs/source/installation.rst | 2 +- requirements-dev.txt | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 545b1c37..fee29782 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,19 +1,26 @@ name: docs on: push: - branches: - - main paths: - 'docs/**' jobs: - docs: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: ammaraskar/sphinx-action@master with: - pre-build-command: "apt-get update -y && apt-get install -y nbsphinx" + pre-build-command: "apt-get install -y pandoc && python -m pip install -r requirements-dev.txt" + docs-folder: "docs/" + docs: + runs-on: ubuntu-latest + needs: test + if: github.ref == 'refs/heads/main' + steps: + - uses: ammaraskar/sphinx-action@master + with: + pre-build-command: "apt-get install -y pandoc && python -m pip install -r requirements-dev.txt" docs-folder: "docs/" - name: Commit documentation changes run: | diff --git a/docs/source/data-access/R.ipynb b/docs/source/data-access/R.ipynb index 8019bdc2..1a7cb81d 100644 --- a/docs/source/data-access/R.ipynb +++ b/docs/source/data-access/R.ipynb @@ -8,6 +8,14 @@ "# R" ] }, + { + "cell_type": "markdown", + "id": "5fcf5fc0", + "metadata": {}, + "source": [ + "[R](https://www.rstudio.com/) is a common programming language for data analysis and visualization. R provides easy access to various statiscal analysis libraries. We are going to use the R libraries: [sf](https://cran.r-project.org/web/packages/sf/vignettes/sf1.html) to load features, [dplyr](https://dplyr.tidyverse.org/) for data manipulation, and" + ] + }, { "cell_type": "markdown", "id": "7c41f82e-3b80-4907-9da7-9d5e4f546b10", diff --git a/docs/source/installation.rst b/docs/source/installation.rst index eecdec1e..7f44b9b1 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -8,7 +8,7 @@ wis2box is built for easy installation across various operating systems and envi Requirements and dependencies ----------------------------- -wis2box requires `Python`_ 3 and `Docker`_ 1.13. +wis2box requires `Python`_ 3 and `Docker`_ 1.13+. Core dependencies are installed as containers in the Docker Compose deployment of wis2box. This is true for the software wis2box itself, which runs as a container orchestrating the necessary diff --git a/requirements-dev.txt b/requirements-dev.txt index 29e691af..1ac957dc 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ flake8 jupyter nbsphinx +pypandoc pytest sphinx twine