Skip to content

Commit

Permalink
Update Doxygen config (#2370)
Browse files Browse the repository at this point in the history
* Fix Doxygen pages

* Fix Doxygen configuration

* Add Design documentation to versioned folder

* Update doxygen usage

* Add googletest folder to doxygen ignore

* Update doxygen mainpage

* Exclude mainpage.md from spellcheck (repeated words)

* Add back subindex
  • Loading branch information
thomas-bc authored Nov 27, 2023
1 parent b9551a2 commit ec1a9b9
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@
^Svc/PrmDb/PrmDb\.hpp$
^Svc/TlmChan/TlmChan\.hpp$
ignore$
^docs/doxygen/mainpage.md$
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build/
build*/
gtest/
docs-cache/

AutoXML/
test_harness/src/test_harness-C/application.out
Expand Down Expand Up @@ -44,7 +45,7 @@ coverity.out
.#*

**/docs/*.html
/docs/UsersGuide/api/cmake/*
/docs/UsersGuide/api/*
*-template

logs
Expand Down
2 changes: 1 addition & 1 deletion Svc/BufferAccumulator/docs/BufferAccumulator.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<title>BufferAccumulator Component Dictionary</title>
\page SvcBufferAccumulatorComponent Svc::BufferAccumulator Component
# BufferAccumulator Component Dictionary


Expand Down
2 changes: 1 addition & 1 deletion Svc/PassiveRateGroup/docs/sdd.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<title>PassiveRateGroup Component SDD</title>
\page SvcPassiveRateGroupComponent Svc::PassiveRateGroup Component
# RateGroupDriver Component

## 1. Introduction
Expand Down
3 changes: 2 additions & 1 deletion Svc/SystemResources/docs/sdd.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# System Resources Component
\page SvcSystemResourcesComponent Svc::SystemResources Component
# SystemResources Component

The system resources component downlinks information about the running F´ system. This information includes:

Expand Down
19 changes: 11 additions & 8 deletions docs/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ PROJECT_NAME = "F´ Flight Software - C/C++ Documentation"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = NASA-v1.6.0
# Replaced with version number by ./generate_docs.bash <VERSION>
PROJECT_NUMBER = devel

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -170,7 +171,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH = ./ ./docs-build-for-docs/ ./docs-build-for-docs/F-Prime/ ./Ref/build-fprime-automatic-default/ ./Ref/build-fprime-automatic-default/F-Prime/
STRIP_FROM_PATH = ./ ./docs-cache/ ./docs-cache/F-Prime/

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand All @@ -179,7 +180,7 @@ STRIP_FROM_PATH = ./ ./docs-build-for-docs/ ./docs-build-for-docs/F-Prime
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.

STRIP_FROM_INC_PATH = ./ ./docs-build-for-docs/ ./docs-build-for-docs/F-Prime/ ./Ref/build-fprime-automatic-default/ ./Ref/build-fprime-automatic-default/F-Prime/
STRIP_FROM_INC_PATH = ./ ./docs-cache/ ./docs-cache/F-Prime/

# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
Expand Down Expand Up @@ -896,10 +897,12 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = ./docs/Architecture/ ./docs/UsersGuide/ ./docs/Tutorials/ ./docs/_data/ \
./docs/INSTALL.md ./docs/projects.md ./docs/index.md ./docs/_config.yml ./docs/features.md \
*CMakeFiles/* ./Gds ./Fw/Python ./ptf ./Autocoders ./cmake ./gtest ./Ref ./RPI ./metrics \
STest ./mk ./README.md ./CONTRIBUTORS.md
EXCLUDE = ./docs/Architecture/ ./docs/UsersGuide/ ./docs/Tutorials/ \
./docs/INSTALL.md ./docs/projects.md ./docs/index.md ./docs/_config.yml \
./docs/upcoming.md ./docs/latest.md ./docs/documentation.md ./docs/features.md \
*CMakeFiles/* ./Autocoders ./cmake ./gtest ./Ref ./RPI ./FppTest \
STest ./mk ./README.md ./CONTRIBUTORS.md ./CONTRIBUTING.md ./SECURITY.md \
./googletest/

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand All @@ -915,7 +918,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS = */test/* */GTest/* */build-*/* */Autocoders/MagicDrawCompPlugin/* */cmake/* */docs/v*.* */README.md
EXCLUDE_PATTERNS = */test/* */GTest/* */build-*/* */cmake/* */docs/v*.* */docs/_*

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down
23 changes: 15 additions & 8 deletions docs/doxygen/generate_docs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function make_version
then
mkdir "${FPRIME}/docs/${VERSION}"
cp "${FPRIME}/docs/latest.md" "${FPRIME}/docs/${VERSION}/index.md"
cp -r "${FPRIME}/docs/INSTALL.md" "${FPRIME}/docs/Tutorials" "${FPRIME}/docs/UsersGuide" "${FPRIME}/docs/${VERSION}"
cp -r "${FPRIME}/docs/INSTALL.md" "${FPRIME}/docs/Tutorials" "${FPRIME}/docs/UsersGuide" "${FPRIME}/docs/Design" "${FPRIME}/docs/${VERSION}"
REPLACE='| ['$VERSION' Documentation](https:\/\/nasa.github.io\/fprime\/'$VERSION') |\n'
else
echo "No version specified, updating local only"
Expand All @@ -65,22 +65,29 @@ function make_version
# Doxygen generation
(
cd "${FPRIME}"
DOCS_CACHE="${FPRIME}/docs-cache"
clobber "${DOXY_OUTPUT}"
echo "[INFO] Building fprime"
(
mkdir -p "${FPRIME}/build-fprime-automatic-docs"
cd "${FPRIME}/build-fprime-automatic-docs"
cmake "${FPRIME}" -DCMAKE_BUILD_TYPE=Release 1>/dev/null
)
fprime-util build "docs" --all -j32 1> /dev/null
rm -rf "${DOCS_CACHE}"

fprime-util generate --build-cache ${DOCS_CACHE} -DCMAKE_BUILD_TYPE=Release -DFPRIME_SKIP_TOOLS_VERSION_CHECK=ON 1>/dev/null
fprime-util build --build-cache ${DOCS_CACHE} --all -j32 1> /dev/null

if (( $? != 0 ))
then
echo "[ERROR] Failed to build fprime please generate build cache"
exit 2
fi
mkdir -p ${DOXY_OUTPUT}

# Replace version number in Doxyfile
if [[ "${VERSIONED_OUTPUT}" != "" ]]
then
sed -i "s/^PROJECT_NUMBER[ ]*=.*$/PROJECT_NUMBER=${VERSIONED_OUTPUT}/g" docs/doxygen/Doxyfile
fi

${DOXYGEN} "${FPRIME}/docs/doxygen/Doxyfile"
rm -r "${FPRIME}/build-fprime-automatic-docs"
rm -r "${DOCS_CACHE}"
) || exit 1

# CMake
Expand Down
40 changes: 31 additions & 9 deletions docs/doxygen/mainpage.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
\mainpage

This is the F´ automatically generated documentation. The below guides represent the software
description documentation (SDD) for the F´ components. Included in the Namespace and Classes sections
is the documentation of the C++ code.
This is the F´ automatically generated documentation.
The sidebar links point to the software description documentation (SDD) for the F´ components.
The Namespace and Classes sections link to the documentation of the C++ code.



\page Fw Fw Components, Ports, and Classes
Expand Down Expand Up @@ -57,12 +58,28 @@ command and data handling components used for more complete applications.

\subpage SvcAssertFatalAdapterComponent

\subpage SvcBufferAccumulatorComponent

\subpage SvcBufferManagerComponent

\subpage SvcBufferRepeaterComponent

\subpage SvcCmdDispatcherComponent

\subpage SvcCmdSequencerComponent

\subpage SvcCmdSequencerFormats

\subpage SvcCmdSplitter

\subpage SvcComLoggerComponent

\subpage SvcComQueueComponent

\subpage SvcComSplitterComponent

\subpage SvcComStubComponent

\subpage SvcDeframerComponent

\subpage SvcFatalHandlerComponent
Expand All @@ -81,12 +98,8 @@ command and data handling components used for more complete applications.

\subpage SvcGenericHubComponent

\subpage SvcGenericRepeaterComponent

\subpage SvcHealthComponent

\subpage SvcLinuxTimeComponent

\subpage SvcPassiveConsoleTextLoggerComponent

\subpage SvcPingPort
Expand All @@ -95,14 +108,20 @@ command and data handling components used for more complete applications.

\subpage SvcPolyPort

\subpage SvcPosixTime

\subpage SvcPrmDbComponent

\subpage SvcPassiveRateGroupComponent

\subpage SvcRateGroupDriverComponent

\subpage SvcSchedPort

\subpage SvcStaticMemoryComponent

\subpage SvcSystemResourcesComponent

\subpage SvcTlmChanComponent

\subpage SvcTlmPacketizerComponent
Expand All @@ -124,15 +143,16 @@ functions.

\subpage DrvIp

\subpage DrvStreamCrossover

\subpage DrvTcpClient

\subpage DrvTcpServer

\subpage DrvUartFramerComponent

\subpage DrvUdp



\page Utils Utils Classes

The Utils package provides classes for general applications in F´ projects. These classes are for
Expand All @@ -145,3 +165,5 @@ a variety of purposes.
\subpage UtilsRateLimiterClass

\subpage UtilsTokenBucketClass

\subpage UtilsTypesLibrary

0 comments on commit ec1a9b9

Please sign in to comment.