Skip to content

Commit 1dea874

Browse files
richiwareEduPonz
andcommitted
Upgrade python requirements and remove all warnings (#747)
* Refs #20631. Update requirements and fix warnings Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631. Add support for CMAKE_COMPILE_WARNING_AS_ERROR Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631. Fix getting fastdds branch in readthedocs Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631. Move note by suggestion Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631. Fix idl Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631. Remove forgotten lines Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631. Fixes Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> * Refs #20631: Avoid duplicated transport_id in XMLTester Signed-off-by: eduponz <eduardoponz@eprosima.com> --------- Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Signed-off-by: eduponz <eduardoponz@eprosima.com> Co-authored-by: eduponz <eduardoponz@eprosima.com>
1 parent ca6618a commit 1dea874

75 files changed

Lines changed: 244 additions & 177 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ string(REGEX REPLACE "^version = u'([0-9]+.[0-9]+.[0-9]+)'"
2929

3030
project(fastdds-docs VERSION "${LIB_VERSION_STR}" LANGUAGES C CXX)
3131

32+
# In case CMake version less than 3.24, add the option CMAKE_COMPILE_WARNING_AS_ERROR.
33+
if (${CMAKE_VERSION} VERSION_LESS "3.24")
34+
option(CMAKE_COMPILE_WARNING_AS_ERROR "Treat warnings as errors" OFF)
35+
endif()
36+
3237

3338
####################################################################################################
3439
# Build Doxygen documentation
@@ -125,7 +130,9 @@ if (BUILD_DOCUMENTATION)
125130
# Generate the sphinx documentation
126131
add_custom_target(Sphinx ALL
127132
COMMAND
128-
${SPHINX_EXECUTABLE} -b ${FASTDDS_DOCS_BUILDER}
133+
${SPHINX_EXECUTABLE}
134+
$<$<BOOL:${CMAKE_COMPILE_WARNING_AS_ERROR}>:-W>
135+
-b ${FASTDDS_DOCS_BUILDER}
129136
# Tell Breathe where to find the Doxygen output
130137
-D breathe_projects.FastDDS=${DOXYGEN_OUTPUT_DIR}/xml
131138
${PYTHON_EXTRA_FLAG}

code/DynamicTypesIDLExamples.idl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct AliasStruct
110110
//!--IDL_SEQUENCES
111111
struct SequenceStruct
112112
{
113-
sequence<MyBitmask> bitmask_sequence;
113+
sequence<MyBitMask> bitmask_sequence;
114114
sequence<short, 5> short_sequence;
115115
};
116116
//!--
@@ -132,18 +132,18 @@ struct MapStruct
132132

133133
//!--IDL_STRUCT
134134
struct InnerStruct
135-
{
135+
{
136136
@id(0x10) long first;
137137
};
138138

139139
struct ParentStruct
140-
{
140+
{
141141
float first;
142142
long long second;
143143
};
144144

145145
struct ComplexStruct : ParentStruct
146-
{
146+
{
147147
InnerStruct complex_member;
148148
};
149149
//!--
@@ -170,7 +170,7 @@ union ComplexUnion switch (long)
170170

171171
//!--IDL_BITSET
172172
bitset ParentBitSet
173-
{
173+
{
174174
bitfield<3> a;
175175
bitfield<1> b;
176176
bitfield<4>;
@@ -179,7 +179,7 @@ bitset ParentBitSet
179179
};
180180

181181
bitset ChildBitSet : ParentBitSet
182-
{
182+
{
183183
bitfield<1> e;
184184
bitfield<20, unsigned long> f;
185185
};

code/XMLTester.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
<!-->CONF-COMMON-RECEPTION-THREADS-SETTINGS<-->
246246
<transport_descriptors>
247247
<transport_descriptor>
248-
<transport_id>Test</transport_id>
248+
<transport_id>test_transport</transport_id>
249249
<type>UDPv4</type>
250250
<reception_threads>
251251
<reception_thread port="20000">

colcon.meta

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
names:
22
fastdds:
33
cmake-args:
4-
- "-DSECURITY=ON"
4+
- -DSECURITY=ON
55
fastdds_python:
66
cmake-args:
7-
- "-DBUILD_DOCUMENTATION=ON"
7+
- -DBUILD_DOCUMENTATION=ON
88
fastdds-docs:
99
cmake-args:
10-
- "-DBUILD_DOCUMENTATION=ON"
11-
- "-DCOMPILE_TESTS=ON"
10+
- -DBUILD_DOCUMENTATION=ON
11+
- -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
12+
- -DCOMPILE_TESTS=ON

docs/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,15 @@ def get_git_branch():
102102
# Invoke git to get the current branch which we use to get the theme
103103
try:
104104
p = subprocess.Popen(
105-
['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
105+
['git', 'rev-parse', '--verify', 'HEAD'],
106+
stdout=subprocess.PIPE,
107+
cwd=path_to_here
108+
)
109+
110+
commit = p.communicate()[0].decode().rstrip()
111+
112+
p = subprocess.Popen(
113+
['git', 'name-rev', '--name-only', commit],
106114
stdout=subprocess.PIPE,
107115
cwd=path_to_here
108116
)

docs/fastdds/api_reference/api_reference.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ For more information about the API reference, please refer to
1515
`Fast DDS API reference <https://www.eprosima.com/docs/fast-rtps/latest/API>`_.
1616

1717
.. toctree::
18+
:titlesonly:
1819

19-
/fastdds/api_reference/dds_pim/dds_pim
20-
/fastdds/api_reference/rtps/rtps
21-
/fastdds/api_reference/transport/transport
22-
/fastdds/api_reference/log/log
23-
/fastdds/api_reference/statistics/statistics
20+
/fastdds/api_reference/dds_pim/dds_pim
21+
/fastdds/api_reference/rtps/rtps
22+
/fastdds/api_reference/transport/transport
23+
/fastdds/api_reference/log/log
24+
/fastdds/api_reference/statistics/statistics

docs/fastdds/api_reference/dds_pim/core/condition/basecondition.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Condition
22
=========
33

44
.. toctree::
5+
:titlesonly:
56

67
/fastdds/api_reference/dds_pim/core/condition/condition.rst
78
/fastdds/api_reference/dds_pim/core/condition/conditionseq.rst

docs/fastdds/api_reference/dds_pim/core/core.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Core
22
====
33

44
.. toctree::
5+
:titlesonly:
56

67
/fastdds/api_reference/dds_pim/core/entity.rst
78
/fastdds/api_reference/dds_pim/core/domainentity.rst

docs/fastdds/api_reference/dds_pim/core/policy/policy.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Policy
22
======
33

44
.. toctree::
5+
:titlesonly:
56

67
/fastdds/api_reference/dds_pim/core/policy/datarepresentationid.rst
78
/fastdds/api_reference/dds_pim/core/policy/datarepresentationqospolicy.rst

docs/fastdds/api_reference/dds_pim/core/status/status.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Status
22
======
33

44
.. toctree::
5+
:titlesonly:
56

67
/fastdds/api_reference/dds_pim/core/status/basestatus.rst
78
/fastdds/api_reference/dds_pim/core/status/deadlinemissedstatus.rst

0 commit comments

Comments
 (0)