Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving documentation to ReadTheDocs #438

Merged
merged 26 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3ccf452
First go at converting LaTeX to Sphinx-compatible RST
mkavulich Mar 11, 2024
3c65377
Initial .readthedocs.yaml
mkavulich Mar 11, 2024
70f768b
Add conf.py in correct location
mkavulich Mar 11, 2024
45f7454
Include proper master doc main.rst, fix rogue text in conf.py
mkavulich Mar 11, 2024
6656e5f
Add requirements file for python dependencies
mkavulich Mar 11, 2024
bcb9fa9
Readthedocs insists that we have index.rst
mkavulich Mar 11, 2024
acd117a
Apparently chapters are case-sensitive. Fix up acknowledgements, and …
mkavulich Mar 12, 2024
d14f369
fix image embedding, clean up "preface" table (basically copied from …
mkavulich Mar 12, 2024
350dda9
Update and fix formatting for Introduction chapter
mkavulich Mar 12, 2024
42a5a96
Update and fix formatting for first section of Quick Start chapter
mkavulich Mar 12, 2024
1a5dacd
Finish formatting Quick Start chapter. Did not make any updates for l…
mkavulich Mar 12, 2024
0879584
Format "Repository" Chapter, including directory tree with descriptions
mkavulich Mar 12, 2024
36fc7e5
Format "Algorithm" chapter
mkavulich Mar 12, 2024
5ae4982
Format "Cases" and "CCPP Inteface" chapters
mkavulich Mar 14, 2024
c5e711a
Formatted final chapter!
mkavulich Mar 14, 2024
ca8192b
Add PDF for RTD
mkavulich Mar 14, 2024
ddcece6
WHY ARE MY PDFS NOT SHOWING UP???
mkavulich Mar 14, 2024
465b14b
Fix PDF title
mkavulich Mar 14, 2024
bce8383
Minor fixes to various files, section links, etc.
mkavulich Mar 14, 2024
0b55f7a
Trying desperately to get the author list to behave
mkavulich Mar 14, 2024
ab288c7
Remove old users guide
mkavulich Mar 14, 2024
49d0f63
Fix some figure and section links
mkavulich Mar 14, 2024
c710498
Update Makefile to build using Sphinx
mkavulich Mar 19, 2024
3e34a94
Fix latex make stanza (maybe), add README.md for building documentation
mkavulich Mar 19, 2024
7fdf996
Address Tracy's comments
mkavulich Apr 2, 2024
bfc72d1
Finish addressing Tracys comments
mkavulich Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# .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 OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

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

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- htmlzip
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: scm/doc/TechGuide/requirements.txt
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022, NOAA, UCAR/NCAR, CU/CIRES, CSU/CIRA
Copyright 2024, NOAA, UCAR/NCAR, CU/CIRES, CSU/CIRA

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# User's Guide

Please find the up-to-date User's Guide located in this repository in [`scm/doc/TechGuide/main.pdf`](https://github.com/NCAR/ccpp-scm/blob/main/scm/doc/TechGuide/main.pdf)
Please find the up-to-date User's Guide located on ReadTheDocs: https://ccpp-scm.readthedocs.io/en/latest/
17 changes: 17 additions & 0 deletions scm/doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SCM documentation

The SCM technical documentation/users' guide is written in [reStructured Text markup language (RST)](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html). It is designed to be built with the [Sphinx documentation tool](https://www.sphinx-doc.org/en/master/index.html), and is documentation from the `main` branch is configured to build automatically on ReadTheDocs: https://ccpp-scm.readthedocs.io/en/latest/

## Building docs locally

To build the HTML documentation locally (for example, when testing modifications to the documentation), you must have Sphinx [installed on your machine](https://www.sphinx-doc.org/en/master/usage/installation.html), as well as the required python packages listed in the `requirements.txt` file. Once the prerequisite software is installed, you can build the HTML documentation using the following commands:

python -m sphinx -T -b html -d _build/doctrees -D language=en . html

To build a PDF locally, in addition to Sphinx you must have Perl as well as the Perl-based [`latexmk` utility](https://mg.readthedocs.io/latexmk.html#installation). You can then build a PDF using the following commands:

python -m sphinx -T -b latex -d _build/doctrees -D language=en . latex
latexmk -f -pdf -pdflatex="pdflatex" -use-make index.tex

In lieu of running the above commands manually, you can also use `make`. The command `make all` will build both HTML and PDF documentation, while `make html` and `make latex` will build HTML and PDF respectively.

13 changes: 8 additions & 5 deletions scm/doc/TechGuide/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
# Makefile for the CCPP (SCM) Users Guide
#

.PHONY: main.pdf all clean
.PHONY: html latex all clean

all: main.pdf
all: html latex

main.pdf: main.tex
latexmk -f -pdf -pdflatex="pdflatex" -use-make main.tex
open main.pdf
latex:
python -m sphinx -T -b latex -d _build/doctrees -D language=en . latex
cd latex && latexmk -f -pdf -pdflatex="pdflatex" -use-make index.tex

html:
python -m sphinx -T -b html -d _build/doctrees -D language=en . html

clean:
latexmk -CA
Expand Down
12 changes: 12 additions & 0 deletions scm/doc/TechGuide/acknow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Acknowledgement
===============
If significant help was provided via the helpdesk, email, or
support forum for work resulting in a publication, please
acknowledge the Developmental Testbed Center team.

For referencing this document please use:

Firl, G., D. Swales, L. Carson, L. Bernardet, D. Heinzeller, M. Harrold, T. Hertneky, and
M. Kavulich, 2024. Common Community Physics Package Single Column Model v7.0.0 User and
Technical Guide. Available at https://ccpp-scm.readthedocs.io/en/latest/.

19 changes: 0 additions & 19 deletions scm/doc/TechGuide/acknow.tex

This file was deleted.

Loading
Loading