Skip to content

Commit 5fb9aeb

Browse files
authored
remove sphinx and update RTD config (#253)
1 parent d42c007 commit 5fb9aeb

34 files changed

+49
-575
lines changed

.github/doxygen.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""WARNING -- FOR CI ONLY
2+
3+
This script is meant to be execute in CI only.
4+
Running this locally will alter the Doxyfile.
5+
Such changes SHOULD NOT be pushed to the remote.
6+
"""
7+
from pathlib import Path
8+
import json
9+
10+
DOCS_DIR = Path(__file__).parent.parent / "docs"
11+
PROPERTIES = DOCS_DIR.parent / "library.json"
12+
CONFIG = DOCS_DIR / "Doxyfile"
13+
TMP = DOCS_DIR / "doxygenAction"
14+
15+
16+
def overwrite_doxygen_value():
17+
properties = json.loads(PROPERTIES.read_text(encoding="utf-8"))
18+
assert "version" in properties
19+
config = CONFIG.read_text(encoding="utf-8")
20+
TMP.write_text("PROJECT_NUMBER = {}\n".format(properties["version"]), encoding="utf-8")
21+
config += f"\n@INCLUDE = {str(TMP)}\n"
22+
CONFIG.write_text(config, encoding="utf-8")
23+
24+
if __name__ == "__main__":
25+
overwrite_doxygen_value()

.readthedocs.yaml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,28 @@
66
version: 2
77

88
build:
9-
os: "ubuntu-20.04"
9+
os: "ubuntu-22.04"
10+
apt_packages:
11+
- libclang1-12
12+
- libclang-cpp12
1013
tools:
1114
python: "3"
12-
13-
# Build documentation in the docs/ directory with Sphinx
14-
sphinx:
15-
configuration: docs/sphinx/conf.py
16-
17-
# Optionally build your docs in additional formats such as PDF
18-
#formats:
19-
# - pdf
20-
# latex builds break for sphinx-immaterial theme
21-
22-
# install Python requirements required to build docs
23-
python:
24-
install:
25-
- requirements: docs/sphinx/requirements.txt
15+
commands:
16+
# Install doxygen from source distributions (conda forge does not keep up-to-date doxygen releases)
17+
- >
18+
DOXYGEN_VERSION="1.12.0" &&
19+
mkdir .doxygen && cd .doxygen &&
20+
echo $(pwd) &&
21+
echo "https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz" &&
22+
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz &&
23+
gunzip doxygen.tar.gz &&
24+
tar xf doxygen.tar &&
25+
mv doxygen-$DOXYGEN_VERSION/bin/doxygen ./
26+
# get lib version & overwrite Doxyfile values
27+
- python3 .github/doxygen.py
28+
# run doxygen
29+
- cd docs && ../.doxygen/doxygen
30+
# copy output to RTD output path for HTML files
31+
- ls -R docs/html/
32+
- mkdir -p ${READTHEDOCS_OUTPUT}
33+
- mv docs/html/ "${READTHEDOCS_OUTPUT}"

docs/Doxyfile

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Project related configuration options
1818
#---------------------------------------------------------------------------
1919

20-
PROJECT_ICON = sphinx/_static/new_favicon.ico
20+
PROJECT_ICON = images/favicon.ico
2121

2222
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
2323
# double-quotes, unless you are using Doxywizard) that should identify the
@@ -383,25 +383,6 @@ HTML_DYNAMIC_SECTIONS = YES
383383

384384
GENERATE_LATEX = NO
385385

386-
#---------------------------------------------------------------------------
387-
# Configuration options related to the XML output
388-
#---------------------------------------------------------------------------
389-
390-
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
391-
# captures the structure of the code including all documentation.
392-
# The default value is: NO.
393-
394-
GENERATE_XML = YES
395-
396-
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
397-
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
398-
# it.
399-
# The default directory is: xml.
400-
# This tag requires that the tag GENERATE_XML is set to YES.
401-
402-
XML_OUTPUT = sphinx/xml
403-
404-
405386
#---------------------------------------------------------------------------
406387
# Configuration options related to the preprocessor
407388
#---------------------------------------------------------------------------
File renamed without changes.
File renamed without changes.

docs/sphinx/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/sphinx/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/sphinx/RF24Mesh_8h.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/sphinx/RF24Mesh__config_8h.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/sphinx/_static/custom_material.css

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/sphinx/classRF24Mesh.rst

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)