Skip to content

Commit 81efd92

Browse files
authored
remove sphinx and update RTD config (#235)
1 parent dfc4fec commit 81efd92

39 files changed

+49
-652
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 & 35 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
@@ -286,40 +286,6 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
286286

287287
GENERATE_LATEX = NO
288288

289-
#---------------------------------------------------------------------------
290-
# Configuration options related to the XML output
291-
#---------------------------------------------------------------------------
292-
293-
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
294-
# captures the structure of the code including all documentation.
295-
# The default value is: NO.
296-
297-
GENERATE_XML = YES
298-
299-
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
300-
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
301-
# it.
302-
# The default directory is: xml.
303-
# This tag requires that the tag GENERATE_XML is set to YES.
304-
305-
XML_OUTPUT = sphinx/xml
306-
307-
# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
308-
# listings (including syntax highlighting and cross-referencing information) to
309-
# the XML output. Note that enabling this will significantly increase the size
310-
# of the XML output.
311-
# The default value is: YES.
312-
# This tag requires that the tag GENERATE_XML is set to YES.
313-
314-
XML_PROGRAMLISTING = NO
315-
316-
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
317-
# namespace members in file scope as well, matching the HTML output.
318-
# The default value is: NO.
319-
# This tag requires that the tag GENERATE_XML is set to YES.
320-
321-
XML_NS_MEMB_FILE_SCOPE = NO
322-
323289
#---------------------------------------------------------------------------
324290
# Configuration options related to the preprocessor
325291
#---------------------------------------------------------------------------
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/RF24Network__config_8h.rst

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

docs/sphinx/_static/custom_material.css

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

docs/sphinx/classRF24Network.rst

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

0 commit comments

Comments
 (0)