14. Test: Scopes¶
This chapter demonstrates the effect of subsection Preamble.scope in combination with the scope state stack. The goal is to render a Sphinx document for a given target audience, according to the rules defined in Scopes and visibility.
To this end, the objects of module test_scope_mix are rendered
once for each target scope, each within its own section of this chapter.
The scope is set at the beginning of each section using the directive
.. wtrl_push_current_scope::.
The active scope determines which objects are rendered at all, and which references in the resulting HTML artifact are clickable. In this way, a consistent subgraph of the complete set of docstrings of the module is obtained.
The three sections below illustrate how the visible subset of objects changes with increasing scope.
14.1. Scope: Public¶
Preamble |
scope
normative sections
|
Contract |
general
|
Public classes |
X_public, |
Public functions |
f_public, |
See also |
|
| «Module» | test_scope_mix |
|---|
Signature |
test_scope_mix.f_public(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Function» | f_public – from test_scope_mix |
|---|
Note
Scope filter: skipped f_extension (object: extension; active: public).
Note
Scope filter: skipped f_core (object: core; active: public).
Preamble |
scope
normative sections
|
Contract |
general
constructor
|
Public classes |
|
Public methods |
|
| «Class» | X_public – from test_scope_mix |
|---|
Nested classes in X_public
Public Methods in class X_public
14.2. Scope: Extension¶
Preamble |
scope
normative sections
|
Contract |
general
|
Public classes |
X_public, X_extension, |
Public functions |
f_public, f_extension, |
See also |
|
| «Module» | test_scope_mix |
|---|
Signature |
test_scope_mix.f_public(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Function» | f_public – from test_scope_mix |
|---|
Signature |
test_scope_mix.f_extension(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Function» | f_extension – from test_scope_mix |
|---|
Note
Scope filter: skipped f_core (object: core; active: extension).
Preamble |
scope
normative sections
|
Contract |
general
constructor
|
Public classes |
Y_extension, |
Public methods |
m_extension, |
| «Class» | X_public – from test_scope_mix |
|---|
Nested classes in X_public
Preamble |
scope
normative sections
|
Contract |
general
constructor |
| «Class» | X_public.Y_extension – from test_scope_mix |
|---|
Public Methods in class X_public
Signature |
test_scope_mix.X_public.m_extension(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Method» | X_public.m_extension – from test_scope_mix |
|---|
Preamble |
scope
normative sections
|
Contract |
general
constructor
|
Public classes |
|
Public methods |
|
See also |
|
Derived from |
|
| «Class» | X_extension – from test_scope_mix |
|---|
Nested classes in X_extension
Public Methods in class X_extension
14.3. Scope: Core¶
Preamble |
scope
normative sections
|
Contract |
general
|
Public classes |
|
Public functions |
|
See also |
|
| «Module» | test_scope_mix |
|---|
Signature |
test_scope_mix.f_public(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Function» | f_public – from test_scope_mix |
|---|
Signature |
test_scope_mix.f_extension(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Function» | f_extension – from test_scope_mix |
|---|
Signature |
test_scope_mix.f_core(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Function» | f_core – from test_scope_mix |
|---|
Preamble |
scope
normative sections
|
Contract |
general
constructor
|
Public classes |
|
Public methods |
|
| «Class» | X_public – from test_scope_mix |
|---|
Nested classes in X_public
Preamble |
scope
normative sections
|
Contract |
general
constructor |
| «Class» | X_public.Y_extension – from test_scope_mix |
|---|
Preamble |
scope
normative sections
|
Contract |
general
constructor |
See also |
|
| «Class» | X_public.Y_core – from test_scope_mix |
|---|
Public Methods in class X_public
Signature |
test_scope_mix.X_public.m_extension(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
|
| «Method» | X_public.m_extension – from test_scope_mix |
|---|
Signature |
test_scope_mix.X_public.m_core(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
X_public.m_extension, X_public.Y_core, f_public, f_extension, f_core |
| «Method» | X_public.m_core – from test_scope_mix |
|---|
Preamble |
scope
normative sections
|
Contract |
general
constructor
|
Public classes |
|
Public methods |
|
See also |
|
Derived from |
|
| «Class» | X_extension – from test_scope_mix |
|---|
Nested classes in X_extension
Preamble |
scope
normative sections
|
Contract |
general
constructor |
See also |
|
| «Class» | X_extension.Y_core – from test_scope_mix |
|---|
Public Methods in class X_extension
Signature |
test_scope_mix.X_extension.m_core(
) -> None
|
Preamble |
scope
normative sections
|
Contract |
general
|
Parameters |
<empty> |
Returns |
|
Raises |
<empty> |
See also |
X_public.m_extension, X_public.m_core, X_extension.Y_core, f_public, f_extension, f_core |
| «Method» | X_extension.m_core – from test_scope_mix |
|---|
Preamble |
scope
normative sections
|
Contract |
general
constructor
|
See also |
|
| «Class» | X_core – from test_scope_mix |
|---|