docs: layout comments name all four shipped layout types; #150 changelog pointer and test docstring corrected
Files changed: - CHANGES.md - VERSION - tools/chemenu/commands/new_page.py - tools/chemenu/tests/test_new_page.py - tools/chemenu/type_resolver.py
This commit is contained in:
1 parent
6c0ebcc4f0
commit
dd885db625
5 files changed
+20
-9
No files matched your search
@@ -15,8 +15,8 @@ A schema `default:` is materialized only for a field the schema also lists
|
||||
in `required:` - an optional field's default is a reader-side assumption
|
||||
(what a missing field means), and writing it into every scaffolded page
|
||||
would turn that assumption into a stated claim instead (Gitea #109).
|
||||
Directory placement for subtype-driven types (currently just entities) also
|
||||
comes from the type-spec, via its `layout:` frontmatter (see
|
||||
Directory placement for subtype-driven types (in the shipped specs: entity,
|
||||
concept, source and project) also comes from the type-spec, via its `layout:` frontmatter (see
|
||||
`TypeResolver.get_layout`) - not a hand-maintained Python dict.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -775,8 +775,9 @@ def test_new_concept_path_matches_its_record_note(monkeypatch, kb_dir):
|
||||
def test_new_source_path_matches_its_record_note_and_its_usage_is_runnable(monkeypatch, kb_dir):
|
||||
"""Also #150's second finding: the `usage` line itself omitted
|
||||
`source_type`/`fidelity`/`authority` and could never succeed as written.
|
||||
Running the corrected `usage` verbatim (substituting `<Name>`/`<t>`/etc.)
|
||||
is the test that it now can."""
|
||||
The call below passes exactly the fields the corrected `usage` names,
|
||||
with valid values for its placeholders - it does not parse the `usage`
|
||||
string itself."""
|
||||
monkeypatch.setenv("WIKI_AUTHOR", "Torben")
|
||||
name = "gateway.example.net"
|
||||
_fixture_raw_file(monkeypatch, kb_dir, "raw/notes/gateway.example.net.md")
|
||||
|
||||
@@ -306,7 +306,8 @@ class TypeResolver:
|
||||
need a hand-maintained `entity_type -> subdirectory` Python dict.
|
||||
|
||||
Only types with subtype-driven directory placement declare a
|
||||
`layout:` (currently just `types/entity.md`); returns None for types
|
||||
`layout:` (in the shipped specs: `types/entity.md`, `types/concept.md`,
|
||||
`types/source.md`, `types/project.md`); returns None for types
|
||||
that don't (e.g. `types/comparison.md`, which has a single flat
|
||||
directory regardless of subtype).
|
||||
|
||||
|
||||
Reference in new issue
Block a user