throughline-transform 0.7.0__tar.gz → 0.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {throughline_transform-0.7.0/src/throughline_transform.egg-info → throughline_transform-0.7.1}/PKG-INFO +28 -2
  2. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/README.md +25 -1
  3. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/pyproject.toml +3 -1
  4. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/markdown.py +38 -13
  5. {throughline_transform-0.7.0 → throughline_transform-0.7.1/src/throughline_transform.egg-info}/PKG-INFO +28 -2
  6. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/tests/conftest.py +28 -8
  7. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/tests/test_outputs.py +6 -4
  8. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/tests/test_surface.py +3 -1
  9. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/LICENSE +0 -0
  10. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/MANIFEST.in +0 -0
  11. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/NOTICE +0 -0
  12. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/setup.cfg +0 -0
  13. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/__init__.py +0 -0
  14. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/blocks.py +0 -0
  15. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/cli.py +0 -0
  16. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/html.py +0 -0
  17. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/model.py +0 -0
  18. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/notes.py +0 -0
  19. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/office.py +0 -0
  20. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/package.py +0 -0
  21. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/progress.py +0 -0
  22. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/project.py +0 -0
  23. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/provenance.py +0 -0
  24. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/shape.py +0 -0
  25. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform/tables.py +0 -0
  26. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform.egg-info/SOURCES.txt +0 -0
  27. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform.egg-info/dependency_links.txt +0 -0
  28. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform.egg-info/entry_points.txt +0 -0
  29. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform.egg-info/requires.txt +0 -0
  30. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/src/throughline_transform.egg-info/top_level.txt +0 -0
  31. {throughline_transform-0.7.0 → throughline_transform-0.7.1}/tests/test_only.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: throughline-transform
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Turn a throughline requirements graph on disk, committed or not, into the forms its readers open: Markdown, a folder of Obsidian notes, CSV, an Excel workbook, a Word document, or a print-ready HTML document. Ships the tl-transform CLI.
5
5
  Author-email: Henry J Grech-Cini <henry.grechcini@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -15,6 +15,8 @@ Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
18
20
  Classifier: Topic :: Software Development :: Documentation
19
21
  Classifier: Topic :: Office/Business
20
22
  Requires-Python: >=3.11
