From 22c683820d10bc0ee8bfcac328af2aaf5aceaa60 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 25 Apr 2023 12:50:57 -0600 Subject: [PATCH 1/5] Migrate the docs to readthedocs --- .github/workflows/docs.yml | 63 -------------------------------------- .readthedocs.yml | 19 ++++++++++++ 2 files changed, 19 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/docs.yml create mode 100644 .readthedocs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 44627d7c..00000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Docs in GitHub Pages - -on: - push: - branches: ["master"] - pull_request: - branches: ["master"] - release: - types: [created] - branches: - - 'master' - workflow_dispatch: - -env: - FORCE_COLOR: "1" # Make tools pretty. - PIP_DISABLE_PIP_VERSION_CHECK: "1" - PIP_NO_PYTHON_VERSION_WARNING: "1" - PYTHON_LATEST: "3.11" - -jobs: - build-docs: - name: "Build docs" - runs-on: ubuntu-latest - steps: - - name: Checkout the source code - uses: actions/checkout@v3 - with: - fetch-depth: 0 # otherwise, you will fail to push refs to dest repo - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_LATEST }} - cache: pip - cache-dependency-path: | - setup.py - requirements-doc.txt - - name: "Install runtime dependencies" - run: | - pip install -U pip setuptools wheel - pip install -U -r requirements-doc.txt - - name: "Install doc build deps and build with Sphinx" - run: make doc - - name: "Upload artifacts" - uses: actions/upload-pages-artifact@v1 - with: - # Upload built docs - path: "./docs/_build/html/" - publish-docs: - name: "Publish the docs" - needs: build-docs - runs-on: ubuntu-latest - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - # Deploy to the github-pages environment - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: "Deploy to GitHub Pages" - uses: actions/deploy-pages@v1 - id: deployment diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..afdbb20b --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,19 @@ +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + builder: dirhtml + configuration: docs/conf.py + fail_on_warning: true + +# Optionally build your docs in additional formats +# such as PDF and ePub +formats: [] + +build: + os: ubuntu-20.04 + tools: + python: >- # PyYAML parses it as float but RTD demands an explicit string + 3.11 + From 5886bd3f4356a4783ea15855b3c2d97f71059bd1 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 25 Apr 2023 16:50:03 -0600 Subject: [PATCH 2/5] Fix .readthedocs.yml to include explicit python reqs config Co-authored-by: Sviatoslav Sydorenko --- .readthedocs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index afdbb20b..5d3c6710 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -16,4 +16,7 @@ build: tools: python: >- # PyYAML parses it as float but RTD demands an explicit string 3.11 - +python: + - method: pip + path: . + - requirements: requirements-doc.txt From ff7d35c03afe4e3bd6e442a58d5cd7313b61d23d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 26 Apr 2023 00:51:57 +0200 Subject: [PATCH 3/5] Add missing "install" key to the "python" section @ RTD --- .readthedocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5d3c6710..68f6eb7b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,6 +17,7 @@ build: python: >- # PyYAML parses it as float but RTD demands an explicit string 3.11 python: + install: - method: pip path: . - requirements: requirements-doc.txt From 05618c5b89bf0f60e1ae5abc493af58857ee2008 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 25 Apr 2023 16:56:12 -0600 Subject: [PATCH 4/5] Remove unused variable from docs/conf.py --- docs/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 5da0da57..2f266266 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,7 +32,6 @@ from importlib.metadata import version _docs_path = pathlib.Path(__file__).parent -_version_path = _docs_path / "../aiomonitor/__init__.py" try: From 8cf219553149c1b0984d9fdb71ae5e8240ac797f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 26 Apr 2023 01:08:04 +0200 Subject: [PATCH 5/5] Stop erroring out for warnings @ RTD This is a temporary change that must be reverted once there are no warnings reported. --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 68f6eb7b..ff9b1679 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,7 +5,7 @@ version: 2 sphinx: builder: dirhtml configuration: docs/conf.py - fail_on_warning: true + # fail_on_warning: true # Optionally build your docs in additional formats # such as PDF and ePub