tracecite-docs 0.0.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 (49) hide show
  1. tracecite_docs-0.0.1/LICENSE +21 -0
  2. tracecite_docs-0.0.1/MANIFEST.in +2 -0
  3. tracecite_docs-0.0.1/PKG-INFO +94 -0
  4. tracecite_docs-0.0.1/README.md +58 -0
  5. tracecite_docs-0.0.1/pyproject.toml +52 -0
  6. tracecite_docs-0.0.1/setup.cfg +4 -0
  7. tracecite_docs-0.0.1/src/tracecite_docs/__init__.py +35 -0
  8. tracecite_docs-0.0.1/src/tracecite_docs/__main__.py +3 -0
  9. tracecite_docs-0.0.1/src/tracecite_docs/cli.py +580 -0
  10. tracecite_docs-0.0.1/src/tracecite_docs/docs/__init__.py +56 -0
  11. tracecite_docs-0.0.1/src/tracecite_docs/docs/build.py +382 -0
  12. tracecite_docs-0.0.1/src/tracecite_docs/docs/config.py +114 -0
  13. tracecite_docs-0.0.1/src/tracecite_docs/docs/contract.py +17 -0
  14. tracecite_docs-0.0.1/src/tracecite_docs/docs/modes.py +240 -0
  15. tracecite_docs-0.0.1/src/tracecite_docs/docs/stage.py +408 -0
  16. tracecite_docs-0.0.1/src/tracecite_docs/docs/vectorize.py +458 -0
  17. tracecite_docs-0.0.1/src/tracecite_docs/tables/__init__.py +41 -0
  18. tracecite_docs-0.0.1/src/tracecite_docs/tables/_text.py +142 -0
  19. tracecite_docs-0.0.1/src/tracecite_docs/tables/document.py +582 -0
  20. tracecite_docs-0.0.1/src/tracecite_docs/tables/html.py +232 -0
  21. tracecite_docs-0.0.1/src/tracecite_docs/tables/models.py +211 -0
  22. tracecite_docs-0.0.1/src/tracecite_docs/tables/normalise.py +787 -0
  23. tracecite_docs-0.0.1/src/tracecite_docs/tables/pandoc.py +427 -0
  24. tracecite_docs-0.0.1/src/tracecite_docs/tables/publish.py +248 -0
  25. tracecite_docs-0.0.1/src/tracecite_docs/tables/render.py +128 -0
  26. tracecite_docs-0.0.1/src/tracecite_docs/tables/site.py +457 -0
  27. tracecite_docs-0.0.1/src/tracecite_docs.egg-info/PKG-INFO +94 -0
  28. tracecite_docs-0.0.1/src/tracecite_docs.egg-info/SOURCES.txt +47 -0
  29. tracecite_docs-0.0.1/src/tracecite_docs.egg-info/dependency_links.txt +1 -0
  30. tracecite_docs-0.0.1/src/tracecite_docs.egg-info/entry_points.txt +2 -0
  31. tracecite_docs-0.0.1/src/tracecite_docs.egg-info/requires.txt +21 -0
  32. tracecite_docs-0.0.1/src/tracecite_docs.egg-info/top_level.txt +1 -0
  33. tracecite_docs-0.0.1/tests/docs/__init__.py +0 -0
  34. tracecite_docs-0.0.1/tests/docs/conftest.py +28 -0
  35. tracecite_docs-0.0.1/tests/docs/test_config.py +109 -0
  36. tracecite_docs-0.0.1/tests/docs/test_docs_cli.py +62 -0
  37. tracecite_docs-0.0.1/tests/docs/test_modes.py +351 -0
  38. tracecite_docs-0.0.1/tests/docs/test_stage.py +406 -0
  39. tracecite_docs-0.0.1/tests/docs/test_vectorize.py +463 -0
  40. tracecite_docs-0.0.1/tests/fixtures/docs-vector/.gitignore +2 -0
  41. tracecite_docs-0.0.1/tests/fixtures/docs-vector/docs/authored/.gitkeep +0 -0
  42. tracecite_docs-0.0.1/tests/fixtures/docs-vector/docs/retained/assets/diagram.svg +1 -0
  43. tracecite_docs-0.0.1/tests/fixtures/docs-vector/docs/retained/guide.md +7 -0
  44. tracecite_docs-0.0.1/tests/fixtures/docs-vector/docs/source-links.toml +9 -0
  45. tracecite_docs-0.0.1/tests/fixtures/docs-vector/sources/report.pdf +1 -0
  46. tracecite_docs-0.0.1/tests/fixtures/docs-vector/tracecite.toml +9 -0
  47. tracecite_docs-0.0.1/tests/test_docs.py +497 -0
  48. tracecite_docs-0.0.1/tests/test_tables.py +421 -0
  49. tracecite_docs-0.0.1/tests/test_version.py +19 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ARPST-UniMelb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ graft tests
