Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #39540 from m-kuhn/test_doxy_layout
Test doxy layout
  • Loading branch information
m-kuhn committed Oct 24, 2020
2 parents 73baebb + 71a11c8 commit a720a18
Show file tree
Hide file tree
Showing 43 changed files with 105 additions and 77 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/code_layout.yml
Expand Up @@ -38,8 +38,8 @@ jobs:
run: |
mkdir build
cd build
cmake -DWITH_SERVER=ON -DUSE_CCACHE=OFF -DWITH_CORE=OFF -DWITH_APIDOC=ON -DWITH_ASTYLE=ON -DENABLE_TESTS=ON -DWITH_DOT=NO ..
make -j3
cmake -DWITH_SERVER=ON -DUSE_CCACHE=OFF -DWITH_CORE=OFF -DWITH_APIDOC=ON -DWITH_ASTYLE=ON -DENABLE_TESTS=ON -DWITH_DOT=NO -DWERROR=ON ..
make -j3 apidoc
- name: Run Tests
run: cd build && ctest -V -R PyQgsDocCoverage

Expand Down Expand Up @@ -94,7 +94,8 @@ jobs:
- name: Install Requirements
run: |
sudo apt install -y \
expect
expect \
silversearcher-ag
- name: Doxygen Layout Test
run: ./tests/code_layout/test_doxygen_layout.sh

Expand Down
25 changes: 2 additions & 23 deletions cmake_templates/Doxyfile.in
Expand Up @@ -240,12 +240,6 @@ TAB_SIZE = 2

ALIASES =

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.

TCL_SUBST =

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
Expand Down Expand Up @@ -753,7 +747,7 @@ WARN_NO_PARAMDOC = NO
# a warning is encountered.
# The default value is: NO.

WARN_AS_ERROR = NO
WARN_AS_ERROR = @DOXYGEN_WARN_AS_ERROR@

# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
Expand Down Expand Up @@ -1641,7 +1635,7 @@ COMPACT_LATEX = NO
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.

PAPER_TYPE = a4wide
PAPER_TYPE = a4

# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. The package can be specified just
Expand Down Expand Up @@ -2126,12 +2120,6 @@ EXTERNAL_GROUPS = YES

EXTERNAL_PAGES = YES

# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of 'which perl').
# The default file (with absolute path) is: /usr/bin/env perl.

PERL_PATH = /usr/bin/env perl

#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
Expand All @@ -2145,15 +2133,6 @@ PERL_PATH = /usr/bin/env perl

CLASS_DIAGRAMS = @WITH_DOT@

# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.

MSCGEN_PATH =

# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
Expand Down
11 changes: 8 additions & 3 deletions doc/CMakeLists.txt
Expand Up @@ -142,16 +142,21 @@ IF(WITH_APIDOC)

