diff --git a/.github/workflows/doc.yaml b/.github/workflows/doc.yaml new file mode 100644 index 00000000..20a473c1 --- /dev/null +++ b/.github/workflows/doc.yaml @@ -0,0 +1,66 @@ +# If triggered on the master branch, then it will be pushed to the `latest` directory +# of `gh-pages`, which will be the default landing page. If this is triggered on any other +# branch, it will take the name of the branch and use it a directory name (i.e. version branch). +# This will allow us to have a landing page for each version of GraKeL. +# +# Workflow: +# * Update `latest` by pushing to master +# * New vesrion by manually dispatching this on a new branch +# +# Something went wrong, I need to manually inspect: +# * git clone git@github.com/ysig/GraKeL.git +# * git checkout gh-pages +# * Poke around, modify as needed +# * git add . +# * git commit -m "Update gh-pages" +# * git push origin gh-pages +# * wait until GitHub deploys the changes + +name: Docs + +on: + # Manually triggerable in github + workflow_dispatch: + + push: + branches: + - master + +jobs: + + build-and-deploy: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 # Using higher version seems to break some doc deps + + - name: Install dependencies + run: | + pip install -e ".[docs]" + + - name: Make docs + run: | + cd doc + make html + + - name: Push non-master branch to gh-pages + uses: peaceiris/actions-gh-pages@v3 + if: github.ref != 'refs/heads/master' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: doc/_build/html + destination_dir: ./${GITHUB_REF_NAME} + + - name: Push master branch to gh-pages as latest + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/master' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: doc/_build/html + destination_dir: ./latest diff --git a/doc/classes.rst b/doc/classes.rst index 5322f509..374bf5e0 100644 --- a/doc/classes.rst +++ b/doc/classes.rst @@ -79,7 +79,6 @@ Kernels PropagationAttr OddSth MultiscaleLaplacian - MultiscaleLaplacianFast HadamardCode VertexHistogram EdgeHistogram diff --git a/doc/kernels/multiscale_laplacian.rst b/doc/kernels/multiscale_laplacian.rst index 11dbd812..6e159584 100644 --- a/doc/kernels/multiscale_laplacian.rst +++ b/doc/kernels/multiscale_laplacian.rst @@ -170,7 +170,7 @@ The approximate multiscale Laplacian graph kernel can be found below .. autosummary:: - MultiscaleLaplacianFast + MultiscaleLaplacian Bibliography ------------ diff --git a/pyproject.toml b/pyproject.toml index 0457f7c9..6816d165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ lovasz = ["cvxopt>=1.2.0"] dev = ["cvxopt>=1.2.0", "pytest", "pytest-coverage", "torch_geometric"] test = ["pytest", "pytest-coverage", "torch_geometric"] wheel = ["pytest", "pytest-coverage"] +doc = ["sphinx", "sphinxcontrib-bibtex==1.0", "matplotlib", "numpydoc", "sphinx-gallery", "sphinx-rtd-theme"] [project.urls] documentation = 'https://ysig.github.io/GraKeL/'