From d84ca7ca600baf6fa2733ad27934f402002176f6 Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Wed, 14 Sep 2022 14:17:32 -0400 Subject: [PATCH] simple sphinx conversion --- Makefile | 20 +++++++++ make.bat | 35 +++++++++++++++ {markdown => source}/algorithms.md | 0 {markdown => source}/assign.md | 0 {markdown => source}/basic_concepts.md | 0 {markdown => source}/concepts.md | 0 source/conf.py | 52 ++++++++++++++++++++++ {markdown => source}/divides.md | 0 {markdown => source}/ewise_intersection.md | 0 {markdown => source}/ewise_union.md | 0 {markdown => source}/functional.md | 0 {markdown => source}/hints.md | 0 {markdown => source}/index.md | 0 source/index.rst | 22 +++++++++ {markdown => source}/intro.md | 0 {markdown => source}/matrix.md | 0 {markdown => source}/matrix_traits.md | 0 {markdown => source}/max.md | 0 {markdown => source}/metadata.md | 0 {markdown => source}/min.md | 0 {markdown => source}/minus.md | 0 {markdown => source}/multiplies.md | 0 {markdown => source}/multiply.md | 0 {markdown => source}/ops_ewise.md | 0 {markdown => source}/ops_mxm.md | 0 {markdown => source}/plus.md | 0 {markdown => source}/type_traits.md | 0 {markdown => source}/utilities.md | 0 {markdown => source}/vector.md | 0 {markdown => source}/views.md | 0 30 files changed, 129 insertions(+) create mode 100644 Makefile create mode 100644 make.bat rename {markdown => source}/algorithms.md (100%) rename {markdown => source}/assign.md (100%) rename {markdown => source}/basic_concepts.md (100%) rename {markdown => source}/concepts.md (100%) create mode 100644 source/conf.py rename {markdown => source}/divides.md (100%) rename {markdown => source}/ewise_intersection.md (100%) rename {markdown => source}/ewise_union.md (100%) rename {markdown => source}/functional.md (100%) rename {markdown => source}/hints.md (100%) rename {markdown => source}/index.md (100%) create mode 100644 source/index.rst rename {markdown => source}/intro.md (100%) rename {markdown => source}/matrix.md (100%) rename {markdown => source}/matrix_traits.md (100%) rename {markdown => source}/max.md (100%) rename {markdown => source}/metadata.md (100%) rename {markdown => source}/min.md (100%) rename {markdown => source}/minus.md (100%) rename {markdown => source}/multiplies.md (100%) rename {markdown => source}/multiply.md (100%) rename {markdown => source}/ops_ewise.md (100%) rename {markdown => source}/ops_mxm.md (100%) rename {markdown => source}/plus.md (100%) rename {markdown => source}/type_traits.md (100%) rename {markdown => source}/utilities.md (100%) rename {markdown => source}/vector.md (100%) rename {markdown => source}/views.md (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/Makefile @@ -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) diff --git a/make.bat b/make.bat new file mode 100644 index 0000000..6fcf05b --- /dev/null +++ b/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/markdown/algorithms.md b/source/algorithms.md similarity index 100% rename from markdown/algorithms.md rename to source/algorithms.md diff --git a/markdown/assign.md b/source/assign.md similarity index 100% rename from markdown/assign.md rename to source/assign.md diff --git a/markdown/basic_concepts.md b/source/basic_concepts.md similarity index 100% rename from markdown/basic_concepts.md rename to source/basic_concepts.md diff --git a/markdown/concepts.md b/source/concepts.md similarity index 100% rename from markdown/concepts.md rename to source/concepts.md diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..ab90a6c --- /dev/null +++ b/source/conf.py @@ -0,0 +1,52 @@ +# 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('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'graphblas-cpp' +copyright = '2022, Benjamin Brock' +author = 'Benjamin Brock' + + +# -- 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 = ['myst_parser' +] + +# 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_book_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'] diff --git a/markdown/divides.md b/source/divides.md similarity index 100% rename from markdown/divides.md rename to source/divides.md diff --git a/markdown/ewise_intersection.md b/source/ewise_intersection.md similarity index 100% rename from markdown/ewise_intersection.md rename to source/ewise_intersection.md diff --git a/markdown/ewise_union.md b/source/ewise_union.md similarity index 100% rename from markdown/ewise_union.md rename to source/ewise_union.md diff --git a/markdown/functional.md b/source/functional.md similarity index 100% rename from markdown/functional.md rename to source/functional.md diff --git a/markdown/hints.md b/source/hints.md similarity index 100% rename from markdown/hints.md rename to source/hints.md diff --git a/markdown/index.md b/source/index.md similarity index 100% rename from markdown/index.md rename to source/index.md diff --git a/source/index.rst b/source/index.rst new file mode 100644 index 0000000..e294645 --- /dev/null +++ b/source/index.rst @@ -0,0 +1,22 @@ +.. graphblas-cpp documentation master file, created by + sphinx-quickstart on Wed Sep 14 14:02:57 2022. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to graphblas-cpp's documentation! +========================================= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + intro + basic_concepts + concepts + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/markdown/intro.md b/source/intro.md similarity index 100% rename from markdown/intro.md rename to source/intro.md diff --git a/markdown/matrix.md b/source/matrix.md similarity index 100% rename from markdown/matrix.md rename to source/matrix.md diff --git a/markdown/matrix_traits.md b/source/matrix_traits.md similarity index 100% rename from markdown/matrix_traits.md rename to source/matrix_traits.md diff --git a/markdown/max.md b/source/max.md similarity index 100% rename from markdown/max.md rename to source/max.md diff --git a/markdown/metadata.md b/source/metadata.md similarity index 100% rename from markdown/metadata.md rename to source/metadata.md diff --git a/markdown/min.md b/source/min.md similarity index 100% rename from markdown/min.md rename to source/min.md diff --git a/markdown/minus.md b/source/minus.md similarity index 100% rename from markdown/minus.md rename to source/minus.md diff --git a/markdown/multiplies.md b/source/multiplies.md similarity index 100% rename from markdown/multiplies.md rename to source/multiplies.md diff --git a/markdown/multiply.md b/source/multiply.md similarity index 100% rename from markdown/multiply.md rename to source/multiply.md diff --git a/markdown/ops_ewise.md b/source/ops_ewise.md similarity index 100% rename from markdown/ops_ewise.md rename to source/ops_ewise.md diff --git a/markdown/ops_mxm.md b/source/ops_mxm.md similarity index 100% rename from markdown/ops_mxm.md rename to source/ops_mxm.md diff --git a/markdown/plus.md b/source/plus.md similarity index 100% rename from markdown/plus.md rename to source/plus.md diff --git a/markdown/type_traits.md b/source/type_traits.md similarity index 100% rename from markdown/type_traits.md rename to source/type_traits.md diff --git a/markdown/utilities.md b/source/utilities.md similarity index 100% rename from markdown/utilities.md rename to source/utilities.md diff --git a/markdown/vector.md b/source/vector.md similarity index 100% rename from markdown/vector.md rename to source/vector.md diff --git a/markdown/views.md b/source/views.md similarity index 100% rename from markdown/views.md rename to source/views.md