Skip to content

Commit 1574663

Browse files
committed
doc: make sphinx nitpicky
1 parent 23c845b commit 1574663

7 files changed

Lines changed: 21 additions & 22 deletions

File tree

‎.github/workflows/tests.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
enable-cache: true
6565
- name: Install dependencies
6666
run: uv sync --group doc
67-
- run: uv run sphinx-build doc build/sphinx/html
67+
- run: uv run sphinx-build -W --keep-going doc build/sphinx/html
6868

6969
nix:
7070
runs-on: ubuntu-latest

‎doc/changelog.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Changed
99
- scim2-client 0.8.0 and scim2-tester 0.3.0 are now the minimum supported versions.
1010
- Requests are performed with `httpx2 <https://github.com/pydantic/httpx2>`_ instead of
1111
httpx, following the scim2-client 0.8 engine rename.
12-
- :ref:`query` only sends the ``attributes`` and ``excludedAttributes`` parameters when a
12+
- :ref:`reference:query` only sends the ``attributes`` and ``excludedAttributes`` parameters when a
1313
single resource is queried, as :rfc:`RFC7644 §3.4.1 <7644#section-3.4.1>` defines those
1414
as the sole parameters of that request. ``--start-index``, ``--count``, ``--filter``,
1515
``--sort-by`` and ``--sort-order`` are refused in that case, instead of being sent along.
@@ -19,7 +19,7 @@ Fixed
1919
- Server SCIM errors and invalid request payloads are reported as readable messages
2020
instead of a traceback. scim2-client 0.8 raises the scim2-models exceptions for those,
2121
which do not belong to its own exception hierarchy.
22-
- The :ref:`test` ``--dont-check-status-code`` and ``--dont-check-content-type`` options
22+
- The :ref:`reference:test` ``--dont-check-status-code`` and ``--dont-check-content-type`` options
2323
were not applied on the client.
2424

2525
[0.2.4] - 2026-01-25
@@ -41,16 +41,16 @@ Added
4141

4242
Added
4343
^^^^^
44-
- The :ref:`test` command returns 1 in case of errors.
45-
- Added :ref:`test` ``--dont-check-content-type`` and ``--dont-check-status-code`` options.
44+
- The :ref:`reference:test` command returns 1 in case of errors.
45+
- Added :ref:`reference:test` ``--dont-check-content-type`` and ``--dont-check-status-code`` options.
4646

4747
[0.2.1] - 2024-12-04
4848
--------------------
4949

5050
Added
5151
^^^^^
5252
- Display server discovery step network connections.
53-
- Support loading server configuration objects in :class:`~scim2_models.ListResponses`.
53+
- Support loading server configuration objects in :class:`~scim2_models.ListResponse`.
5454

5555
[0.2.0] - 2024-12-03
5656
--------------------

‎doc/conf.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
pygments_style = "sphinx"
5151
todo_include_todos = True
5252
toctree_collapse = False
53+
nitpicky = True
54+
autosectionlabel_prefix_document = True
5355
suppress_warnings = ["autosectionlabel.changelog"]
5456

5557
intersphinx_mapping = {

‎doc/tutorial.rst‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ You can store those data locally and reuse them for future command runs thanks t
8888
Query and search resources
8989
--------------------------
9090

91-
Use the :ref:`query` and :ref:`search` commands to look for resources.
92-
:ref:`query` performs a `GET` request on the resources endpoint, while :ref:`search` performs a `POST` request on the ``/.search`` endpoint.
93-
Both commands take similar options such as :option:`--count <scim-query.--count>` or :option:`--attributes <scim-query.--attributes>`.
91+
Use the :ref:`reference:query` and :ref:`reference:search` commands to look for resources.
92+
:ref:`reference:query` performs a `GET` request on the resources endpoint, while :ref:`reference:search` performs a `POST` request on the ``/.search`` endpoint.
93+
Both commands take similar options such as :option:`--count <scim-query --count>` or :option:`--attribute <scim-query --attribute>`.
9494
An exhaustive list of options can be found on the :doc:`reference`.
95-
:ref:`query` can also take a :option:`RESOURCE_TYPE <scim-query.RESOURCE_TYPE>` and a :option:`ID <scim-query.ID>` parameters.
95+
:ref:`reference:query` can also take a :option:`RESOURCE_TYPE <scim-query RESOURCE_TYPE>` and a :option:`ID <scim-query ID>` parameters.
9696

9797
- If none are set, all the resources of the server are queried.
9898

@@ -109,7 +109,7 @@ An exhaustive list of options can be found on the :doc:`reference`.
109109
"itemsPerPage": 50,
110110
"Resources": [...]
111111
}
112-
- If :option:`RESOURCE_TYPE <scim-query.RESOURCE_TYPE>` is set and :option:`ID <scim-query.ID>` is unset, all the resource of the kind passed in parameter are returned.
112+
- If :option:`RESOURCE_TYPE <scim-query RESOURCE_TYPE>` is set and :option:`ID <scim-query ID>` is unset, all the resource of the kind passed in parameter are returned.
113113

