You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
B2 SDK docs: execute or signature-check documentation examples in CI #598
The Sphinx build validates document structure and cross-references, but examples in ordinary code-block directives are rendered as text and are not executed. The unit-test command uses --doctest-modules, which checks Python-module docstrings rather than .rst code blocks, and the Sphinx configuration does not enable sphinx.ext.doctest. This is why invalid names and keyword arguments in the Quick Start guide can pass CI.
Steps to reproduce
1. Observe the existing invalid `EncryptionSettings`, `EncryptionKey(id=...)`, or `file_infos=` examples in quick_start.rst.
2. Run the current non-interactive documentation build.
3. Observe that Sphinx can render the page without executing those calls.
Expected behavior
Define two validation levels. Self-contained examples should execute against RawSimulator or another deterministic fixture. Credential-dependent examples should be extracted or represented in a form that checks syntax, imports, object construction, and method signatures without contacting B2. The documentation job should fail with a clear file and example location when validation fails.
Actual behavior
Documentation currently builds successfully while containing Python examples that fail immediately when copied into an application. This creates a false signal: CI proves that pages render, not that the documented SDK calls remain valid.
Activity