2
+ global-exclude __pycache__ *.py[cod]
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: tracecite-docs
3
+ Version: 0.0.1
4
+ Summary: Source-linked table normalisation and evidence retrieval for executable documentation
5
+ Author: ARPST-UniMelb
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://yasirroni.github.io/tracecite/
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Operating System :: MacOS
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Scientific/Engineering
14
+ Classifier: Topic :: Text Processing :: Indexing
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: tracecite>=0.0.3
19
+ Requires-Dist: beautifulsoup4>=4.12
20
+ Requires-Dist: PyYAML>=6.0
21
+ Requires-Dist: tabulate>=0.9
22
+ Provides-Extra: docs
23
+ Requires-Dist: ipykernel>=7.3; extra == "docs"
24
+ Requires-Dist: nbclient>=0.11; extra == "docs"
25
+ Requires-Dist: nbformat>=5.10; extra == "docs"
26
+ Requires-Dist: tracecite-docs[pandas]; extra == "docs"
27
+ Provides-Extra: evidence
28
+ Requires-Dist: tracecite[evidence]>=0.0.3; extra == "evidence"
29
+ Provides-Extra: pandas
30
+ Requires-Dist: pandas>=2.0; extra == "pandas"
31
+ Provides-Extra: test
32
+ Requires-Dist: build>=1.2; extra == "test"
33
+ Requires-Dist: pytest<9,>=8.4; extra == "test"
34
+ Requires-Dist: tracecite-docs[pandas]; extra == "test"
35
+ Dynamic: license-file
36
+
37
+ # tracecite-docs
38
+
39
+ Table normalisation, citable documentation and inspection-site builds for the TraceCite family.
40
+ The shared [TraceCite documentation](https://yasirroni.github.io/tracecite/) covers evidence retrieval, normalised tables and their source citations together.
41
+ This package has no separate documentation site.
42
+
43
+ ## Installation and use
44
+
45
+ Requires TraceCite 0.0.3 or later.
46
+
47
+ ```bash
48
+ uv pip install tracecite-docs # After the first release.
49
+ uv pip install 'tracecite-docs[docs,evidence]'
50
+ tracecite-docs build docs
51
+ tracecite-docs table normalise table.md
52
+ tracecite-docs table check docs/build
53
+ ```
54
+
55
+ The `docs` extra enables Python/Jupyter page execution; `evidence` enables documentation indexing and retrieval through the core package.
56
+ Pandas table authoring is available with `tracecite-docs[pandas]` and is included in `docs` and `test`.
57
+ Quarto/Pandoc and Julia remain external tools when the selected inputs require them.
58
+
59
+ ```python
60
+ from tracecite_docs import knowledge_table
61
+ from tracecite_docs.docs import build_docs, stage_docs, sync_docs_index
62
+ ```
63
+
64
+ The executable is also available as `python -m tracecite_docs`.
65
+ Former `tracecite docs` subcommands are top-level commands here; `table`, `document` and `prepare` retain their structure.
66
+ The former table-validation command is `tracecite-docs table check`; documentation contract checking is `tracecite-docs check --docs-config ...`.
67
+ Core evidence commands continue to use `tracecite`.
68
+ Existing configuration names, table markers, source links and normaliser identities are preserved.
69
+
70
+ ## Development
71
+
72
+ ```bash
73
+ uv sync --locked --extra docs --extra evidence --extra test
74
+ uvx pre-commit run --all-files --show-diff-on-failure
75
+ uvx pre-commit run pyright --all-files --hook-stage manual
76
+ uv run --no-sync pytest -q -rs
77
+ ```
78
+
79
+ The implementation and behavioural tests were extracted from TraceCite commit `a942f138ba8534536b7aaa8f4b2062d1ba84c27d`, preserving its MIT licence.
80
+ `requirements.txt` is derived with `uv export --all-extras --no-emit-project --no-hashes --output-file requirements.txt`.
81
+
82
+ ```bash
83
+ uv pip install --upgrade build
84
+ uv build
85
+ uv pip install --upgrade twine
86
+ uvx twine check dist/*
87
+ uv build --no-sources
88
+ uvx twine check --strict dist/*
89
+ # After checking the artefacts and configuring the upload repository:
90
+ uvx twine upload --repository tracecite-docs dist/*
91
+ ```
92
+
93
+ The upload alias names a private Twine configuration section; it does not select a project name.
94
+ Inspect and smoke-test the exact wheel and sdist before uploading.
@@ -0,0 +1,58 @@
1
+ # tracecite-docs
2
+
3
+ Table normalisation, citable documentation and inspection-site builds for the TraceCite family.
4
+ The shared [TraceCite documentation](https://yasirroni.github.io/tracecite/) covers evidence retrieval, normalised tables and their source citations together.
5
+ This package has no separate documentation site.
6
+
7
+ ## Installation and use
8
+
9
+ Requires TraceCite 0.0.3 or later.
10
+
11
+ ```bash
12
+ uv pip install tracecite-docs # After the first release.
13
+ uv pip install 'tracecite-docs[docs,evidence]'
14
+ tracecite-docs build docs
15
+ tracecite-docs table normalise table.md
16
+ tracecite-docs table check docs/build
17
+ ```
18
+
19
+ The `docs` extra enables Python/Jupyter page execution; `evidence` enables documentation indexing and retrieval through the core package.
20
+ Pandas table authoring is available with `tracecite-docs[pandas]` and is included in `docs` and `test`.
21
+ Quarto/Pandoc and Julia remain external tools when the selected inputs require them.
22
+
23
+ ```python
24
+ from tracecite_docs import knowledge_table
25
+ from tracecite_docs.docs import build_docs, stage_docs, sync_docs_index
26
+ ```
27
+
28
+ The executable is also available as `python -m tracecite_docs`.
29
+ Former `tracecite docs` subcommands are top-level commands here; `table`, `document` and `prepare` retain their structure.
30
+ The former table-validation command is `tracecite-docs table check`; documentation contract checking is `tracecite-docs check --docs-config ...`.
31
+ Core evidence commands continue to use `tracecite`.
32
+ Existing configuration names, table markers, source links and normaliser identities are preserved.
33
+
34
+ ## Development
35
+
36
+ ```bash
37
+ uv sync --locked --extra docs --extra evidence --extra test
38
+ uvx pre-commit run --all-files --show-diff-on-failure
39
+ uvx pre-commit run pyright --all-files --hook-stage manual
40
+ uv run --no-sync pytest -q -rs
41
+ ```
42
+
43
+ The implementation and behavioural tests were extracted from TraceCite commit `a942f138ba8534536b7aaa8f4b2062d1ba84c27d`, preserving its MIT licence.
44
+ `requirements.txt` is derived with `uv export --all-extras --no-emit-project --no-hashes --output-file requirements.txt`.
45
+
46
+ ```bash
47
+ uv pip install --upgrade build
48
+ uv build
49
+ uv pip install --upgrade twine
50
+ uvx twine check dist/*
51
+ uv build --no-sources
52
+ uvx twine check --strict dist/*
53
+ # After checking the artefacts and configuring the upload repository:
54
+ uvx twine upload --repository tracecite-docs dist/*
55
+ ```
56
+
57
+ The upload alias names a private Twine configuration section; it does not select a project name.
58
+ Inspect and smoke-test the exact wheel and sdist before uploading.
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "tracecite-docs"
7
+ version = "0.0.1"
8
+ description = "Source-linked table normalisation and evidence retrieval for executable documentation"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{name = "ARPST-UniMelb"}]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Science/Research",
17
+ "Operating System :: MacOS",
18
+ "Operating System :: POSIX :: Linux",
19
+ "Programming Language :: Python :: 3",
20
+ "Topic :: Scientific/Engineering",
21
+ "Topic :: Text Processing :: Indexing",
22
+ ]
23
+ dependencies = [
24
+ "tracecite>=0.0.3",
25
+ "beautifulsoup4>=4.12",
26
+ "PyYAML>=6.0",
27
+ "tabulate>=0.9",
28
+ ]
29
+
30
+ [project.urls]
31
+ Documentation = "https://yasirroni.github.io/tracecite/"
32
+
33
+ [project.optional-dependencies]
34
+ # Quarto runs Python documentation pages through a Jupyter kernel.
35
+ docs = ["ipykernel>=7.3", "nbclient>=0.11", "nbformat>=5.10", "tracecite-docs[pandas]"]
36
+ evidence = ["tracecite[evidence]>=0.0.3"]
37
+ # knowledge_table and computed_first_row_summary take a pandas DataFrame.
38
+ pandas = ["pandas>=2.0"]
39
+ test = ["build>=1.2", "pytest>=8.4,<9", "tracecite-docs[pandas]"]
40
+
41
+ [project.scripts]
42
+ tracecite-docs = "tracecite_docs.cli:main"
43
+
44
+ [tool.setuptools.packages.find]
45
+ where = ["src"]
46
+ include = ["tracecite_docs*"]
47
+
48
+ [tool.pyright]
49
+ include = ["src", "tests"]
50
+ pythonVersion = "3.11"
51
+ venvPath = "."
52
+ venv = ".venv"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,35 @@
1
+ """TraceCite Docs: source-linked normalisation for executable knowledge documents."""
2
+
3
+ from importlib.metadata import version
4
+
5
+ from .tables import (
6
+ NORMALISER_VERSION,
7
+ NormalisedTable,
8
+ TableContext,
9
+ TableDiagnostic,
10
+ TableNormalisationError,
11
+ augment_document_with_embedding_text,
12
+ export_embedding_site,
13
+ html_table_to_markdown,
14
+ knowledge_table,
15
+ normalise_document_tables,
16
+ normalise_html_table,
17
+ normalise_pandoc_table,
18
+ )
19
+
20
+ __version__ = version("tracecite-docs")
21
+
22
+ __all__ = [
23
+ "NORMALISER_VERSION",
24
+ "NormalisedTable",
25
+ "TableContext",
26
+ "TableDiagnostic",
27
+ "TableNormalisationError",
28
+ "augment_document_with_embedding_text",
29
+ "export_embedding_site",
30
+ "html_table_to_markdown",
31
+ "knowledge_table",
32
+ "normalise_document_tables",
33
+ "normalise_html_table",
34
+ "normalise_pandoc_table",
35
+ ]
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())