Skip to content

Commit 0c132ab

Browse files
authored
Fix the docs generation for the Python module (#1276)
1 parent 9f9a0e6 commit 0c132ab

4 files changed

Lines changed: 117 additions & 191 deletions

File tree

doc/JSBSim.dox.in

Lines changed: 2 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,8 @@ INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/ \
793793
@CMAKE_CURRENT_SOURCE_DIR@/src/models/flight_control \
794794
@CMAKE_CURRENT_SOURCE_DIR@/src/models/atmosphere \
795795
@CMAKE_CURRENT_SOURCE_DIR@/src/models/propulsion \
796-
@CMAKE_CURRENT_SOURCE_DIR@/src/math
796+
@CMAKE_CURRENT_SOURCE_DIR@/src/math \
797+
@CMAKE_CURRENT_SOURCE_DIR@/src/simgear/props/props.hxx
797798

798799
# This tag can be used to specify the character encoding of the source files
799800
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1178,15 +1179,6 @@ HTML_COLORSTYLE_SAT = 128
11781179

11791180
HTML_COLORSTYLE_GAMMA = 140
11801181

1181-
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1182-
# page will contain the date and time when the page was generated. Setting this
1183-
# to YES can help to show when doxygen was last run and thus if the
1184-
# documentation is up to date.
1185-
# The default value is: NO.
1186-
# This tag requires that the tag GENERATE_HTML is set to YES.
1187-
1188-
HTML_TIMESTAMP = YES
1189-
11901182
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
11911183
# documentation will contain sections that can be hidden and shown after the
11921184
# page has loaded.
@@ -1457,17 +1449,6 @@ EXT_LINKS_IN_WINDOW = NO
14571449

14581450
FORMULA_FONTSIZE = 14
14591451

1460-
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
1461-
# generated for formulas are transparent PNGs. Transparent PNGs are not
1462-
# supported properly for IE 6.0, but are supported on all modern browsers.
1463-
#
1464-
# Note that when changing this option you need to delete any form_*.png files in
1465-
# the HTML output directory before the changes have effect.
1466-
# The default value is: YES.
1467-
# This tag requires that the tag GENERATE_HTML is set to YES.
1468-
1469-
FORMULA_TRANSPARENT = YES
1470-
14711452
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
14721453
# http://www.mathjax.org) which uses client side Javascript for the rendering
14731454
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
@@ -1746,16 +1727,6 @@ LATEX_BATCHMODE = NO
17461727

17471728
LATEX_HIDE_INDICES = NO
17481729

1749-
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
1750-
# code with syntax highlighting in the LaTeX output.
1751-
#
1752-
# Note that which sources are shown also depends on other settings such as
1753-
# SOURCE_BROWSER.
1754-
# The default value is: NO.
1755-
# This tag requires that the tag GENERATE_LATEX is set to YES.
1756-
1757-
LATEX_SOURCE_CODE = NO
1758-
17591730
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
17601731
# bibliography, e.g. plainnat, or ieeetr. See
17611732
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
@@ -1764,14 +1735,6 @@ LATEX_SOURCE_CODE = NO
17641735

17651736
LATEX_BIB_STYLE = plain
17661737

1767-
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
1768-
# page will contain the date and time when the page was generated. Setting this
1769-
# to NO can help when comparing the output of multiple runs.
1770-
# The default value is: NO.
1771-
# This tag requires that the tag GENERATE_LATEX is set to YES.
1772-
1773-
LATEX_TIMESTAMP = NO
1774-
17751738
#---------------------------------------------------------------------------
17761739
# Configuration options related to the RTF output
17771740
#---------------------------------------------------------------------------
@@ -1828,16 +1791,6 @@ RTF_STYLESHEET_FILE =
18281791

18291792
RTF_EXTENSIONS_FILE =
18301793

1831-
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
1832-
# with syntax highlighting in the RTF output.
1833-
#
1834-
# Note that which sources are shown also depends on other settings such as
1835-
# SOURCE_BROWSER.
1836-
# The default value is: NO.
1837-
# This tag requires that the tag GENERATE_RTF is set to YES.
1838-
1839-
RTF_SOURCE_CODE = NO
1840-
18411794
#---------------------------------------------------------------------------
18421795
# Configuration options related to the man page output
18431796
#---------------------------------------------------------------------------
@@ -1927,15 +1880,6 @@ GENERATE_DOCBOOK = NO
19271880

19281881
DOCBOOK_OUTPUT = docbook
19291882

1930-
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
1931-
# program listings (including syntax highlighting and cross-referencing
1932-
# information) to the DOCBOOK output. Note that enabling this will significantly
1933-
# increase the size of the DOCBOOK output.
1934-
# The default value is: NO.
1935-
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1936-
1937-
DOCBOOK_PROGRAMLISTING = NO
1938-
19391883
#---------------------------------------------------------------------------
19401884
# Configuration options for the AutoGen Definitions output
19411885
#---------------------------------------------------------------------------
@@ -2114,15 +2058,6 @@ EXTERNAL_PAGES = YES
21142058
# Configuration options related to the dot tool
21152059
#---------------------------------------------------------------------------
21162060

2117-
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
2118-
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
2119-
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
2120-
# disabled, but it is recommended to install and use dot, since it yields more
2121-
# powerful graphs.
2122-
# The default value is: YES.
2123-
2124-
CLASS_DIAGRAMS = YES
2125-
21262061
# You can include diagrams made with dia in doxygen documentation. Doxygen will
21272062
# then run dia to produce the diagram and insert it in the documentation. The
21282063
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
@@ -2155,23 +2090,6 @@ HAVE_DOT = YES
21552090

21562091
DOT_NUM_THREADS = 0
21572092

2158-
# When you want a differently looking font in the dot files that doxygen
2159-
# generates you can specify the font name using DOT_FONTNAME. You need to make
2160-
# sure dot is able to find the font, which can be done by putting it in a
2161-
# standard location or by setting the DOTFONTPATH environment variable or by
2162-
# setting DOT_FONTPATH to the directory containing the font.
2163-
# The default value is: Helvetica.
2164-
# This tag requires that the tag HAVE_DOT is set to YES.
2165-
2166-
DOT_FONTNAME = Helvetica
2167-
2168-
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
2169-
# dot graphs.
2170-
# Minimum value: 4, maximum value: 24, default value: 10.
2171-
# This tag requires that the tag HAVE_DOT is set to YES.
2172-
2173-
DOT_FONTSIZE = 10
2174-
21752093
# By default doxygen will tell dot to use the default font as specified with
21762094
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
21772095
# the path where dot can find it using this tag.
@@ -2384,18 +2302,6 @@ DOT_GRAPH_MAX_NODES = 50
23842302

23852303
MAX_DOT_GRAPH_DEPTH = 2
23862304

2387-
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2388-
# background. This is disabled by default, because dot on Windows does not seem
2389-
# to support this out of the box.
2390-
#
2391-
# Warning: Depending on the platform used, enabling this option may lead to
2392-
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2393-
# read).
2394-
# The default value is: NO.
2395-
# This tag requires that the tag HAVE_DOT is set to YES.
2396-
2397-
DOT_TRANSPARENT = NO
2398-
23992305
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
24002306
# files in one run (i.e. multiple -o and -T options on the command line). This
24012307
# makes dot run faster, but since only newer versions of dot (>1.8.10) support

doc/python/sphinx/conf.py.in

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ import sys
1414
# add these directories to sys.path here. If the directory is relative to the
1515
# documentation root, use os.path.abspath to make it absolute.
1616

17-
sys.path.insert(0, '${CMAKE_BINARY_DIR}/tests')
18-
1917
try:
20-
import jsbsim._jsbsim
18+
import jsbsim
2119
except ModuleNotFoundError:
22-
# If the JSBSim module cannot be loaded from the `tests` folder then
23-
# restore `sys.path` to its inital value and use the globally installed
24-
# JSBSim module, if there is one.
25-
sys.path = sys.path[1:]
20+
# If the JSBSim module is not installed gloablly then use the one from the `tests`
21+
# folder.
22+
sys.path.insert(0, '${CMAKE_BINARY_DIR}/tests')
23+
2624

2725
# -- Project information -----------------------------------------------------
2826

@@ -66,7 +64,7 @@ master_doc = 'index'
6664
#
6765
# This is also used if you do content translation via gettext catalogs.
6866
# Usually you set "language" from the command line for these cases.
69-
language = None
67+
language = 'en'
7068

7169
# List of patterns, relative to source directory, that match files and
7270
# directories to ignore when looking for source files.
@@ -94,7 +92,6 @@ html_theme_options = {
9492
"github_banner": True,
9593
"github_user" : "JSBSim-Team",
9694
"github_repo": "jsbsim",
97-
"travis_button" : True,
9895
}
9996

10097
# Add any paths that contain custom static files (such as style sheets) here,

python/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ set_source_files_properties(${JSBSIM_PYX} PROPERTIES CYTHON_IS_CXX TRUE
1616
# Autogenerate the Python module doc strings from Doxygen docs
1717
if(DOXYGEN_FOUND AND BUILD_DOCS)
1818
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxy2PyDocStrings.py
19-
doxy2pydocs.py)
20-
execute_process(COMMAND ${Python3_EXECUTABLE} python/doxy2pydocs.py
19+
doxy_to_pyx.py COPYONLY)
20+
execute_process(COMMAND ${Python3_EXECUTABLE} python/doxy_to_pyx.py --pyxfile=${JSBSIM_PYX} --doxdir=${CMAKE_BINARY_DIR}/documentation
2121
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
2222

2323
# Prepare the sphinx build files

0 commit comments

Comments
 (0)