Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Add doc dependancies #101

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -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 [email protected]/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
1 change: 0 additions & 1 deletion doc/classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Kernels
PropagationAttr
OddSth
MultiscaleLaplacian
MultiscaleLaplacianFast
HadamardCode
VertexHistogram
EdgeHistogram
Expand Down
2 changes: 1 addition & 1 deletion doc/kernels/multiscale_laplacian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ The approximate multiscale Laplacian graph kernel can be found below

.. autosummary::

MultiscaleLaplacianFast
MultiscaleLaplacian

Bibliography
------------
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down