Skip to content

Commit 92e84af

Browse files
Check subprocess return codes on RDT generation (#795) (#798)
* Check subprocess return codes on RDT generation (#795) Signed-off-by: eduponz <eduardoponz@eprosima.com> (cherry picked from commit 0974196) Check suprocess return codes on RDT generation (#795) (#796) * Check subprocess return codes on RDT generation (#795) Signed-off-by: eduponz <eduardoponz@eprosima.com> (cherry picked from commit 0974196) * Refs #21114: Remove unsued Doxyfile EXAMPLE_PATH Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #21114: Fix Fast DDS Python API reference warnings regarding Qos aliases Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #21114: Fail generation when docutils errors Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #21114: Use correct branches of Fast DDS and Fast DDS Python in RTD Signed-off-by: eduponz <eduardoponz@eprosima.com> --------- Signed-off-by: eduponz <eduardoponz@eprosima.com> Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com> * Set English as doc language Signed-off-by: eduponz <eduardoponz@eprosima.com> --------- Signed-off-by: eduponz <eduardoponz@eprosima.com> Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com>
1 parent 22e121a commit 92e84af

9 files changed

Lines changed: 25 additions & 32 deletions

File tree

code/doxygen-config.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ EXCLUDE_SYMBOLS =
985985
# that contain example code fragments that are included (see the \include
986986
# command).
987987

988-
EXAMPLE_PATH = @PROJECT_SOURCE_DIR@/code
988+
EXAMPLE_PATH =
989989

990990
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
991991
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and

docs/conf.py

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -216,22 +216,13 @@ def configure_doxyfile(
216216
fastdds_branch = os.environ.get('FASTDDS_BRANCH', None)
217217

218218
# First try to checkout to ${FASTDDS_BRANCH}
219-
# Else try with current documentation branch
220-
# Else checkout to master
219+
# Else checkout to 2.10.x
221220
if (fastdds_branch and
222221
fastdds.refs.__contains__('origin/{}'.format(fastdds_branch))):
223222
fastdds_branch = 'origin/{}'.format(fastdds_branch)
224-
elif (docs_branch and
225-
fastdds.refs.__contains__('origin/{}'.format(docs_branch))):
226-
fastdds_branch = 'origin/{}'.format(docs_branch)
227223
else:
228-
print(
229-
'Fast DDS does not have either "{}" or "{}" branches'.format(
230-
fastdds_branch,
231-
docs_branch
232-
)
233-
)
234-
fastdds_branch = 'origin/master'
224+
fastdds_branch = 'origin/2.10.x'
225+
print(f'Fast DDS branch is not set by env var. Using "{fastdds_branch}"')
235226

236227
# Actual checkout
237228
print('Checking out Fast DDS branch "{}"'.format(fastdds_branch))
@@ -248,20 +239,14 @@ def configure_doxyfile(
248239
fastdds_python_branch = os.environ.get('FASTDDS_PYTHON_BRANCH', None)
249240

250241
# First try to checkout to ${FASTDDS_PYTHON_BRANCH}
251-
# Else try with current documentation branch
252-
# Else checkout to master
242+
# Else checkout to 1.2.x
253243
if (fastdds_python_branch and
254244
fastdds_python.refs.__contains__(
255245
'origin/{}'.format(fastdds_python_branch))):
256246
fastdds_python_branch = 'origin/{}'.format(fastdds_python_branch)
257-
elif (docs_branch and
258-
fastdds_python.refs.__contains__('origin/{}'.format(docs_branch))):
259-
fastdds_python_branch = 'origin/{}'.format(docs_branch)
260247
else:
261-
print(
262-
'Fast DDS Python does not have either "{}" or "{}" branches'
263-
.format(fastdds_python_branch, docs_branch))
264-
fastdds_python_branch = 'origin/main'
248+
fastdds_python_branch = 'origin/1.2.x'
249+
print(f'Fast DDS Python branch is not set by env var. Using "{fastdds_python_branch}"')
265250

266251
# Actual checkout
267252
print('Checking out Fast DDS Python branch "{}"'.format(
@@ -281,10 +266,13 @@ def configure_doxyfile(
281266
project_source_dir
282267
)
283268
# Generate doxygen documentation
284-
subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
269+
doxygen_ret = subprocess.call('doxygen {}'.format(doxyfile_out), shell=True)
270+
if doxygen_ret != 0:
271+
print('Doxygen failed with return code {}'.format(doxygen_ret))
272+
sys.exit(doxygen_ret)
285273

286274
# Generate SWIG code.
287-
subprocess.call('swig -python -doxygen -I{}/include \
275+
swig_ret = subprocess.call('swig -python -doxygen -I{}/include \
288276
-outdir {}/fastdds_python/src/swig -c++ -interface \
289277
_fastdds_python -o \
290278
{}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \
@@ -294,6 +282,10 @@ def configure_doxyfile(
294282
fastdds_python_repo_name,
295283
fastdds_python_repo_name
296284
), shell=True)
285+
if swig_ret != 0:
286+
print('SWIG failed with return code {}'.format(swig_ret))
287+
sys.exit(swig_ret)
288+
297289
fastdds_python_imported_location = '{}/fastdds_python/src/swig'.format(
298290
fastdds_python_repo_name)
299291
autodoc_mock_imports = ["_fastdds_python"]
@@ -389,7 +381,7 @@ def configure_doxyfile(
389381
#
390382
# This is also used if you do content translation via gettext catalogs.
391383
# Usually you set "language" from the command line for these cases.
392-
language = None
384+
language = 'en'
393385

394386
# There are two options for replacing |today|: either, you set today to some
395387
# non-false value, then it is used:

docs/docutils.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[general]
2+
halt_level: 2

docs/fastdds/python_api_reference/dds_pim/domain/domainparticipantqos.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ DomainParticipantQos
88
.. autoclass:: fastdds.DomainParticipantQos
99

1010

11-
.. TODO
12-
.. autoclass:: fastdds.PARTICIPANT_QOS_DEFAULT
11+
.. autodata:: fastdds.PARTICIPANT_QOS_DEFAULT

docs/fastdds/python_api_reference/dds_pim/publisher/datawriterqos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ DataWriterQos
77

88
.. autoclass:: fastdds.DataWriterQos
99

10-
.. autoclass:: fastdds.DATAWRITER_QOS_DEFAULT
10+
.. autodata:: fastdds.DATAWRITER_QOS_DEFAULT

docs/fastdds/python_api_reference/dds_pim/publisher/publisherqos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ PublisherQos
77

88
.. autoclass:: fastdds.PublisherQos
99

10-
.. autoclass:: fastdds.PUBLISHER_QOS_DEFAULT
10+
.. autodata:: fastdds.PUBLISHER_QOS_DEFAULT

docs/fastdds/python_api_reference/dds_pim/subscriber/datareaderqos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ DataReaderQos
77

88
.. autoclass:: fastdds.DataReaderQos
99

10-
.. autoclass:: fastdds.DATAREADER_QOS_DEFAULT
10+
.. autodata:: fastdds.DATAREADER_QOS_DEFAULT

docs/fastdds/python_api_reference/dds_pim/subscriber/subscriberqos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ SubscriberQos
77

88
.. autoclass:: fastdds.SubscriberQos
99

10-
.. autoclass:: fastdds.SUBSCRIBER_QOS_DEFAULT
10+
.. autodata:: fastdds.SUBSCRIBER_QOS_DEFAULT

docs/fastdds/python_api_reference/dds_pim/topic/topicqos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ TopicQos
77

88
.. autoclass:: fastdds.TopicQos
99

10-
.. autoclass:: fastdds.TOPIC_QOS_DEFAULT
10+
.. autodata:: fastdds.TOPIC_QOS_DEFAULT

0 commit comments

Comments
 (0)