From 05082c64acd6575226f7b57a9f6313ebbe6feb6d Mon Sep 17 00:00:00 2001 From: Maxime Liquet <35924738+maximlt@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:19:04 +0200 Subject: [PATCH] Some docs fixes before the next release (#1434) --- .github/workflows/docs.yaml | 11 +++++------ doc/user_guide/NetworkX.ipynb | 12 ++++++++++-- envs/py3.11-docs.yaml | 3 +++ pyproject.toml | 10 ++++++++-- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 7dbe04baa..2f2999444 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -50,8 +50,9 @@ jobs: run: | echo "Deploying from ref ${GITHUB_REF#refs/*/}" echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: install dev nbsite - run: pip install --pre -U nbsite + - name: install dev + # To make sure the latest is installed. + run: pip install -e . --no-deps - name: conda info run: conda info - name: conda list @@ -62,7 +63,7 @@ jobs: if: failure() run: cat /tmp/sphinx-*.log | tail -n 100 - name: Deploy dev - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 if: | (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') || (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) @@ -76,7 +77,7 @@ jobs: if: | (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') || (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./builtdocs @@ -104,8 +105,6 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} - name: install run: pip install -v --prefer-binary -e ."[doc, examples, geo]" - - name: install dev nbsite - run: pip install --pre -U nbsite - name: pip list run: pip list - name: Set and echo git ref diff --git a/doc/user_guide/NetworkX.ipynb b/doc/user_guide/NetworkX.ipynb index 349581102..90c0777c7 100644 --- a/doc/user_guide/NetworkX.ipynb +++ b/doc/user_guide/NetworkX.ipynb @@ -102,8 +102,16 @@ "graphviz = hvnx.draw(G, pos=pos)\n", "\n", "layout = shell + graphviz\n", - "\n", - "hvnx.save(layout, 'graph_layout.png')" + "layout" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```python\n", + "hvnx.save(layout, 'graph_layout.png')\n", + "```" ] }, { diff --git a/envs/py3.11-docs.yaml b/envs/py3.11-docs.yaml index b7cdaf197..69dc8d9dd 100644 --- a/envs/py3.11-docs.yaml +++ b/envs/py3.11-docs.yaml @@ -10,6 +10,8 @@ name: hvplotdocs channels: - nodefaults + - pyviz/label/dev + - pyviz/label/tooling_dev - conda-forge dependencies: - python=3.11 @@ -34,6 +36,7 @@ dependencies: - ipywidgets - jinja2 - matplotlib + - nbsite>=0.8.4 - networkx>=2.6.3 - notebook>=5.4 - numba>=0.51.0 diff --git a/pyproject.toml b/pyproject.toml index 750748d74..8a8d3c7cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -221,7 +221,6 @@ ruff = [ geoviews = { skip = true, packages = "geoviews-core >=1.9.0" } # It should be ibis-framework[duckdb], but it works anyway. ibis-framework = { skip = true, packages = "ibis-duckdb" } -nbsite = { skip = true } [tool.pyproject2conda.envs."tests"] channels = ["nodefaults", "pyviz/label/dev", "conda-forge"] @@ -231,7 +230,14 @@ name = "hvplottests" # reqs = ["-e .."] # Doesn't work [tool.pyproject2conda.envs."docs"] -channels = ["nodefaults", "conda-forge"] +channels = [ + "nodefaults", + # To get dev HoloViews, not always needed. + "pyviz/label/dev", + # To get dev nbsite, not always needed. + "pyviz/label/tooling_dev", + "conda-forge" +] python = ["3.11"] extras = ["doc", "examples", "geo", "graphviz", "dev-extras"] name = "hvplotdocs"