Skip to content

Commit

Permalink
remove sphinx and update RTD config
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Sep 24, 2024
1 parent dfc4fec commit ee9afc0
Show file tree
Hide file tree
Showing 39 changed files with 49 additions and 652 deletions.
25 changes: 25 additions & 0 deletions .github/doxygen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""WARNING -- FOR CI ONLY
This script is meant to be execute in CI only.
Running this locally will alter the Doxyfile.
Such changes SHOULD NOT be pushed to the remote.
"""
from pathlib import Path
import json

DOCS_DIR = Path(__file__).parent
PROPERTIES = DOCS_DIR.parent / "library.json"
CONFIG = DOCS_DIR / "Doxyfile"
TMP = DOCS_DIR / "doxygenAction"


def overwrite_doxygen_value():
properties = json.loads(PROPERTIES.read_text(encoding="utf-8"))
assert "version" in properties
config = CONFIG.read_text(encoding="utf-8")
TMP.write_text("PROJECT_NUMBER = {}\n".format(properties["version"]), encoding="utf-8")
config += f"\n@INCLUDE = {str(TMP)}\n"
CONFIG.write_text(config, encoding="utf-8")

if __name__ == "__main__":
overwrite_doxygen_value()
38 changes: 23 additions & 15 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,28 @@
version: 2

build:
os: "ubuntu-20.04"
os: "ubuntu-22.04"
apt_packages:
- libclang1-12
- libclang-cpp12
tools:
python: "3"

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

# Optionally build your docs in additional formats such as PDF
#formats:
# - pdf
# latex builds break for sphinx-immaterial theme

# install Python requirements required to build docs
python:
install:
- requirements: docs/sphinx/requirements.txt
commands:
# Install doxygen from source distributions (conda forge does not keep up-to-date doxygen releases)
- >
DOXYGEN_VERSION="1.12.0" &&
mkdir .doxygen && cd .doxygen &&
echo $(pwd) &&
echo "https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz" &&
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz &&
gunzip doxygen.tar.gz &&
tar xf doxygen.tar &&
mv doxygen-$DOXYGEN_VERSION/bin/doxygen ./
# get lib version & overwrite Doxyfile values
- python3 .github/doxygen.py
# run doxygen
- cd docs && ../.doxygen/doxygen
# copy output to RTD output path for HTML files
- ls -R docs/html/
- mkdir -p ${READTHEDOCS_OUTPUT}
- mv docs/html/ "${READTHEDOCS_OUTPUT}"
36 changes: 1 addition & 35 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Project related configuration options
#---------------------------------------------------------------------------

PROJECT_ICON = sphinx/_static/new_favicon.ico
PROJECT_ICON = images/favicon.ico

# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the
Expand Down Expand Up @@ -286,40 +286,6 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest

GENERATE_LATEX = NO

#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------

# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
# captures the structure of the code including all documentation.
# The default value is: NO.

GENERATE_XML = YES

# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
# it.
# The default directory is: xml.
# This tag requires that the tag GENERATE_XML is set to YES.

XML_OUTPUT = sphinx/xml

# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to
# the XML output. Note that enabling this will significantly increase the size
# of the XML output.
# The default value is: YES.
# This tag requires that the tag GENERATE_XML is set to YES.

XML_PROGRAMLISTING = NO

# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
# namespace members in file scope as well, matching the HTML output.
# The default value is: NO.
# This tag requires that the tag GENERATE_XML is set to YES.

XML_NS_MEMB_FILE_SCOPE = NO

#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
Expand Down
File renamed without changes
File renamed without changes.
20 changes: 0 additions & 20 deletions docs/sphinx/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions docs/sphinx/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/sphinx/RF24Network__config_8h.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/sphinx/_static/custom_material.css

This file was deleted.

72 changes: 0 additions & 72 deletions docs/sphinx/classRF24Network.rst

This file was deleted.

Loading

0 comments on commit ee9afc0

Please sign in to comment.