throughline-transform 0.3.0__tar.gz → 0.4.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.3.0/src/throughline_transform.egg-info → throughline_transform-0.4.1}/PKG-INFO +15 -16
  2. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/README.md +13 -13
  3. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/pyproject.toml +2 -2
  4. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/cli.py +7 -6
  5. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/project.py +2 -2
  6. {throughline_transform-0.3.0 → throughline_transform-0.4.1/src/throughline_transform.egg-info}/PKG-INFO +15 -16
  7. throughline_transform-0.4.1/src/throughline_transform.egg-info/requires.txt +4 -0
  8. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/tests/conftest.py +1 -1
  9. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/tests/test_outputs.py +9 -0
  10. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/tests/test_surface.py +1 -1
  11. throughline_transform-0.3.0/src/throughline_transform.egg-info/requires.txt +0 -5
  12. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/LICENSE +0 -0
  13. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/MANIFEST.in +0 -0
  14. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/NOTICE +0 -0
  15. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/setup.cfg +0 -0
  16. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/__init__.py +0 -0
  17. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/blocks.py +0 -0
  18. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/html.py +0 -0
  19. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/markdown.py +0 -0
  20. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/model.py +0 -0
  21. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/notes.py +0 -0
  22. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/office.py +0 -0
  23. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/package.py +0 -0
  24. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/progress.py +0 -0
  25. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/provenance.py +0 -0
  26. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/shape.py +0 -0
  27. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform/tables.py +0 -0
  28. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform.egg-info/SOURCES.txt +0 -0
  29. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform.egg-info/dependency_links.txt +0 -0
  30. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform.egg-info/entry_points.txt +0 -0
  31. {throughline_transform-0.3.0 → throughline_transform-0.4.1}/src/throughline_transform.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: throughline-transform
3
- Version: 0.3.0
3
+ Version: 0.4.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
@@ -21,8 +21,7 @@ Requires-Python: >=3.11
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  License-File: NOTICE
24
- Requires-Dist: throughline-compose>=0.16.1
25
- Requires-Dist: throughline>=2.2.0
24
+ Requires-Dist: throughline>=3.11.1
26
25
  Provides-Extra: dev
27
26
  Requires-Dist: pytest>=8.0; extra == "dev"
28
27
  Dynamic: license-file
