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

Docs #13

Merged
merged 3 commits into from
Jul 15, 2024
Merged

Docs #13

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
33 changes: 33 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build documentation

on:
pull_request:
branches:
- develop
- master

jobs:
documentation:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
sudo apt update
python -m pip install --upgrade --no-cache-dir pip setuptools
python -m pip install --exists-action=w --no-cache-dir -r requirements1.txt
python -m pip install --exists-action=w --no-cache-dir -r requirements2.txt
python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .

- name: Build documentation
# Build the documentation, you can use this command locally
run: |
cd docs/source
python -m sphinx -T -W --keep-going -b html -d _build/doctrees -D language=en . docs/html
11 changes: 7 additions & 4 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3-dev
- name: Install torch
- name: Install dependencies part 1
run: |
pip install torch==2.0.0
- name: Install other dependencies
pip install -r requirements1.txt
- name: Install dependencies part 2
run: |
pip install -r requirements.txt --no-deps
pip install -r requirements2.txt
- name: Install dependencies part 3
run: |
pip install -r requirements3.txt --no-deps
- name: Set PYTHONPATH
run: |
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ data__DatasetsTest_tmp/

# Mac OS extentions
*.DS_Store

# Sphinx documentation
docs/_build/

201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

22 changes: 22 additions & 0 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "2"

build:
os: "ubuntu-20.04"
apt_packages:
- build-essential
- python3-dev
tools:
python: "3.11"

python:
install:
- requirements: requirements1.txt
- requirements: requirements2.txt
- requirements: docs/requirements.txt
- method: pip
path: .

sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: true
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx==7.1.2
sphinx-rtd-theme==1.3.0rc1
33 changes: 33 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
API reference
*************


.. autosummary::
:toctree: generated


Working with datasets
========================
.. automodule:: base.custom_datasets
:members:


Creating and managing models
==============================
.. automodule:: models_builder.gnn_models
:members:


Interpretation
==================
.. automodule:: explainers.explainer
:members:



Auxiliary functions
========================
.. automodule:: aux.configs
:members:


Loading
Loading