STRING(REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")

IF(WERROR)
SET (DOXYGEN_WARN_AS_ERROR "YES")
ELSE(WERROR)
SET (DOXYGEN_WARN_AS_ERROR "NO")
ENDIF(WERROR)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

SET (DOXYGEN_ON_DEMAND FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be build on demand only")
SET (DOXYGEN_ON_DEMAND FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built on demand through the target apidoc only. If set to false it is added to the target ALL.")

IF(DOXYGEN_ON_DEMAND)
ADD_CUSTOM_TARGET(apidoc DEPENDS ${QHP_FILES})
ADD_CUSTOM_TARGET(apidoc DEPENDS ${QHP_FILES} version)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api OPTIONAL)
ELSE(DOXYGEN_ON_DEMAND)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api)
ADD_CUSTOM_TARGET(apidoc ALL DEPENDS ${QHP_FILES})
ADD_CUSTOM_TARGET(apidoc ALL DEPENDS ${QHP_FILES} version)
ENDIF(DOXYGEN_ON_DEMAND)
ADD_CUSTOM_COMMAND(
OUTPUT ${QHP_FILES}
Expand Down
4 changes: 2 additions & 2 deletions external/mdal/api/mdal.h
Expand Up @@ -234,10 +234,10 @@ MDAL_EXPORT void MDAL_CloseMesh( MDAL_MeshH mesh );
/**
* Creates a empty mesh in memory
*
* \since MDAL 0.7
*
* \note the mesh is editable (vertices and faces can be added, see MDAL_M_addVertices() and MDAL_M_addFaces()),
* and can be saved with MDAL_SaveMesh()
*
* \since MDAL 0.7
*/
MDAL_EXPORT MDAL_MeshH MDAL_CreateMesh( MDAL_DriverH driver );

Expand Down
Expand Up @@ -49,7 +49,7 @@ Adds break lines from a vector layer, return ``True`` if successful.

:param lineFeatureIterator: the feature iterator of break lines to insert
:param valueAttribute: the index of the attribute that represents the value of vertices, if -1 uses Z coordinate of vertices
:param transform: the coordinates transform used to transform coordinates
:param transformContext: the coordinates transform context used to transform coordinates
:param feedback: feedback argument may be specified to allow cancellation and progress reports
:param featureCount: the count of feature to allow progress report of the feedback

Expand Down
1 change: 1 addition & 0 deletions python/core/auto_generated/mesh/qgsmeshdataset.sip.in
Expand Up @@ -419,6 +419,7 @@ Constructs a valid metadata object
:param referenceTime: reference time of the dataset group
:param isTemporal: weither the dataset group is temporal (contains time-related dataset)
:param extraOptions: dataset's extra options stored by the provider. Usually contains the name, time value, time units, data file vendor, ...
:param uri: The uri of the dataset
%End

QString name() const;
Expand Down
6 changes: 4 additions & 2 deletions python/core/auto_generated/mesh/qgsmeshlayer.sip.in
Expand Up @@ -361,7 +361,7 @@ See :py:func:`QgsMeshDatasetMetadata.isVector()` to check if the returned value
returns invalid block for DataOnFaces and DataOnVertices.

:param index: index of the dataset
:param valueIndex: index of the value
:param faceIndex: index of the face
:param count: number of values to return

.. note::
Expand All @@ -387,7 +387,7 @@ returns invalid block for DataOnFaces and DataOnVertices.
Returns whether the faces are active for particular dataset

:param index: index of the dataset
:param valueIndex: index of the value
:param faceIndex: index of the face
:param count: number of values to return

.. note::
Expand Down Expand Up @@ -495,6 +495,7 @@ Returns dataset index from datasets group depending on the time range.
If the temporal properties is not active, returns invalid dataset index. This method is used for rendering mesh layer.

:param timeRange: the time range
:param datasetGroupIndex: the index of the dataset group

:return: dataset index

Expand All @@ -518,6 +519,7 @@ Returns dataset index from datasets group depending on the relative time from th
Dataset index is valid even the temporal properties is inactive. This method is used for calculation on mesh layer.

:param relativeTime: the relative from the mesh layer reference time
:param datasetGroupIndex: the index of the dataset group

:return: dataset index

Expand Down
Expand Up @@ -532,18 +532,18 @@ Raises a QgsProviderConnectionException if any errors are encountered.
the default implementation creates a temporary vector layer, providers may
choose to override this method for a greater efficiency.

.. versionadded:: 3.16

:raises :: py:class:`QgsProviderConnectionException`

.. versionadded:: 3.16
%End

virtual QList< QgsVectorDataProvider::NativeType > nativeTypes() const throw( QgsProviderConnectionException ) = 0;
%Docstring
Returns a list of native types supported by the connection.

.. versionadded:: 3.16

:raises :: py:class:`QgsProviderConnectionException`

.. versionadded:: 3.16
%End

QString providerKey() const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsdataitem.sip.in
Expand Up @@ -1002,7 +1002,7 @@ Constructor for QgsFieldsItem, with the specified ``parent`` item.

The ``path`` argument gives the item path in the browser tree. The ``path`` string can take any form,
but QgsDataItem items pointing to different logical locations should always use a different item ``path``.
The \connectionUri argument is the connection part of the layer URI that it is used internally to create
The ``connectionUri`` argument is the connection part of the layer URI that it is used internally to create
a connection and retrieve fields information.
The ``providerKey`` string can be used to specify the key for the QgsDataItemProvider that created this item.
The ``schema`` and ``tableName`` are used to retrieve the layer and field information from the ``connectionUri``.
Expand Down
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsmapclippingutils.sip.in
Expand Up @@ -67,6 +67,7 @@ The returned coordinates are in painter coordinates for the destination ``contex
:param regions: list of clip regions which apply to the layer
:param context: a render context
:param shouldClip: will be set to ``True`` if the clipping path should be applied
:param layerType: the layer type to filter

:return: combined painter clipping region for use when rendering maps
%End
Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/qgsproject.sip.in
Expand Up @@ -527,7 +527,7 @@ Reads a double from the specified ``scope`` and ``key``.

:param scope: entry scope (group) name
:param key: entry key name. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values.
:param default: value to return if the specified ``key`` does not exist within the ``scope``.
:param def: default value to return if the specified ``key`` does not exist within the ``scope``.

:return: - entry value as double from ``scope`` given its ``key``
- ok: set to ``True`` if key exists and has been successfully retrieved as a double
Expand All @@ -539,7 +539,7 @@ Reads a boolean from the specified ``scope`` and ``key``.

:param scope: entry scope (group) name
:param key: entry key name. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values.
:param default: value to return if the specified ``key`` does not exist within the ``scope``.
:param def: default value to return if the specified ``key`` does not exist within the ``scope``.

:return: - entry value as boolean from ``scope`` given its ``key``
- ok: set to ``True`` if key exists and has been successfully retrieved as a boolean
Expand Down
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsprovidermetadata.sip.in
Expand Up @@ -55,6 +55,7 @@ Constructs driver metadata with selected capabilities
:param name: name/key of the driver
:param description: short description of the driver
:param capabilities: driver's capabilities
:param writeDatasetOnFileSuffix: suffix used to write datasets on file
%End

MeshDriverCapabilities capabilities() const;
Expand Down
5 changes: 2 additions & 3 deletions python/core/auto_generated/qgsruntimeprofiler.sip.in
Expand Up @@ -67,9 +67,8 @@ Returns a list of all child groups with the specified ``parent``.
void start( const QString &name, const QString &group = "startup" );
%Docstring
Start a profile event with the given name.

:param name: The name of the profile event. Will have the name of
the active group appended after ending.
The ``name`` of the profile event. Will have the name of
the active ``group`` appended after ending.
%End

void end( const QString &group = "startup" );
Expand Down
Expand Up @@ -446,9 +446,9 @@ Interpolates a list which starts with the interpolate function.
%Docstring
Parses a ``color`` in one of these supported formats:

- #fff or #ffffff
- hsl(30, 19%, 90%) or hsla(30, 19%, 90%, 0.4)
- rgb(10, 20, 30) or rgba(10, 20, 30, 0.5)
- \c \#fff or \c \#ffffff
- ``hsl(30, 19%, 90%)`` or ``hsla(30, 19%, 90%, 0.4)``
- ``rgb(10, 20, 30)`` or ``rgba(10, 20, 30, 0.5)``

Returns an invalid color if the color could not be parsed.

Expand Down
Expand Up @@ -53,7 +53,7 @@ Returns a list of the :py:func:`QgsCodeEditorColorScheme.id()` values for all re
%Docstring
Returns the color scheme with matching ``id``.

If the specified scheme \id does not exist then the default scheme will be returned instead.
If the specified scheme ``id`` does not exist then the default scheme will be returned instead.
%End

};
Expand Down
6 changes: 5 additions & 1 deletion python/gui/auto_generated/qgsdoublevalidator.sip.in
Expand Up @@ -14,7 +14,7 @@ class QgsDoubleValidator : QRegularExpressionValidator
%Docstring

QgsDoubleValidator is a QLineEdit Validator that combines QDoubleValidator
and QRegularExpressionValidator to allow user to enter double with both
and QRegularExpressionValidator to allow users to enter doubles with both
local and C interpretation as a fallback.

.. versionadded:: 3.14
Expand All @@ -36,6 +36,8 @@ Constructor for QgsDoubleValidator.

:param bottom: the minimal range limit accepted by the validator
:param top: the maximal range limit accepted by the validator
:param parent: parent object
:param expression: custom regular expression
%End

QgsDoubleValidator( double bottom, double top, QObject *parent );
Expand All @@ -44,6 +46,7 @@ Constructor for QgsDoubleValidator.

:param bottom: the minimal range limit accepted by the validator
:param top: the maximal range limit accepted by the validator
:param parent: parent object
%End

QgsDoubleValidator( double bottom, double top, int decimal, QObject *parent );
Expand All @@ -53,6 +56,7 @@ Constructor for QgsDoubleValidator.
:param bottom: the minimal range limit accepted by the validator
:param top: the maximal range limit accepted by the validator
:param decimal: the number of decimal accepted by the validator
:param parent: parent object
%End


Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsnewvectortabledialog.sip.in
Expand Up @@ -35,7 +35,7 @@ The actual creation of the table is delegated to the connections API method
%Docstring
QgsNewVectorTableDialog constructor

:param connection: DB connection, ownership is NOT transferred
:param conn: DB connection, ownership is NOT transferred
:param parent: optional parent
%End

Expand Down
5 changes: 1 addition & 4 deletions src/3d/qgs3dexportobject.h
Expand Up @@ -52,10 +52,7 @@ class _3D_EXPORT Qgs3DExportObject
/**
* \brief Qgs3DExportObject
* Constructs an export object that will be filled with coordinates later
* \param parentName
* The name of the parent (Will be useful to define scene hierarchy)
* \param parent
* The parent QObject (we use this to delete the Qgs3DExportObject instance once the exporter instance is deallocated)
* \param name The name of the parent (Will be useful to define scene hierarchy)
*/
Qgs3DExportObject( const QString &name ) : mName( name ) { }

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/mesh/qgsmeshtriangulation.h
Expand Up @@ -64,7 +64,7 @@ class ANALYSIS_EXPORT QgsMeshTriangulation : public QObject
* Adds break lines from a vector layer, return TRUE if successful.
* \param lineFeatureIterator the feature iterator of break lines to insert
* \param valueAttribute the index of the attribute that represents the value of vertices, if -1 uses Z coordinate of vertices
* \param transform the coordinates transform used to transform coordinates
* \param transformContext the coordinates transform context used to transform coordinates
* \param feedback feedback argument may be specified to allow cancellation and progress reports
* \param featureCount the count of feature to allow progress report of the feedback
*
Expand Down
4 changes: 4 additions & 0 deletions src/analysis/processing/qgsalgorithmtinmeshcreation.cpp
Expand Up @@ -23,6 +23,8 @@
#include "qgsmeshlayer.h"
#include "qgis.h"

///@cond PRIVATE

QString QgsTinMeshCreationAlgorithm::group() const
{
return QObject::tr( "Mesh" );
Expand Down Expand Up @@ -206,3 +208,5 @@ bool QgsTinMeshCreationAlgorithm::canExecute( QString *errorMessage ) const

return true;
}

///@endcond PRIVATE
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolselectutils.h
Expand Up @@ -74,8 +74,8 @@ namespace QgsMapToolSelectUtils
* must be in terms of the canvas coordinate system.
* \param modifiers Keyboard modifiers are used to determine the current selection
* operations (add, subtract, contains)
* \since QGIS 2.16
* \see selectSingleFeature()
* \since QGIS 2.16
*/
void selectMultipleFeatures( QgsMapCanvas *canvas, const QgsGeometry &selectGeometry, Qt::KeyboardModifiers modifiers );

Expand Down
4 changes: 2 additions & 2 deletions src/core/labeling/qgspallabeling.h
Expand Up @@ -268,7 +268,7 @@ class CORE_EXPORT QgsPalLayerSettings
*
* \deprecated Use QgsLabeling::LinePlacementFlags instead
*/
enum Q_DECL_DEPRECATED LinePlacementFlags
enum LinePlacementFlags
{
OnLine = 1, //!< Labels can be placed directly over a line feature.
AboveLine = 2, /**< Labels can be placed above a line feature. Unless MapOrientation is also specified this mode
Expand Down Expand Up @@ -305,7 +305,7 @@ class CORE_EXPORT QgsPalLayerSettings
//TODO QGIS 4.0 - Remove -- moved to QgsLabelEngineObstacleSettings

//! \deprecated use QgsLabelLineSettings::DirectionSymbolPlacement instead
enum Q_DECL_DEPRECATED DirectionSymbols
enum DirectionSymbols
{
SymbolLeftRight, //!< Place direction symbols on left/right of label
SymbolAbove, //!< Place direction symbols on above label
Expand Down
1 change: 1 addition & 0 deletions src/core/mesh/qgsmeshdataset.h
Expand Up @@ -374,6 +374,7 @@ class CORE_EXPORT QgsMeshDatasetGroupMetadata
* \param referenceTime reference time of the dataset group
* \param isTemporal weither the dataset group is temporal (contains time-related dataset)
* \param extraOptions dataset's extra options stored by the provider. Usually contains the name, time value, time units, data file vendor, ...
* \param uri The uri of the dataset
*/
QgsMeshDatasetGroupMetadata( const QString &name,
const QString uri,
Expand Down

0 comments on commit a720a18

Please sign in to comment.