Skip to content

Commit f411a10

Browse files
authored
Treat warnings as error in doc generation (#2097)
* Treat warnings as error in doc generation * Fix doc generation issues * Removed sphinx_rtd_theme from docs conf file
1 parent 7a6f0de commit f411a10

File tree

11 files changed

+23
-21
lines changed

11 files changed

+23
-21
lines changed

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS =
5+
SPHINXOPTS = -W
66
SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = _build

docs/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sphinx_rtd_theme
1615
import os
1716
try:
1817
import tomllib
@@ -133,7 +132,6 @@ def _read_version_from_pyproject(pyproject_path=None):
133132
# Theme options are theme-specific and customize the look and feel of a theme
134133
# further. For a list of options available for each theme, see the
135134
# documentation.
136-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
137135

138136
# Add any paths that contain custom themes here, relative to this directory.
139137
# html_theme_path = []

src/confluent_kafka/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
TopicCollection,
2828
TopicPartitionInfo,
2929
IsolationLevel,
30+
ElectionType
3031
)
3132
import os
3233
from .cimpl import (
@@ -74,6 +75,7 @@
7475
"IsolationLevel",
7576
"TopicCollection",
7677
"TopicPartitionInfo",
78+
"ElectionType"
7779
]
7880

7981

src/confluent_kafka/schema_registry/_async/avro.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ class AsyncAvroDeserializer(AsyncBaseDeserializer):
407407
| ``schema.id.deserializer`` | callable | Defines how the schema id/guid is deserialized. |
408408
| | | Defaults to dual_schema_id_deserializer. |
409409
+-----------------------------+----------+--------------------------------------------------+
410+
410411
Note:
411412
By default, Avro complex types are returned as dicts. This behavior can
412413
be overridden by registering a callable ``from_dict`` with the deserializer to

src/confluent_kafka/schema_registry/_async/json_schema.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ class AsyncJSONSerializer(AsyncBaseSerializer):
9898
| ``normalize.schemas`` | bool | transform schemas to have a consistent format, |
9999
| | | including ordering properties and references. |
100100
+-----------------------------+----------+----------------------------------------------------+
101-
| | | Whether to use the given schema ID for |
102-
| ``use.schema.id`` | int | serialization. |
103-
| | | |
104-
+-----------------------------+----------+--------------------------------------------------+
101+
| | | Whether to use the given schema ID for |
102+
| ``use.schema.id`` | int | serialization. |
103+
+-----------------------------+----------+----------------------------------------------------+
105104
| | | Whether to use the latest subject version for |
106105
| ``use.latest.version`` | bool | serialization. |
107106
| | | |

src/confluent_kafka/schema_registry/_async/protobuf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async def _resolve_named_schema(
5757
):
5858
"""
5959
Resolves named schemas referenced by the provided schema recursively.
60+
6061
:param schema: Schema to resolve named schemas for.
6162
:param schema_registry_client: AsyncSchemaRegistryClient to use for retrieval.
6263
:param pool: DescriptorPool to add resolved schemas to.
@@ -104,7 +105,7 @@ class AsyncProtobufSerializer(AsyncBaseSerializer):
104105
| | | Whether to use the given schema ID for |
105106
| ``use.schema.id`` | int | serialization. |
106107
| | | |
107-
+-----------------------------------------+----------+--------------------------------------------------+
108+
+-------------------------------------+----------+------------------------------------------------------+
108109
| | | Whether to use the latest subject version for |
109110
| ``use.latest.version`` | bool | serialization. |
110111
| | | |

src/confluent_kafka/schema_registry/_async/schema_registry_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ async def register_schema(
634634
Compatibility policy or is otherwise invalid.
635635
636636
See Also:
637-
`POST Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
637+
`POST Subject Version API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
638638
""" # noqa: E501
639639

640640
registered_schema = await self.register_schema_full_response(subject_name, schema, normalize_schemas)
@@ -660,7 +660,7 @@ async def register_schema_full_response(
660660
Compatibility policy or is otherwise invalid.
661661
662662
See Also:
663-
`POST Subject API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
663+
`POST Subject Version API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
664664
""" # noqa: E501
665665

666666
schema_id = self._cache.get_id_by_schema(subject_name, schema)
@@ -1114,7 +1114,7 @@ async def get_referenced_by(
11141114
SchemaRegistryError: if the schema version can't be found or referenced schemas can't be retrieved
11151115
11161116
See Also:
1117-
`GET Subject Versions API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions-versionId-%20version-referencedby>`_
1117+
`GET Subject Versions (ReferenceBy) API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions-versionId-%20version-referencedby>`_
11181118
""" # noqa: E501
11191119

11201120
query = {'offset': offset, 'limit': limit}
@@ -1142,7 +1142,7 @@ async def get_versions(
11421142
SchemaRegistryError: If subject can't be found
11431143
11441144
See Also:
1145-
`GET Subject Versions API Reference <https://docs.confluent.io/current/schema-registry/develop/api.html#post--subjects-(string-%20subject)-versions>`_
1145+
`GET Subject All Versions API Reference <https://docs.confluent.io/platform/current/schema-registry/develop/api.html#get--subjects-(string-%20subject)-versions>`_
11461146
""" # noqa: E501
11471147

11481148
query = {'deleted': deleted, 'deleted_only': deleted_only, 'offset': offset, 'limit': limit}

src/confluent_kafka/schema_registry/_sync/avro.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ class AvroDeserializer(BaseDeserializer):
407407
| ``schema.id.deserializer`` | callable | Defines how the schema id/guid is deserialized. |
408408
| | | Defaults to dual_schema_id_deserializer. |
409409
+-----------------------------+----------+--------------------------------------------------+
410+
410411
Note:
411412
By default, Avro complex types are returned as dicts. This behavior can
412413
be overridden by registering a callable ``from_dict`` with the deserializer to

src/confluent_kafka/schema_registry/_sync/json_schema.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ class JSONSerializer(BaseSerializer):
9898
| ``normalize.schemas`` | bool | transform schemas to have a consistent format, |
9999
| | | including ordering properties and references. |
100100
+-----------------------------+----------+----------------------------------------------------+
101-
| | | Whether to use the given schema ID for |
102-
| ``use.schema.id`` | int | serialization. |
103-
| | | |
104-
+-----------------------------+----------+--------------------------------------------------+
101+
| | | Whether to use the given schema ID for |
102+
| ``use.schema.id`` | int | serialization. |
103+
+-----------------------------+----------+----------------------------------------------------+
105104
| | | Whether to use the latest subject version for |
106105
| ``use.latest.version`` | bool | serialization. |
107106
| | | |

src/confluent_kafka/schema_registry/_sync/protobuf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def _resolve_named_schema(
5757
):
5858
"""
5959
Resolves named schemas referenced by the provided schema recursively.
60+
6061
:param schema: Schema to resolve named schemas for.
6162
:param schema_registry_client: SchemaRegistryClient to use for retrieval.
6263
:param pool: DescriptorPool to add resolved schemas to.
@@ -104,7 +105,7 @@ class ProtobufSerializer(BaseSerializer):
104105
| | | Whether to use the given schema ID for |
105106
| ``use.schema.id`` | int | serialization. |
106107
| | | |
107-
+-----------------------------------------+----------+--------------------------------------------------+
108+
+-------------------------------------+----------+------------------------------------------------------+
108109
| | | Whether to use the latest subject version for |
109110
| ``use.latest.version`` | bool | serialization. |
110111
| | | |

0 commit comments

Comments
 (0)