Skip to content
Snippets Groups Projects
Unverified Commit da685687 authored by Kristin Berry's avatar Kristin Berry Committed by GitHub
Browse files

Adds Sphinx Documentation (#332)


* Add doxygen, breathe, sphinx documentation first steps

* Add draft readthedocs.yaml file

* Update to use exhale

* try forcing output

* Updated conf.py:

* Added conf.py new location

* Updated to fix typo

* Updated to re-add import

* update RTD.yaml

* Update to use correct doxygen command

* add docs env

* Test

* Remove exhale

* Remove not-working mod from all rst files

Co-authored-by: default avatarKristin Berry <kberry@gyro.wr.usgs.gov>
parent 0440ae47
No related branches found
No related tags found
No related merge requests found
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF
formats:
- pdf
conda:
environment: doc_environment.yml
name: usgscsm
channels:
- conda-forge
- default
dependencies:
- cmake>=3.12
- ale
- csm
- nlohmann_json
- breathe
This diff is collapsed.
# 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)
@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.http://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
# 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 = 'usgscsm'
copyright = '2021, USGS Astrogeology Software Team'
author = 'USGS Astrogeology Software Team'
# -- 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 = ['breathe'] #, 'exhale']
# 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 = 'alabaster'
# 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']
# breathe (doxygen -> sphinx package) settings
breathe_projects = { "usgscsm": "../xml/" }
breathe_default_project = "usgscsm"
import subprocess, os
# build doxygen on readthedocs
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
subprocess.call('cd ..; doxygen Doxyfile', shell=True)
# Setup the exhale extension
#exhale_args = {
# # These arguments are required
# "containmentFolder": "./library",
# "rootFileName": "index.rst",
# "rootFileTitle": "USGSCSM API",
# "doxygenStripFromPath": "..",
# # Suggested optional arguments
# "createTreeView": True,
# # TIP: if using the sphinx-bootstrap-theme, you need
# # "treeViewIsBootstrap": True,
# "exhaleExecutesDoxygen": True,
# "exhaleDoxygenStdin": "INPUT = ../../include"
#}
# Tell sphinx what the primary language being documented is.
primary_domain = 'cpp'
# Tell sphinx what the pygments highlight language should be.
highlight_language = 'cpp'
Welcome to usgscsm's documentation!
===================================
:Release: |version|
:Date: |today|
Issues and Version Control
--------------------------
This project is hosted on `GitHub`_. If you run into a problem, please open an `issue`_ on our `issue`_ tracker.
.. toctree::
:maxdepth: 2
library/index
.. _GitHub: http://github.com/USGS-Astrogeology/usgscsm
.. _issue: https://github.com/USGS-Astrogeology/usgscsm/issues?state=open
USGSCSM Distortion Class
==============================================
.. doxygenfile:: Distortion.h
:project: usgscsm
USGSCSM Astro Frame Sensor Model Class
=======================================================
.. doxygenfile:: UsgsAstroFrameSensorModel.h
:project: usgscsm
#################
Library Reference
#################
:Release: |version|
:Date: |today|
.. toctree::
distortion
utilities
plugin
framer
linescanner
sar
USGSCSM Astro Linescan Sensor Model Class
=============================================================
.. doxygenfile:: UsgsAstroLsSensorModel.h
:project: usgscsm
USGSCSM Astro Plugin Class
=====================================================
.. doxygenfile:: UsgsAstroPlugin.h
:project: usgscsm
USGSCSM Astro SAR Sensor Model Class
=============================================================
.. doxygenfile:: UsgsAstroSarSensorModel.h
:project: usgscsm
USGSCSM Utilities Class
==============================================
.. doxygenfile:: Utilities.h
:project: usgscsm
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment