Skip to content

Commit 9cbbaf2

Browse files
authored
Docs: Fix some warnings from Sphinx (#1211)
* Fix some warnings from Sphinx * Correct headings to avoid duplicate object description warning * Add typedef and name to error codes matching style of PluginErrCodes * Add correct directive
1 parent fa76d9f commit 9cbbaf2

File tree

12 files changed

+15
-49
lines changed

12 files changed

+15
-49
lines changed

bindings/python/dlite-entity.i

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ Arguments:
105105
name: Dimension name.
106106
description: Dimension description.
107107

108-
Attributes:
109-
name: Dimension name.
110-
description: Dimension description.
111-
112108
") _DLiteDimension;
113109
%rename(Dimension) _DLiteDimension;
114110
struct _DLiteDimension {
@@ -151,16 +147,6 @@ Arguments:
151147
be a valid unit label defined by EMMO or a custom ontology.
152148
description: Optional: A human description of the property.
153149

154-
Attributes:
155-
name: Property name.
156-
size: Number of bytes needed to represent a single instance of `type`
157-
in memory.
158-
ref: Value of the `ref` argument.
159-
ndims: Number of dimensions of the property. A scalar has `ndims=0`.
160-
unit: The unit of the property.
161-
description: Property description.
162-
dims: Deprecated alias for shape.
163-
164150
") _DLiteProperty;
165151
%rename(Property) _DLiteProperty;
166152
struct _DLiteProperty {
@@ -300,7 +286,7 @@ methods:
300286

301287
For details, see the documentation of the individual class methods.
302288

303-
Attributes:
289+
Arguments:
304290
uuid: The UUID of the instance.
305291
uri: The URI of the instance.
306292

bindings/python/dlite-misc-python.i

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class errctl():
3232
- "<stderr>": Write errors to stderr (default).
3333
- "<stdout>": Write errors to stdout.
3434
35-
Attributes:
36-
filename: Filename to redirect errors to.
37-
3835
"""
3936
def __init__(self, hide=(), show=(), filename="<stderr>"):
4037
allcodes = [-i for i in range(1, _dlite._get_number_of_errors())]

bindings/python/python-protocol-plugins/zip.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def open(self, location, options=None):
2020
location: A URL or path to a zip file.
2121
If `location` is a URL, a local cache is created and reused.
2222
options: The following options are supported:
23+
2324
- timeout: Number of seconds before timing out when downloading
2425
an URL.
2526
- nocache: If true and path is a URL, the zip file will be

doc/Doxyfile.in

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ INLINE_SIMPLE_STRUCTS = NO
393393
# types are typedef'ed and only the typedef is referenced, never the tag name.
394394
# The default value is: NO.
395395

396-
TYPEDEF_HIDES_STRUCT = NO
396+
TYPEDEF_HIDES_STRUCT = YES
397397

398398
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
399399
# cache is used to resolve symbols given their name and scope. Since this can be
@@ -833,6 +833,7 @@ EXCLUDE_SYMLINKS = NO
833833
# exclude all test directories for example use the pattern */test/*
834834

835835
EXCLUDE_PATTERNS = */tests/test_* \
836+
*/tests/* \
836837
*/old/*
837838

838839
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
@@ -930,8 +931,7 @@ FILTER_SOURCE_PATTERNS =
930931
# (index.html). This can be useful if you have a project on for instance GitHub
931932
# and want to reuse the introduction page also for the doxygen output.
932933

933-
#USE_MDFILE_AS_MAINPAGE = @dlite_SOURCE_DIR@/README.md
934-
USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_BINARY_DIR@/README.md
934+
USE_MDFILE_AS_MAINPAGE =
935935

936936
#---------------------------------------------------------------------------
937937
# Configuration options related to source browsing
@@ -1157,15 +1157,6 @@ HTML_COLORSTYLE_SAT = 100
11571157

11581158
HTML_COLORSTYLE_GAMMA = 80
11591159

1160-
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1161-
# page will contain the date and time when the page was generated. Setting this
1162-
# to YES can help to show when doxygen was last run and thus if the
1163-
# documentation is up to date.
1164-
# The default value is: NO.
1165-
# This tag requires that the tag GENERATE_HTML is set to YES.
1166-
1167-
HTML_TIMESTAMP = NO
1168-
11691160
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
11701161
# documentation will contain a main index with vertical navigation menus that
11711162
# are dynamically created via Javascript. If disabled, the navigation index will
@@ -1730,14 +1721,6 @@ LATEX_HIDE_INDICES = NO
17301721

17311722
LATEX_BIB_STYLE = plain
17321723

1733-
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
1734-
# page will contain the date and time when the page was generated. Setting this
1735-
# to NO can help when comparing the output of multiple runs.
1736-
# The default value is: NO.
1737-
# This tag requires that the tag GENERATE_LATEX is set to YES.
1738-
1739-
LATEX_TIMESTAMP = NO
1740-
17411724
#---------------------------------------------------------------------------
17421725
# Configuration options related to the RTF output
17431726
#---------------------------------------------------------------------------

doc/contributors_guide/tips_and_tricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ to rerun valgrind on that issue, you can run
171171

172172
Both of the above commands will write the output to `<BUILD_DIR>/Testing/Temporary/MemoryChecker.<#>.log`, where `<#>` is the test number.
173173

174-
```note
174+
```{note}
175175
The first time you run `make memcheck`, a supression file will be created, suppressing issues that does not comes from DLite.
176176
Generating a suppression file may take long time, but it will only be generated once unless you manually add more suppressions to one of the `cmake/valgrind-*.supp` files.
177177
```

doc/getting_started/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ You can use the method `person.set_quantity` to set a property with a quantity o
384384
385385
```
386386

387-
```note
387+
```{note}
388388
If you need in your program to use a specific units registry, use the function
389389
[`pint.set_application_registry()`]
390390
```

doc/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ DLite
1111

1212
getting_started/index
1313
user_guide/index
14-
api_reference/index
1514
contributors_guide/index
1615
license
1716

doc/respirator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self,
2424
output_path: Union[str,Path],
2525
template_path: Union[str, Path],
2626
index_file = 'index.xml',
27-
filename_filter=".*\.h"):
27+
filename_filter=r".*\.h"):
2828
"""
2929
initialize class
3030
"""

doc/user_guide/search_paths.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Appending to DLite path variables
4747
The `dlite` Python module defines the path variables listed in the table above.
4848
A Python script or application can configure new datamodels and plugins by appending to these variables.
4949

50-
:::{example}
50+
:::{hint}
5151
Adding the sub-directory `datamodels` to the search path for datamodels, can be done with:
5252

5353
```python

src/utils/fileutils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*/
1717

1818
/** Error codes */
19-
enum {
19+
typedef enum {
2020
fu_PathError=5870,
2121
fu_OpenDirectoryError,
22-
};
22+
} FUErrCodes;
2323

2424

2525
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))

0 commit comments

Comments
 (0)