114114
.. code-block:: console
115115
:caption: Querying all the users from the server.
@@ -146,10 +146,11 @@ An exhaustive list of options can be found on the :doc:`reference`.
146146
},
147147
"userName": "bjensen@example.com"
148148
}
149+
149150
Create and replace resources
150151
----------------------------
151152

152-
Use the :ref:`create` and :ref:`replace` commands to edit resources.
153+
Use the :ref:`reference:create` and :ref:`reference:replace` commands to edit resources.
153154

154155
Options for those commands are dynamically generated, depending on the resource attributes available on the server.
155156
For instance, for the :class:`~scim2_models.User` resource, you have a ``--user-name`` option.
@@ -178,7 +179,7 @@ You can have a look at the exhaustive list of options by running ``scim create u
178179
Delete resources
179180
----------------
180181

181-
The :ref:`delete` command allows you to delete resources.
182+
The :ref:`reference:delete` command allows you to delete resources.
182183

183184
.. code-block:: console
184185
:caption: Deletion of an user.
@@ -188,7 +189,7 @@ The :ref:`delete` command allows you to delete resources.
188189
Perform a SCIM compliance test
189190
------------------------------
190191

191-
The :ref:`test` command runs a series of resource creation, edition and deletions to check that your server complies with the SCIM specifications.
192+
The :ref:`reference:test` command runs a series of resource creation, edition and deletions to check that your server complies with the SCIM specifications.
192193
See the :doc:`scim2-tester documentation <scim2_tester:index>` for more details on which tests are performed.
193194

194195
.. code-block:: console
@@ -211,7 +212,7 @@ JSON input
211212
scim2-cli will also read input data from the standard input.
212213
Use this to send custom payloads to the SCIM server.
213214

214-
When user with :ref:`query` and :ref:`search`, the input value must be a JSON representation of a :class:`~scim2_models.SearchRequest` object:
215+
When user with :ref:`reference:query` and :ref:`reference:search`, the input value must be a JSON representation of a :class:`~scim2_models.SearchRequest` object:
215216

216217
.. code-block:: console
217218
:caption: Search of an user by passing a custom payload.
@@ -227,7 +228,7 @@ When user with :ref:`query` and :ref:`search`, the input value must be a JSON re
227228
"Resources": [...]
228229
}
229230
230-
When used with :ref:`create` and :ref:`replace`, no subcommand is needed and the endpoint is guessed from the payload.
231+
When used with :ref:`reference:create` and :ref:`reference:replace`, no subcommand is needed and the endpoint is guessed from the payload.
231232

232233
.. code-block:: console
233234
:caption: Creation of an user by passing a custom payload.

‎pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ uv_resolution = "lowest-direct"
160160
[tool.tox.env.doc]
161161
dependency_groups = ["doc"]
162162
commands = [
163-
["sphinx-build", "--builder", "html", "doc", "build/sphinx/html"],
164-
["sphinx-build", "--builder", "man", "doc", "build/sphinx/html"],
163+
["sphinx-build", "-W", "--keep-going", "--builder", "html", "doc", "build/sphinx/html"],
164+
["sphinx-build", "-W", "--keep-going", "--builder", "man", "doc", "build/sphinx/html"],
165165
]
166166

167167
[tool.tox.env.coverage]

‎scim2_cli/query.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def query_cli(
9696
f"Unknown resource type '{resource_type}. Available values are: {ok_values}'"
9797
) from exc
9898

99-
# ServiceProviderConfig is a singleton endpoint, so it is reached without an id.
10099
single_resource = bool(id) or resource_type is ServiceProviderConfig
101100
listing_options = [
102101
name

‎scim2_cli/utils.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
DOC_URL = "https://scim2-cli.readthedocs.io/"
1111
INDENTATION_SIZE = 4
1212

13-
# scim2-client raises its own exceptions for transport and response issues, and
14-
# scim2-models SCIM exceptions for invalid request payloads and server errors.
15-
# The two hierarchies are unrelated, so both must be caught.
1613
SCIM_EXCEPTIONS = (SCIMClientException, SCIMException)
1714

1815

0 commit comments

Comments
 (0)