@@ -32,7 +34,7 @@ A [throughline](https://github.com/rhodium-org/throughline) requirements graph o
32
34
  disk — committed or not — in the forms its readers open. One command, one file:
33
35
 
34
36
  ```bash
35
- pipx install throughline-transform # pulls tl along too
37
+ uv tool install --python 3.13 --managed-python throughline-transform --with-executables-from throughline # tl too
36
38
 
37
39
  tl-transform md -C idd # Markdown, written by the tool itself
38
40
  tl-transform notes -C idd # a folder of notes for Obsidian (zip)
@@ -50,6 +52,30 @@ disk. The editor needs the graph on GitHub. This does not — it reads the worki
50
52
  tree, and the output says whether that tree was clean, carried uncommitted
51
53
  changes, or was not under version control at all.
52
54
 
55
+ `--managed-python` has uv use its own build of Python rather than the operating
56
+ system's, so an OS Python upgrade does not break the install;
57
+ `--with-executables-from throughline` puts `tl` on your `PATH` beside it. Get uv
58
+ from [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).
59
+ If you use pipx instead: `pipx install --include-deps throughline-transform`.
60
+
61
+ ## If `tl-transform` says `bad interpreter` after a Python upgrade
62
+
63
+ A tool installed with pipx (or into any virtual environment) runs on the Python it
64
+ was installed with. When your operating system upgrades its Python and removes the
65
+ old one, every command in that environment fails before any of its code runs, with
66
+ `bad interpreter` or `No module named ...`. Your graphs are fine; the environment has
67
+ to be rebuilt on the new Python:
68
+
69
+ | Installed with | Rebuild with |
70
+ |---|---|
71
+ | pipx | `pipx reinstall-all --python python3` (or the new Python's full path) |
72
+ | pipx, when `pipx` itself is broken too | `uvx pipx reinstall-all --python python3` |
73
+ | uv | `uv tool install --reinstall --python 3.13 --managed-python throughline-transform --with-executables-from throughline` |
74
+
75
+ An install made with uv's `--managed-python` does not hit this: the operating system
76
+ does not touch the Python uv manages. `tl doctor` (throughline releases after 6.0.0) says
77
+ which Python runs `tl` and how it was installed.
78
+
53
79
  ## What it does not do
54
80
 
55
81
  **It never renders an item's words.** The Markdown is asked of `tl docs` over a
@@ -4,7 +4,7 @@ A [throughline](https://github.com/rhodium-org/throughline) requirements graph o
4
4
  disk — committed or not — in the forms its readers open. One command, one file:
5
5
 
6
6
  ```bash
7
- pipx install throughline-transform # pulls tl along too
7
+ uv tool install --python 3.13 --managed-python throughline-transform --with-executables-from throughline # tl too
8
8
 
9
9
  tl-transform md -C idd # Markdown, written by the tool itself
10
10
  tl-transform notes -C idd # a folder of notes for Obsidian (zip)
@@ -22,6 +22,30 @@ disk. The editor needs the graph on GitHub. This does not — it reads the worki
22
22
  tree, and the output says whether that tree was clean, carried uncommitted
23
23
  changes, or was not under version control at all.
24
24
 
25
+ `--managed-python` has uv use its own build of Python rather than the operating
26
+ system's, so an OS Python upgrade does not break the install;
27
+ `--with-executables-from throughline` puts `tl` on your `PATH` beside it. Get uv
28
+ from [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).
29
+ If you use pipx instead: `pipx install --include-deps throughline-transform`.
30
+
31
+ ## If `tl-transform` says `bad interpreter` after a Python upgrade
32
+
33
+ A tool installed with pipx (or into any virtual environment) runs on the Python it
34
+ was installed with. When your operating system upgrades its Python and removes the
35
+ old one, every command in that environment fails before any of its code runs, with
36
+ `bad interpreter` or `No module named ...`. Your graphs are fine; the environment has
37
+ to be rebuilt on the new Python:
38
+
39
+ | Installed with | Rebuild with |
40
+ |---|---|
41
+ | pipx | `pipx reinstall-all --python python3` (or the new Python's full path) |
42
+ | pipx, when `pipx` itself is broken too | `uvx pipx reinstall-all --python python3` |
43
+ | uv | `uv tool install --reinstall --python 3.13 --managed-python throughline-transform --with-executables-from throughline` |
44
+
45
+ An install made with uv's `--managed-python` does not hit this: the operating system
46
+ does not touch the Python uv manages. `tl doctor` (throughline releases after 6.0.0) says
47
+ which Python runs `tl` and how it was installed.
48
+
25
49
  ## What it does not do
26
50
 
27
51
  **It never renders an item's words.** The Markdown is asked of `tl docs` over a
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "throughline-transform"
7
- version = "0.7.0"
7
+ version = "0.7.1"
8
8
  description = "Turn a throughline requirements graph on disk, committed or not, into the forms its readers open: Markdown, a folder of Obsidian notes, CSV, an Excel workbook, a Word document, or a print-ready HTML document. Ships the tl-transform CLI."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -32,6 +32,8 @@ classifiers = [
32
32
  "Programming Language :: Python :: 3",
33
33
  "Programming Language :: Python :: 3.11",
34
34
  "Programming Language :: Python :: 3.12",
35
+ "Programming Language :: Python :: 3.13",
36
+ "Programming Language :: Python :: 3.14",
35
37
  "Topic :: Software Development :: Documentation",
36
38
  "Topic :: Office/Business",
37
39
  ]
@@ -40,28 +40,53 @@ def _region(directive: str) -> str:
40
40
  return f"<!-- tl:{directive} -->\n<!-- tl:end -->"
41
41
 
42
42
 
43
- def _within(expression: str, opts: Options) -> str:
44
- """A directive's filter, joined with the items named, so tl docs writes only those (SR-0016).
43
+ class _Filters:
44
+ """Filters written in the language the graph declares (SR-0021).
45
45
 
46
- The identifiers are ones the graph holds (the command refuses any other), so
47
- each is written as a quoted literal the filter language reads (tl:SR-0045).
46
+ tl reads every filter of a project in the one language its configuration names
47
+ as ``filter_language`` under ``[project]`` (tl:SR-0337): ``gql`` for a graph
48
+ made or migrated by tl 6, the earlier expression language where it names none.
49
+ The tool never guesses a filter's language from its text, so neither does this.
48
50
  """
49
- if not opts.only:
50
- return expression
51
- named = ", ".join(repr(uid) for uid in opts.only)
52
- return f"({expression}) and (uid in [{named}])"
51
+
52
+ def __init__(self, graph: Graph) -> None:
53
+ project = graph.config.get("project") or {}
54
+ self.gql = project.get("filter_language") == "gql"
55
+
56
+ @property
57
+ def every(self) -> str:
58
+ return "TRUE" if self.gql else "True"
59
+
60
+ def incoming(self, link_type: str) -> str:
61
+ if self.gql:
62
+ return f"EXISTS {{ (item)<-[:{link_type}]-() }}"
63
+ return f"links.incoming({link_type!r})"
64
+
65
+ def within(self, expression: str, opts: Options) -> str:
66
+ """A directive's filter, joined with the items named, so tl docs writes only those (SR-0016).
67
+
68
+ The identifiers are ones the graph holds (the command refuses any other), so
69
+ each is written as a quoted literal the filter language reads (tl:SR-0045).
70
+ """
71
+ if not opts.only:
72
+ return expression
73
+ named = ", ".join(repr(uid) for uid in opts.only)
74
+ if self.gql:
75
+ return f"({expression}) AND (item.uid IN [{named}])"
76
+ return f"({expression}) and (uid in [{named}])"
53
77
 
54
78
 
55
79
  def directive_document(graph: Graph, opts: Options, provenance: Provenance) -> str:
56
80
  """The document the tool is asked to fill."""
81
+ f = _Filters(graph)
57
82
  lines: list[str] = [f"# {provenance.repository} — requirements", ""]
58
83
  lines += [f"- {line}" for line in provenance.lines()]
59
84
  lines.append("")
60
85
 
61
86
  if opts.stats:
62
- lines += ["## Summary", "", _region(f"stats {_within('True', opts)}"), ""]
87
+ lines += ["## Summary", "", _region(f"stats {f.within(f.every, opts)}"), ""]
63
88
  if opts.body in ("table", "both"):
64
- lines += ["## Items", "", _region(f"table {_within('True', opts)}"), ""]
89
+ lines += ["## Items", "", _region(f"table {f.within(f.every, opts)}"), ""]
65
90
  if opts.matrix:
66
91
  # One matrix per grounding link type the graph declares, each over the
67
92
  # items something actually reaches by that link. Over every item a
@@ -71,16 +96,16 @@ def directive_document(graph: Graph, opts: Options, provenance: Provenance) -> s
71
96
  lines += [
72
97
  f"### {link_type.replace('_', ' ')}",
73
98
  "",
74
- _region(f"matrix incoming:{link_type} {_within(f'links.incoming({link_type!r})', opts)}"),
99
+ _region(f"matrix incoming:{link_type} {f.within(f.incoming(link_type), opts)}"),
75
100
  "",
76
101
  ]
77
102
  if opts.body in ("catalog", "both"):
78
- lines += ["## Every item", "", _region(f"catalog {_within('True', opts)}"), ""]
103
+ lines += ["## Every item", "", _region(f"catalog {f.within(f.every, opts)}"), ""]
79
104
  # The words every cited clause answers to. Only over a composed graph: the
80
105
  # directive is the composer's, and a graph adopting no source has nothing
81
106
  # to mirror.
82
107
  if graph.composed:
83
- lines += ["## Clauses of adopted sources", "", _region(f"sourced {_within('True', opts)}"), ""]
108
+ lines += ["## Clauses of adopted sources", "", _region(f"sourced {f.within(f.every, opts)}"), ""]
84
109
  return "\n".join(lines)
85
110
 
86
111
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: throughline-transform
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Turn a throughline requirements graph on disk, committed or not, into the forms its readers open: Markdown, a folder of Obsidian notes, CSV, an Excel workbook, a Word document, or a print-ready HTML document. Ships the tl-transform CLI.
5
5
  Author-email: Henry J Grech-Cini <henry.grechcini@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -15,6 +15,8 @@ Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
18
20
  Classifier: Topic :: Software Development :: Documentation
19
21
  Classifier: Topic :: Office/Business
20
22
  Requires-Python: >=3.11
@@ -32,7 +34,7 @@ A [throughline](https://github.com/rhodium-org/throughline) requirements graph o
32
34
  disk — committed or not — in the forms its readers open. One command, one file:
33
35
 
34
36
  ```bash
35
- pipx install throughline-transform # pulls tl along too
37
+ uv tool install --python 3.13 --managed-python throughline-transform --with-executables-from throughline # tl too
36
38
 
37
39
  tl-transform md -C idd # Markdown, written by the tool itself
38
40
  tl-transform notes -C idd # a folder of notes for Obsidian (zip)
@@ -50,6 +52,30 @@ disk. The editor needs the graph on GitHub. This does not — it reads the worki
50
52
  tree, and the output says whether that tree was clean, carried uncommitted
51
53
  changes, or was not under version control at all.
52
54
 
55
+ `--managed-python` has uv use its own build of Python rather than the operating
56
+ system's, so an OS Python upgrade does not break the install;
57
+ `--with-executables-from throughline` puts `tl` on your `PATH` beside it. Get uv
58
+ from [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).
59
+ If you use pipx instead: `pipx install --include-deps throughline-transform`.
60
+
61
+ ## If `tl-transform` says `bad interpreter` after a Python upgrade
62
+
63
+ A tool installed with pipx (or into any virtual environment) runs on the Python it
64
+ was installed with. When your operating system upgrades its Python and removes the
65
+ old one, every command in that environment fails before any of its code runs, with
66
+ `bad interpreter` or `No module named ...`. Your graphs are fine; the environment has
67
+ to be rebuilt on the new Python:
68
+
69
+ | Installed with | Rebuild with |
70
+ |---|---|
71
+ | pipx | `pipx reinstall-all --python python3` (or the new Python's full path) |
72
+ | pipx, when `pipx` itself is broken too | `uvx pipx reinstall-all --python python3` |
73
+ | uv | `uv tool install --reinstall --python 3.13 --managed-python throughline-transform --with-executables-from throughline` |
74
+
75
+ An install made with uv's `--managed-python` does not hit this: the operating system
76
+ does not touch the Python uv manages. `tl doctor` (throughline releases after 6.0.0) says
77
+ which Python runs `tl` and how it was installed.
78
+
53
79
  ## What it does not do
54
80
 
55
81
  **It never renders an item's words.** The Markdown is asked of `tl docs` over a
@@ -17,6 +17,8 @@ import subprocess
17
17
  import sys
18
18
  from pathlib import Path
19
19
 
20
+ import tomllib
21
+
20
22
  import pytest
21
23
 
22
24
  BIN = Path(sys.executable).parent
@@ -69,13 +71,14 @@ implements = { from = ["system_requirement"], to = ["user_requirement"] }
69
71
 
70
72
  """
71
73
  config.write_text(head + model + tail, encoding="utf-8")
72
- for prefix, folder, title in (
73
- ("INT", "intents", "Intents"),
74
- ("NG", "non-goals", "Non-goals"),
75
- ("UR", "user-requirements", "User requirements"),
76
- ("SR", "system-requirements", "System requirements"),
74
+ # tl 6 makes a register with the item type it holds (tl SR-0351).
75
+ for prefix, folder, title, type_ in (
76
+ ("INT", "intents", "Intents", "intent"),
77
+ ("NG", "non-goals", "Non-goals", "non_goal"),
78
+ ("UR", "user-requirements", "User requirements", "user_requirement"),
79
+ ("SR", "system-requirements", "System requirements", "system_requirement"),
77
80
  ):
78
- _tl(root, "register", "new", prefix, folder, "--title", title)
81
+ _tl(root, "register", "new", prefix, folder, "--title", title, "--type", type_)
79
82
 
80
83
 
81
84
  def _new(root: Path, prefix: str, type_: str, title: str, text: str, **kw: str) -> str:
@@ -108,7 +111,8 @@ def plain_graph(tmp_path_factory: pytest.TempPathFactory) -> Path:
108
111
  _tl(root, "link", sr2, sr1, "--type", "relates")
109
112
  _tl(root, "link", sr3, sr1, "--type", "refines")
110
113
  _tl(root, "amend", sr1, "--rationale", "Because a second renderer drifts. Rejected: writing it here.")
111
- _tl(root, "check", "--strict")
114
+ # Sound, not signed: tl 6's --strict also refuses an unsigned item.
115
+ _tl(root, "check")
112
116
  return root
113
117
 
114
118
 
@@ -125,7 +129,7 @@ def composed_graph(tmp_path_factory: pytest.TempPathFactory, plain_graph: Path)
125
129
  ur = _new(root, "UR", "user_requirement", "Cite a clause", "One requirement satisfies a borrowed clause.", ground=intent, ground_type="derives_from")
126
130
  sr = _new(root, "SR", "system_requirement", "Satisfies the source", "It does what the clause says.", ground=ur, ground_type="implements", attr_priority="must")
127
131
  _tl(root, "link", sr, "src:SR-0001", "--type", "satisfies", compose=True)
128
- _tl(root, "check", "--strict", compose=True)
132
+ _tl(root, "check", compose=True)
129
133
  return root
130
134
 
131
135
 
@@ -142,3 +146,19 @@ def git_graph(tmp_path_factory: pytest.TempPathFactory, plain_graph: Path) -> Pa
142
146
  git("add", ".")
143
147
  git("commit", "-q", "-m", "fixture")
144
148
  return repo / "idd"
149
+
150
+
151
+ def born(root: Path) -> str:
152
+ """The status the fixture graph's tl gave its items at birth: ``draft`` before
153
+ tl 6, ``proposed`` from it. Read from an item, so the suite runs on either."""
154
+ for line in (root / "system-requirements" / "SR-0001.yml").read_text(encoding="utf-8").splitlines():
155
+ if line.startswith("status:"):
156
+ return line.split(":", 1)[1].strip()
157
+ raise AssertionError("SR-0001 has no status")
158
+
159
+
160
+ def every(root: Path) -> str:
161
+ """The filter that selects every item, in the language the graph declares."""
162
+ with open(root / "throughline.toml", "rb") as fh:
163
+ project = tomllib.load(fh).get("project", {})
164
+ return "TRUE" if project.get("filter_language") == "gql" else "True"
@@ -13,6 +13,8 @@ from pathlib import Path
13
13
 
14
14
  import pytest
15
15
 
16
+ from conftest import born, every
17
+
16
18
  from throughline_transform import markdown as md
17
19
  from throughline_transform.blocks import as_blocks
18
20
  from throughline_transform.cli import main, produce
@@ -84,7 +86,7 @@ def test_markdown_is_written_by_the_tool(plain_graph: Path):
84
86
 
85
87
  def test_markdown_keeps_markers_when_asked(plain_graph: Path):
86
88
  _, text = _md(plain_graph, markers=True)
87
- assert "<!-- tl:catalog True -->" in text and "<!-- tl:end -->" in text
89
+ assert f"<!-- tl:catalog {every(plain_graph)} -->" in text and "<!-- tl:end -->" in text
88
90
 
89
91
 
90
92
  def test_markdown_options_change_the_document(plain_graph: Path):
@@ -115,7 +117,7 @@ def test_blocks_read_the_shape_of_the_tools_output(plain_graph: Path):
115
117
  items = [b for b in blocks if b.item]
116
118
  assert len(items) == 7
117
119
  sr1 = next(b for b in items if b.item["uid"] == "SR-0001")
118
- assert sr1.heading == 4 and sr1.item["status"] == "draft"
120
+ assert sr1.heading == 4 and sr1.item["status"] == born(plain_graph)
119
121
  assert 'a colon, "quotes" & <angles>' in sr1.text
120
122
  quotes = [b for b in blocks if b.quote]
121
123
  assert any("The tool writes the Markdown." in b.text for b in quotes)
@@ -234,11 +236,11 @@ def test_notes_are_one_per_item_with_front_matter_and_links(plain_graph: Path):
234
236
  assert "System requirements/SR-0001.md" in entries and "Intents/INT-0001.md" in entries
235
237
  sr2 = entries["System requirements/SR-0002.md"].decode()
236
238
  assert sr2.startswith('---\nuid: "SR-0002"\n')
237
- assert 'priority: "should"' in sr2 and ' - "type/system_requirement"' in sr2 and ' - "status/draft"' in sr2
239
+ assert 'priority: "should"' in sr2 and ' - "type/system_requirement"' in sr2 and f' - "status/{born(plain_graph)}"' in sr2
238
240
  # The body is the tool's block reshaped for a note (SR-0009): a heading,
239
241
  # the type and status beneath, no attribute line, the incoming links.
240
242
  body = sr2.split("\n---\n", 1)[1]
241
- assert body.startswith("# SR-0002 — Declare it in \\[\\[sources\\]\\]\nsystem requirement · draft\n")
243
+ assert body.startswith(f"# SR-0002 — Declare it in \\[\\[sources\\]\\]\nsystem requirement · {born(plain_graph)}\n")
242
244
  assert "**priority**" not in body and "**origin**" not in body
243
245
  assert "*Relates:* [[SR-0001]]" in sr2
244
246
  assert "*Implements:* [[UR-0002]]" in sr2
@@ -13,6 +13,8 @@ from pathlib import Path
13
13
 
14
14
  import pytest
15
15
 
16
+ from conftest import born
17
+
16
18
  from throughline_transform import project
17
19
  from throughline_transform.cli import main
18
20
  from throughline_transform.provenance import CLEAN, DIRTY, UNTRACKED, stated
@@ -31,7 +33,7 @@ def test_blocks_output_is_the_documents_structure(plain_graph: Path, tmp_path: P
31
33
  items = [b for b in blocks if "item" in b]
32
34
  assert len(items) == 7
33
35
  sr1 = next(b for b in items if b["item"]["uid"] == "SR-0001")
34
- assert sr1["heading"] == 4 and sr1["item"]["type"] == "system_requirement" and sr1["item"]["status"] == "draft"
36
+ assert sr1["heading"] == 4 and sr1["item"]["type"] == "system_requirement" and sr1["item"]["status"] == born(plain_graph)
35
37
  assert any(b.get("quote") for b in blocks) and any(b.get("small") for b in blocks)
36
38
  assert any(b.get("group") and b["text"] == "System requirements" for b in blocks)
37
39
  assert any("table" in b for b in blocks) # --body both carries the table of items