Skip to content

Commit

Permalink
Add documentation setup
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherioszisis committed Feb 2, 2022
1 parent 63b5ed9 commit 2659b71
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
20 changes: 20 additions & 0 deletions doc/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)
67 changes: 67 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

from pkg_resources import get_distribution


# -- Project information -----------------------------------------------------

project = "vascpy"

# The short X.Y version
version = get_distribution("vascpy").version

# The full version, including alpha/beta/rc tags
release = version


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []

# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx-bluebrain-theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']

html_theme_options = {
"metadata_distribution": "vascpy",
}

html_title = u"Vasculature toolkit vascpy"

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False

7 changes: 7 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. toctree::
:hidden:
:maxdepth: 2

Home <self>

Test
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
description="Vasculature API",
author="Blue Brain Project, EPFL",
license="Apache-2",
url="https://github.com/BlueBrain/vascpy",
project_urls={
"Tracker": "https://github.com/BlueBrain/vascpy/issues",
"Source": "https://github.com/BlueBrain/vascpy",
},
install_requires=[
"numpy>=1.17",
"scipy>=1.0.0",
Expand All @@ -36,7 +41,11 @@
"libsonata>=0.1.8",
"click>=8.0",
],
extras_require={"convert-vtk": DEPS_VTK, "all": DEPS_VTK + ["python-igraph>=0.8.0"]},
extras_require={
"convert-vtk": DEPS_VTK,
"all": DEPS_VTK + ["python-igraph>=0.8.0"],
"docs": ["sphinx", "sphinx-bluebrain-theme"]
},
packages=find_packages(),
entry_points={"console_scripts": ["vascpy = vascpy.cli:app"]},
include_package_data=True,
Expand Down

0 comments on commit 2659b71

Please sign in to comment.