@@ -33,7 +32,7 @@ A [throughline](https://github.com/rhodium-org/throughline) requirements graph o
33
32
  disk — committed or not — in the forms its readers open. One command, one file:
34
33
 
35
34
  ```bash
36
- pipx install throughline-transform # pulls tl and tl-compose along too
35
+ pipx install throughline-transform # pulls tl along too
37
36
 
38
37
  tl-transform md -C idd # Markdown, written by the tool itself
39
38
  tl-transform notes -C idd # a folder of notes for Obsidian (zip)
@@ -64,16 +63,16 @@ worse than none. That is [`NG-0001`](idd/non-goals/NG-0001.yml).
64
63
  **It ships no PDF writer** ([`NG-0002`](idd/non-goals/NG-0002.yml)). Every
65
64
  browser prints to PDF with a renderer that is already on the machine.
66
65
 
67
- **It depends on nothing but the family.** `throughline` and
68
- `throughline-compose`, and the standard library's `zipfile` for the two Office
69
- formats, which are written from their own specifications.
66
+ **It depends on nothing but the family.** `throughline` alone (composition is
67
+ the Tool's own since 3.11.1), and the standard library's `zipfile` for the two
68
+ Office formats, which are written from their own specifications.
70
69
 
71
70
  ## Which tool answers
72
71
 
73
- A graph whose `throughline.toml` declares `[[sources]]` is read through
74
- `tl-compose`; any other through `tl`. That is not cosmetic: over a composed graph
75
- the core command exits cleanly and writes a borrowed clause as its synthetic uid
76
- alone, dropping the reference number a conformance document exists to carry.
72
+ Every graph is read through `tl`, which composes a graph that declares
73
+ `[[sources]]` itself, so a borrowed clause is written with the reference number
74
+ a conformance document exists to carry; `tl-compose` is a second name for the
75
+ same program.
77
76
  The tool is found beside this package's interpreter first and on the path
78
77
  second, and is run as a command — its command line is the surface it publishes.
79
78
 
@@ -104,11 +103,11 @@ time otherwise reads as a hang.
104
103
  ## One implementation, two surfaces
105
104
 
106
105
  The [throughline editor](https://github.com/rhodium-org/throughline-editor)
107
- runs this package as a wheel under Pyodide beside `tl` and `tl-compose`, so an
108
- export from a browser tab and an export from a terminal are the same bytes for
109
- the same graph at the same commit. Pyodide has no processes, so there the tool
110
- calls the console entry point `tl` or `tl-compose` declares in its package
111
- metadata — the same function the command runs — instead of spawning it.
106
+ runs this package as a wheel under Pyodide beside `tl`, so an export from a
107
+ browser tab and an export from a terminal are the same bytes for the same graph
108
+ at the same commit. Pyodide has no processes, so there the tool calls the
109
+ console entry point `tl` declares in its package metadata — the same function
110
+ the command runs — instead of spawning it.
112
111
 
113
112
  ## Self-hosting
114
113
 
@@ -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 and tl-compose along too
7
+ pipx install throughline-transform # pulls tl along 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)
@@ -35,16 +35,16 @@ worse than none. That is [`NG-0001`](idd/non-goals/NG-0001.yml).
35
35
  **It ships no PDF writer** ([`NG-0002`](idd/non-goals/NG-0002.yml)). Every
36
36
  browser prints to PDF with a renderer that is already on the machine.
37
37
 
38
- **It depends on nothing but the family.** `throughline` and
39
- `throughline-compose`, and the standard library's `zipfile` for the two Office
40
- formats, which are written from their own specifications.
38
+ **It depends on nothing but the family.** `throughline` alone (composition is
39
+ the Tool's own since 3.11.1), and the standard library's `zipfile` for the two
40
+ Office formats, which are written from their own specifications.
41
41
 
42
42
  ## Which tool answers
43
43
 
44
- A graph whose `throughline.toml` declares `[[sources]]` is read through
45
- `tl-compose`; any other through `tl`. That is not cosmetic: over a composed graph
46
- the core command exits cleanly and writes a borrowed clause as its synthetic uid
47
- alone, dropping the reference number a conformance document exists to carry.
44
+ Every graph is read through `tl`, which composes a graph that declares
45
+ `[[sources]]` itself, so a borrowed clause is written with the reference number
46
+ a conformance document exists to carry; `tl-compose` is a second name for the
47
+ same program.
48
48
  The tool is found beside this package's interpreter first and on the path
49
49
  second, and is run as a command — its command line is the surface it publishes.
50
50
 
@@ -75,11 +75,11 @@ time otherwise reads as a hang.
75
75
  ## One implementation, two surfaces
76
76
 
77
77
  The [throughline editor](https://github.com/rhodium-org/throughline-editor)
78
- runs this package as a wheel under Pyodide beside `tl` and `tl-compose`, so an
79
- export from a browser tab and an export from a terminal are the same bytes for
80
- the same graph at the same commit. Pyodide has no processes, so there the tool
81
- calls the console entry point `tl` or `tl-compose` declares in its package
82
- metadata — the same function the command runs — instead of spawning it.
78
+ runs this package as a wheel under Pyodide beside `tl`, so an export from a
79
+ browser tab and an export from a terminal are the same bytes for the same graph
80
+ at the same commit. Pyodide has no processes, so there the tool calls the
81
+ console entry point `tl` declares in its package metadata — the same function
82
+ the command runs — instead of spawning it.
83
83
 
84
84
  ## Self-hosting
85
85
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "throughline-transform"
7
- version = "0.3.0"
7
+ version = "0.4.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"
@@ -41,7 +41,7 @@ classifiers = [
41
41
  # 0.16.1 are the shapes this package reads (SR-0003); it was written against those
42
42
  # releases and the floors say so. compose 0.16.1 requires throughline 2.2.0, so the
43
43
  # two floors are one fact stated at both ends.
44
- dependencies = ["throughline-compose>=0.16.1", "throughline>=2.2.0"]
44
+ dependencies = ["throughline>=3.11.1"] # composition is the Tool's own since 3.11.1 (throughline UR-0037); tl-compose is a second name for tl
45
45
 
46
46
  [project.optional-dependencies]
47
47
  dev = ["pytest>=8.0"]
@@ -43,10 +43,7 @@ FOLDERS = ("notes", "csv")
43
43
 
44
44
 
45
45
  def version_string() -> str:
46
- return (
47
- f"tl-transform {_v('throughline-transform')} "
48
- f"(throughline-compose {_v('throughline-compose')}, throughline {_v('throughline')})"
49
- )
46
+ return f"tl-transform {_v('throughline-transform')} (throughline {_v('throughline')})"
50
47
 
51
48
 
52
49
  def build_parser() -> argparse.ArgumentParser:
@@ -155,10 +152,14 @@ def main(argv: list[str] | None = None) -> int:
155
152
  try:
156
153
  root = find_graph(args.directory)
157
154
  graph = load(root)
155
+ # UR-0003: the tool that produced the output, named as tl-ratify names itself —
156
+ # this package first, then the throughline that read the graph. The dump
157
+ # records throughline's bare distribution version.
158
+ producer = f"throughline-transform {_v('throughline-transform')} (throughline {graph.tool_version})"
158
159
  provenance = (
159
- stated(graph.tool_version, args.repository, args.ref, args.commit, args.tree)
160
+ stated(producer, args.repository, args.ref, args.commit, args.tree)
160
161
  if any((args.repository, args.ref, args.commit, args.tree))
161
- else provenance_of(root, graph.tool_version)
162
+ else provenance_of(root, producer)
162
163
  )
163
164
  result, default = produce(graph, root, args.format, opts, provenance)
164
165
  with slow(f"still writing {args.output or default}…"):
@@ -109,7 +109,7 @@ def _in_process(name: str, argv: list[str]) -> tuple[int, str, str]:
109
109
 
110
110
  def run(root: Path, args: list[str], composed: bool) -> str:
111
111
  """Run the tool over the graph and hand back what it wrote."""
112
- name = "tl-compose" if composed else "tl"
112
+ name = "tl" # tl composes a graph that declares sources itself (throughline 3.11.1)
113
113
  argv = ["-C", str(root), *args]
114
114
  if has_processes():
115
115
  command = [executable(name), *argv]
@@ -129,7 +129,7 @@ def run(root: Path, args: list[str], composed: bool) -> str:
129
129
 
130
130
 
131
131
  def _tool(composed: bool) -> str:
132
- return "tl-compose" if composed else "tl"
132
+ return "tl" # tl composes a graph that declares sources itself (throughline 3.11.1)
133
133
 
134
134
 
135
135
  def load(root: Path) -> Graph:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: throughline-transform
3
- Version: 0.3.0
3
+ Version: 0.4.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
@@ -21,8 +21,7 @@ Requires-Python: >=3.11
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  License-File: NOTICE
24
- Requires-Dist: throughline-compose>=0.16.1
25
- Requires-Dist: throughline>=2.2.0
24
+ Requires-Dist: throughline>=3.11.1
26
25
  Provides-Extra: dev
27
26
  Requires-Dist: pytest>=8.0; extra == "dev"
28
27
  Dynamic: license-file
@@ -33,7 +32,7 @@ A [throughline](https://github.com/rhodium-org/throughline) requirements graph o
33
32
  disk — committed or not — in the forms its readers open. One command, one file:
34
33
 
35
34
  ```bash
36
- pipx install throughline-transform # pulls tl and tl-compose along too
35
+ pipx install throughline-transform # pulls tl along too
37
36
 
38
37
  tl-transform md -C idd # Markdown, written by the tool itself
39
38
  tl-transform notes -C idd # a folder of notes for Obsidian (zip)
@@ -64,16 +63,16 @@ worse than none. That is [`NG-0001`](idd/non-goals/NG-0001.yml).
64
63
  **It ships no PDF writer** ([`NG-0002`](idd/non-goals/NG-0002.yml)). Every
65
64
  browser prints to PDF with a renderer that is already on the machine.
66
65
 
67
- **It depends on nothing but the family.** `throughline` and
68
- `throughline-compose`, and the standard library's `zipfile` for the two Office
69
- formats, which are written from their own specifications.
66
+ **It depends on nothing but the family.** `throughline` alone (composition is
67
+ the Tool's own since 3.11.1), and the standard library's `zipfile` for the two
68
+ Office formats, which are written from their own specifications.
70
69
 
71
70
  ## Which tool answers
72
71
 
73
- A graph whose `throughline.toml` declares `[[sources]]` is read through
74
- `tl-compose`; any other through `tl`. That is not cosmetic: over a composed graph
75
- the core command exits cleanly and writes a borrowed clause as its synthetic uid
76
- alone, dropping the reference number a conformance document exists to carry.
72
+ Every graph is read through `tl`, which composes a graph that declares
73
+ `[[sources]]` itself, so a borrowed clause is written with the reference number
74
+ a conformance document exists to carry; `tl-compose` is a second name for the
75
+ same program.
77
76
  The tool is found beside this package's interpreter first and on the path
78
77
  second, and is run as a command — its command line is the surface it publishes.
79
78
 
@@ -104,11 +103,11 @@ time otherwise reads as a hang.
104
103
  ## One implementation, two surfaces
105
104
 
106
105
  The [throughline editor](https://github.com/rhodium-org/throughline-editor)
107
- runs this package as a wheel under Pyodide beside `tl` and `tl-compose`, so an
108
- export from a browser tab and an export from a terminal are the same bytes for
109
- the same graph at the same commit. Pyodide has no processes, so there the tool
110
- calls the console entry point `tl` or `tl-compose` declares in its package
111
- metadata — the same function the command runs — instead of spawning it.
106
+ runs this package as a wheel under Pyodide beside `tl`, so an export from a
107
+ browser tab and an export from a terminal are the same bytes for the same graph
108
+ at the same commit. Pyodide has no processes, so there the tool calls the
109
+ console entry point `tl` declares in its package metadata — the same function
110
+ the command runs — instead of spawning it.
112
111
 
113
112
  ## Self-hosting
114
113
 
@@ -0,0 +1,4 @@
1
+ throughline>=3.11.1
2
+
3
+ [dev]
4
+ pytest>=8.0
@@ -23,7 +23,7 @@ BIN = Path(sys.executable).parent
23
23
 
24
24
 
25
25
  def _tl(root: Path, *args: str, compose: bool = False) -> str:
26
- exe = BIN / ("tl-compose" if compose else "tl")
26
+ exe = BIN / "tl" # tl composes a graph that declares sources itself (throughline 3.11.1)
27
27
  if not exe.exists(): # pragma: no cover - only when the suite runs outside its venv
28
28
  exe = Path(shutil.which(exe.name) or exe.name)
29
29
  done = subprocess.run([str(exe), "-C", str(root), *args], capture_output=True, text=True, encoding="utf-8")
@@ -322,6 +322,15 @@ def test_provenance_reads_git_and_notices_uncommitted_changes(git_graph: Path):
322
322
  subprocess.run(["git", "-C", str(git_graph), "checkout", "--", "."], check=True)
323
323
 
324
324
 
325
+ def test_the_output_names_the_tool_that_produced_it(plain_graph: Path, tmp_path: Path):
326
+ # UR-0003: "the tool that produced it" is this package, named first, and then the
327
+ # throughline that read the graph; the dump records only throughline's version.
328
+ out = tmp_path / "named.md"
329
+ assert main(["md", "-C", str(plain_graph), "-o", str(out), "--repository", "r"]) == 0
330
+ line = next(l for l in out.read_text().splitlines() if "Produced by:" in l)
331
+ assert re.search(r"Produced by: throughline-transform \S+ \(throughline \S+\)$", line), line
332
+
333
+
325
334
  # --- the command (UR-0001, SR-0011) -----------------------------------------
326
335
 
327
336
 
@@ -167,7 +167,7 @@ def test_a_slow_step_is_named_once_on_stderr(composed_graph: Path, tmp_path: Pat
167
167
  assert code == 0
168
168
  # Once per slow step: the reading step was made slow, and with the
169
169
  # threshold this low the docs step over a composed graph may be too.
170
- assert err.startswith("tl-transform: still reading the graph with tl-compose — its sources may be being fetched")
170
+ assert err.startswith("tl-transform: still reading the graph with tl — its sources may be being fetched")
171
171
  assert err.count("still reading") == 1
172
172
  assert all(line.startswith("tl-transform: still ") for line in err.splitlines())
173
173
  assert str(tmp_path / "s.md") in out
@@ -1,5 +0,0 @@
1
- throughline-compose>=0.16.1
2
- throughline>=2.2.0
3
-
4
- [dev]
5
- pytest>=8.0