Behaviour SwRS-MDOKFSTUDIO-MYST-066
The governing conf.py is found and read as text
When a document is checked, the extension SHALL take its enabled MyST extensions from the governing `conf.py`, found as the nearest one in the document's folder or any folder up to the workspace root (never one above the root, and for a document outside the workspace only its own folder) or else as the single conf.py of a common Sphinx folder at the root, read as text and never run, and report nothing when no certain list results.
Step 1 of path 1 in StRS-MDOKFSTUDIO-MYST-007: from “A document uses syntax of a MyST extension” to “The enabled MyST extensions are known”.
Scenarios 8
The situations the tests check; open one to read it.
nominalThe nearest conf.py governs
boundaryThe workspace root bounds the search
boundaryA single common-folder conf.py is the fallback
Applies when no conf.py is found above the document. The common folders at the workspace root are docs/, doc/, sphinx/, source/ and docs/source/.
| Input | Outcome |
|---|---|
| Only sphinx/conf.py, document at the root | that file governs |
| Two or more candidate conf.py files in the common folders | no conf governs |
| An ancestor conf.py and a common-folder candidate | the ancestor wins |
nominalA conf.py listing a MyST parser is read as text
refusalWithout a certain MyST list nothing is reported
| Input | Outcome |
|---|---|
| No conf.py | nothing is reported and rendering is unchanged |
| conf.py without myst_parser or myst_nb in `extensions` | nothing is reported and rendering is unchanged |
| An uncertain list | nothing is reported and rendering is unchanged |
| An I/O error reading the file | nothing is reported and rendering is unchanged |
nominalList literal forms are read completely
| Input | Outcome |
|---|---|
| CRLF line endings | the same elements result |
| r or u string prefixes | the same elements result |
nominalMutations are applied in written order
The forms `=`, `+=`, `.append`, `.extend` and list addition are applied in order; `.extend([...])` followed by a later `=` reassignment gives the later assignment as the result.
refusalComputed values make the list uncertain
| Input | Outcome |
|---|---|
| `extensions = load()` (computed value) | the result is uncertain and no warning is shown |
| An f-string element | the same suppression applies |
| A bytes or other prefixed string element | the same suppression applies |
| A `-=` change | the same suppression applies |
Certainty is all or nothing.