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

remove sphinx and update RTD config #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.parent / "docs"
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}"
21 changes: 1 addition & 20 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 @@ -383,25 +383,6 @@ HTML_DYNAMIC_SECTIONS = YES

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


#---------------------------------------------------------------------------
# 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.

5 changes: 0 additions & 5 deletions docs/sphinx/RF24Mesh_8h.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/sphinx/RF24Mesh__config_8h.rst

This file was deleted.

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

This file was deleted.

73 changes: 0 additions & 73 deletions docs/sphinx/classRF24Mesh.rst

This file was deleted.

Loading