Skip to content

Commit

Permalink
Merge pull request #13 from ispras/docs
Browse files Browse the repository at this point in the history
Docs
  • Loading branch information
LukyanovKirillML authored Jul 15, 2024
2 parents 32952be + 5fb2ec1 commit 41c9cac
Show file tree
Hide file tree
Showing 19 changed files with 454 additions and 418 deletions.
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

0 comments on commit 41c9cac

Please sign in to comment.