From 8e0d999e91f4ffe6e0df90d81508d501faa17355 Mon Sep 17 00:00:00 2001 From: "Kevin W. Beam" Date: Wed, 11 Dec 2024 16:58:25 -0700 Subject: [PATCH 1/2] WIP: add initial minimal RTD files --- .readthedocs.yaml | 13 +++++++++++++ docs/source/conf.py | 35 +++++++++++++++++++++++++++++++++++ docs/source/index.rst | 19 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 .readthedocs.yaml create mode 100644 docs/source/conf.py create mode 100644 docs/source/index.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..fff2f4b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +version: "2" + +build: + os: "ubuntu-22.04" + tools: + python: "3.12" + +python: + install: + - requirements: docs/requirements.txt + +sphinx: + configuration: docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..5d4dbd5 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,35 @@ +# Configuration file for the Sphinx documentation builder. + +# -- Project information + +project = 'MetGenC' +copyright = '2024, NSIDC' +author = 'National Snow and Ice Data Center' + +release = '0.6' +version = '0.6.0' + +# -- General configuration + +extensions = [ + 'sphinx.ext.duration', + 'sphinx.ext.doctest', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.intersphinx', +] + +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), +} +intersphinx_disabled_domains = ['std'] + +templates_path = ['_templates'] + +# -- Options for HTML output + +html_theme = 'sphinx_rtd_theme' + +# -- Options for EPUB output +epub_show_urls = 'footnote' diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..16a6b59 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,19 @@ +Welcome to MetGenC's documentation! +=================================== + +**MetGenC** solves all your problems. + +Check out the :doc:`usage` section for further information, including +how to :ref:`installation` the project. + +.. note:: + + This project is under active development. + +Contents +-------- + +.. toctree:: + + usage + api From b8307b88c5ed53057ba0196e78e7753ce91284c2 Mon Sep 17 00:00:00 2001 From: "Kevin W. Beam" Date: Wed, 11 Dec 2024 17:11:28 -0700 Subject: [PATCH 2/2] Add makefile and python requirements for RTD --- docs/Makefile | 20 ++++++++++++++++++++ docs/requirements.txt | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/requirements.txt diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/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/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..53fc1f3 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx==7.1.2 +sphinx-rtd-theme==1.3.0rc1