Add frozen TikZRefinery demo baseline and build pipeline
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
TikZRefinery report autobuild | Version 0.1.4-alpha
|
||||
PASS TikZRefinerySubmission.pdf | TinyTeX, bibliography, index
|
||||
PASS TikZRefinery.pdf | TinyTeX, bibliography, index
|
||||
PASS TikZRefinery-0.1.4-alpha.zip | 1326487 bytes
|
||||
ZIP contains TikZRefinery-0.1.4-alpha.pdf
|
||||
PASS diagram index | authored figures, classification and final page map
|
||||
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"documents/assets/design-diagrams/catalogue-records.tex": "6487882f7fa7439902f2bb44dc6550b0ed66e9d8192cbf848f0dba397dde2c7e",
|
||||
"documents/assets/design-diagrams/class-controller.tex": "85d011ed44860d3cfc98d30f4fe416412d75de809150f18c610bd39196056097",
|
||||
"documents/assets/design-diagrams/class-document.tex": "7b380a89a4c8a0447bde40eceacaeaf574495f383506283de322cdf818b25328",
|
||||
"documents/assets/design-diagrams/class-edit-service.tex": "c65f3b89b48419c824592080a9e591da3644f2a75b0b0de1649f68edce56c3ca",
|
||||
"documents/assets/design-diagrams/class-history.tex": "4a6e72881b567c79c0fc3efa568f388978ec3223f9f1e419addbf1fa40d47b4d",
|
||||
"documents/assets/design-diagrams/class-mapper.tex": "0e174f409501ca0285c34bf83a23d87bdc7ea58dc1cc7bc442905ed86fb6c355",
|
||||
"documents/assets/design-diagrams/class-parser.tex": "a1d0b18685ddc85b01656ceda9c43dabaceac0170296370bd6ba9865cb767861",
|
||||
"documents/assets/design-diagrams/class-scene.tex": "f6d1245470028c63c74cf2de49b78fbb791546723ecfc995c15b20efd71ba064",
|
||||
"documents/assets/design-diagrams/class-view.tex": "19c72bf853adb6e037516dc4380250c3feca79dff3505edd211dd106c0794bdc",
|
||||
"documents/assets/design-diagrams/class-window.tex": "17681bf181ed958da0838d6a9c0e396bbfa6a5928d012ff8b78c17c1b29f021e",
|
||||
"documents/assets/design-diagrams/classes.tex": "261576a555018ab0c82d15e5ff86fc78c49ae5647eb7b379dcc67a4aa7e97670",
|
||||
"documents/assets/design-diagrams/close-activity.tex": "7a35b0fc90c594ba79a27852ddc40b8e65fe753d6dbc39739fe75e0752d504f6",
|
||||
"documents/assets/design-diagrams/creation-activity.tex": "b4a32cda812ffaa2040df59b03a031f81095fa03b3b3f450a5c06efb5baf5a81",
|
||||
"documents/assets/design-diagrams/current-plugin-deployment.tex": "3e9d553e8ffd75b736f8c0ffc97280f95fcbdba8f34422ddb68c3c7dd2949ad0",
|
||||
"documents/assets/design-diagrams/current-provider-classes.tex": "24d21bad70ce26f45df07ca077c427d423c74c750fc62077f55389dfb027c890",
|
||||
"documents/assets/design-diagrams/current-sidebar-classes.tex": "a0a8b1b0aac865148aab0b78cfc85bf9ad7c97433323190969e8fb89699def0f",
|
||||
"documents/assets/design-diagrams/deployment.tex": "adfcfe0281e1867a4b75fef21e2fc1e8ca57ca57a71f032a5bbd4d3efde38922",
|
||||
"documents/assets/design-diagrams/drag-activity.tex": "05b2e2a86c8d3f431e40ebf083a3e02c385b65c0844ea141634cb53bf6d5868c",
|
||||
"documents/assets/design-diagrams/drag-sequence.tex": "51f4fce2ef025cbae545f3f7d06a7bf8b408d0b231d2b021a668f3f5c1b99127",
|
||||
"documents/assets/design-diagrams/element-contracts.tex": "46b405b48428e57514b8970815a3d2416c04e8f7e8bd88ec0a4295b382cf4ec7",
|
||||
"documents/assets/design-diagrams/history-sequence.tex": "a800946d5e81ea30b33ea64c408c68559ca52bcf253fe4783514273ce30ebeb3",
|
||||
"documents/assets/design-diagrams/label-selection-activity.tex": "b97fdf45e8b58c8683ce4800d095bc653b866c04af6b44d2919cb06f5059de82",
|
||||
"documents/assets/design-diagrams/mvc.tex": "9e5f4609296cc7b7ba8097a3241ccb0836290bfd512d9ad6dd5da5f93e163dae",
|
||||
"documents/assets/design-diagrams/open-activity.tex": "5516bb400cab6027d4607916e1b5ca1ff5651906e7e91f280f224b1d45d44c4c",
|
||||
"documents/assets/design-diagrams/plugin-classes.tex": "743bfe62db519d51b90fa30f7132d37cfbc214124c67a76ae80d3dd793f619b5",
|
||||
"documents/assets/design-diagrams/plugin-components.tex": "6e058a19692001c1626a82f3ac8e6fb8cc93687dfe7b29f0517825cbc9130ba8",
|
||||
"documents/assets/design-diagrams/plugin-lifecycle.tex": "0a7cee892eea48fb6b29c73d80c008e781e323e029e8b4331e3fa9f2ce6f3ff2",
|
||||
"documents/assets/design-diagrams/plugin-mvc.tex": "31c1211db55cc8ecb03cba8e59048e30098959adf1aa9627f3f07bb53a0ebef0",
|
||||
"documents/assets/design-diagrams/plugin-records.tex": "81623ee2a0e0639f75a9afeddf70a5ac00faec054a93123b1aa8bc37095e59a7",
|
||||
"documents/assets/design-diagrams/plugin-sequence.tex": "eae15ada2c7faaed700f7cdb24db55483d69931178a987e72c154dd0ff95f98f",
|
||||
"documents/assets/design-diagrams/save-activity.tex": "20443b2267e203fcf6dacceb42b7edacb7d42d1cf81c9dc8633c613bbeef1fb1",
|
||||
"documents/assets/design-diagrams/sidebar-classes.tex": "f31d63c2ba9522c065a279d0c778c97335bba1d662db3f5cc5203a11501ed15c",
|
||||
"documents/assets/design-diagrams/sidebar-collapsed.tex": "9cdefcb4f87313a64a2b74fbc234b4a4a72c5671b2c36e6932cf1982627e764d",
|
||||
"documents/assets/design-diagrams/sidebar-expanded.tex": "89d29b52d99d02529cb1039015fbcf908316099e5455412afdf9ca8260cb336c",
|
||||
"documents/assets/design-diagrams/sidebar-mvc.tex": "99b3b3c7bd088a08bb98a741f630d963baa43752e3c938c048241f2c3996b675",
|
||||
"documents/assets/design-diagrams/styles.tex": "5581188946e673bad0763a146b707d85e12690deb9523d1dde359e9809ca0881",
|
||||
"documents/assets/design-diagrams/transaction-activity.tex": "f5e3afa72f39402b6790c624701b2f80d34d379544207312ff4f10c93b651f1c",
|
||||
"documents/assets/design-diagrams/transaction-classes.tex": "a235c4ff77d8dd2b2730cf7f252e25589cc7fe6a031c32cacbf13230c479bef0",
|
||||
"documents/assets/design-diagrams/transaction-details.tex": "4916b9f5375e43b64720d0b1b8bdc9bba7ddacad7036a630c55527834352df7d",
|
||||
"documents/assets/design-diagrams/transaction-sequence.tex": "a87d439d7fc9ed650793006e6981d13c23ae98530e827982ca62a244f13f9564",
|
||||
"documents/assets/undo-redo-2026-11-24/application-history.png": "d58abd56b7af533bebb0a8f3d51af0a787c2c4c569f069199f26d25b21778d89",
|
||||
"documents/assets/use-case-diagrams/styles.tex": "83ed553e3ab8ca99e4b8214c30306ea0ea1442c889eaa002a7bc2d1e52f3b60c",
|
||||
"documents/assets/use-case-diagrams/uc-001-open.tex": "4b6babe6fcba9a77c76fc36b6dec404c45529e6a2b916dfc3ec14d3a101c9bd6",
|
||||
"documents/assets/use-case-diagrams/uc-002-move.tex": "fb1b7539609c7f34ae0eba42fa18dccdb0f891332a35dd7ea53d5cf6b6a88015",
|
||||
"documents/assets/use-case-diagrams/uc-003-save.tex": "4feeaff2823dc720e9d73a603a3b7d6faa0bb1a5f34fa661c9e7102873e97d55",
|
||||
"documents/assets/use-case-diagrams/uc-004-history.tex": "8cebb20c516fbb04e8a8c9b32572d1df9aacab637454e0e4fcdf707dd02048e1",
|
||||
"documents/assets/use-case-diagrams/uc-005.tex": "75fbed0cf673f572904bfc6b8f12765659957991d5d2967d56dd2d7eb457bcca",
|
||||
"documents/assets/use-case-diagrams/uc-006.tex": "58615106560d5e415568ced27933bb188c739af21ae46d6db8ad431214245dca",
|
||||
"documents/assets/use-case-diagrams/uc-007.tex": "740c17dcebc1a850ab705e6c72eff83380ae5def0112d5f6f132706c94c17c0c",
|
||||
"documents/assets/use-case-diagrams/uc-008.tex": "b0cf426b973fcb74f3d28beda9fc0513273f150d874491dba4bf917c045d8565",
|
||||
"documents/assets/use-case-diagrams/uc-009.tex": "55a9debd977a65eac306fce9c20c374a4839c34b2ea9a67f6daeb1fd878b11ed",
|
||||
"documents/diagram-manifest.json": "bc4fec8391ae74fb1792f4af0f490dbc5be5639d44489cd8721359df57c1e46f",
|
||||
"documents/latex/cornell.cls": "724d4fc4768aca18b1f6046882db077fb1262562206b0fe77d4c1822ef22f81e",
|
||||
"documents/latex/TikZRefinery.tex": "cb33ff5edc4b2f99a7d9851233014053c4e517f652447801dbe245e2b82fce99",
|
||||
"documents/latex/tkrAbstract.tex": "f1f7866c6b4fbbd45191955daf7f310f0ba78db10c9ef3b7b85f37750c5a722a",
|
||||
"documents/latex/tkrAIAgentGuide.tex": "0be01a5ed0fc12cb32214f4758b89cc678a344be06589d662c873d1393aafb74",
|
||||
"documents/latex/tkrAIAgentRequirements.tex": "02b348ffec7c4e0397b92d1d2432662fda80ca934acfbc43c80db6506e81f957",
|
||||
"documents/latex/tkrAIPromptLog.tex": "9c970e5a51f037caf3ab189b1b184674bb632aeb7665b7137a073c89a49a3c5b",
|
||||
"documents/latex/tkrCodesStandards.tex": "d369f0e1c572978eba8016a4a249e08fe0b81e01db1ad7838b56fb549edcd2b4",
|
||||
"documents/latex/tkrCurrentPlugin.tex": "d77650f2a1716ef1cc871d86ba96fbcda33b017acf3e42fa346fdc9c6f7f803c",
|
||||
"documents/latex/tkrDesignDocuments.tex": "a145fa9e588b1e9799de234ad10db053db9af5aeeea1ec7ddcd241819de90171",
|
||||
"documents/latex/tkrDevelopmentPlan.tex": "c2b5223f6a8fbaad68a6fe3cb95a9bcc8d9beb8383db1712949e64d1661b1238",
|
||||
"documents/latex/tkrDocumentHistory.tex": "af5bec6ce23e8370d59efd0b457c3acf05d8a0358bb4fb1140f23302a00b915d",
|
||||
"documents/latex/tkrGlossary.tex": "47535da3dc3c3e7f938a40cc8d44e7d88d63b88f5e79076fecf0debb801c2b1d",
|
||||
"documents/latex/tkrIntroduction.tex": "c35008bed0a8a5d44f6e38adc9d5105bf2b4125a253de3665025c3edb2b93838",
|
||||
"documents/latex/tkrOpenDesignDecisions.tex": "5acd4d3fc1c899f1feb35e7c78652ffcb6de8442a5ee373d531e605837423e8d",
|
||||
"documents/latex/tkrPluginDesign.tex": "2eef4cd287546b79209166099cddc594581f64d7eff4c700db4255b00e0f0e0f",
|
||||
"documents/latex/tkrPrologue.tex": "db4b84b23f06005d0c61cbdf716a7da220860b1a11fc6d31bd4c431b22a32e86",
|
||||
"documents/latex/tkrReferences.bib": "d65673d3fdd28bac6940f46e9f3eee7d032d04b87471f096cb5e797211f24d38",
|
||||
"documents/latex/tkrReportRoadmap.tex": "71b4ff59e1cff79b4eecc18798909e62b96354d6c4a91c397422c9f65e6ff845",
|
||||
"documents/latex/tkrRequirements.tex": "f7b87572a08508c51dc46dc82314533d93ad1225d12f0c159da004a0ab7972c0",
|
||||
"documents/latex/tkrSidebarDesign.tex": "07e29bff6ac339b5436cb53bec17d2adcdc984f338e41a4fbfcacfdadb89fb84",
|
||||
"documents/latex/tkrSoftwareArchitecture.tex": "c691045094043aebe1e8c05bc4c200e5c85771a85c884b1f82b04159498ab764",
|
||||
"documents/latex/tkrTeamDeclaration.tex": "c1f79eefa4bc6453299623fc1b1189924a8f353b46fc6e5efc7b106e4133b9fd",
|
||||
"documents/latex/tkrTests.tex": "b515e7232375ecb71146efcfe1bb39f9b488be3c686a64738df0579efe8e80ce",
|
||||
"documents/latex/tkrTraceability.tex": "07676ee05fc53ed42e293878c9cbbd5f838f3385bd552e9ec155bf2d3cbcc6d8",
|
||||
"documents/latex/tkrTransactionDesign.tex": "08f7670a6f49118142c853f10037cd17e6929f21ec7b53e81a7a8408eccb6364",
|
||||
"documents/latex/tkrUseCases.tex": "e58f4368fe7f7bbf9cdac11d2ced57069c93581d953ebe9b1075bbc02c2c6d78",
|
||||
"documents/latex/tkrUserInterfaceDesign.tex": "ba10dc0620954340e3e8f128ad1ad33b218d770389f38d7974e3c7ffbb7d715a",
|
||||
"documents/latex/tkrUserStories.tex": "22778d6c23c74ccf11839911f2b7762b86e785844ea47d039951e810b30ce285",
|
||||
"documents/latex/tkrValidation.tex": "ddf66fc461716d111a0503f95d7c4446403128f0216a0a9f68b2d653801c9e31",
|
||||
"documents/latex/tkrVerification.tex": "33f2ada84eda3812452fb08f4c8d5752b8b7673ec251ee284aeea05eb85dbcb5",
|
||||
"documents/latex/tkrWeeklyReports.tex": "7965461cada1c4703ec59a75f12b084097912aaf6339fb0896c3a1ef8b06e667",
|
||||
"documents/update-diagram-index.py": "587b9876b3a405753a0b0a1747ca6cce3a7f24ea8672d196f928285613e7ac16"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
"""Exercise maintenance failure guards without changing authored project files."""
|
||||
from pathlib import Path
|
||||
import importlib.util, sys, json, contextlib, io
|
||||
sys.dont_write_bytecode=True
|
||||
root=next(p for p in Path(__file__).resolve().parents if (p/'AGENTS.md').is_file())
|
||||
spec=importlib.util.spec_from_file_location('diagram_index',root/'documents/update-diagram-index.py')
|
||||
module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)
|
||||
task=root/'work/diagram-audit-2026-11-24/index-check';task.mkdir(exist_ok=True)
|
||||
results=[]
|
||||
def call(*args):
|
||||
sys.argv=['update-diagram-index.py',*args]
|
||||
with contextlib.redirect_stdout(io.StringIO()):module.main()
|
||||
def expect(name, phrase, action):
|
||||
try:action()
|
||||
except ValueError as exc:
|
||||
assert phrase in str(exc),(name,str(exc))
|
||||
results.append(dict(check=name,result='PASS',diagnostic=str(exc)))
|
||||
else:raise AssertionError(name+' did not fail')
|
||||
|
||||
original_sources=module.sources
|
||||
def duplicate_sources():
|
||||
yield from original_sources()
|
||||
yield root/'documents/latex/tkrSoftwareArchitecture.tex', r'\begin{figure}\caption{Duplicate}\label{Figure:AlphaDeployment}\end{figure}'
|
||||
module.sources=duplicate_sources
|
||||
expect('Duplicate active figure label','Duplicate active figure labels',module.inventory)
|
||||
def missing_sources():
|
||||
yield root/'documents/latex/tkrSoftwareArchitecture.tex', r'\begin{figure}\input{missing-audit-example.tex}\caption{Missing}\label{Figure:Missing}\end{figure}'
|
||||
module.sources=missing_sources
|
||||
expect('Missing editable input','Missing figure asset',module.inventory)
|
||||
module.sources=original_sources
|
||||
original_manifest=module.MANIFEST
|
||||
manifest=json.loads(original_manifest.read_text());manifest['figures'].pop('Figure:AlphaDeployment')
|
||||
test_manifest=task/'manifest.json';test_manifest.write_text(json.dumps(manifest))
|
||||
module.MANIFEST=test_manifest
|
||||
call('--build-directory',str(task),'--record-sources')
|
||||
expect('Unclassified active figure','Classify new figures',lambda:call('--build-directory',str(task)))
|
||||
module.MANIFEST=original_manifest
|
||||
call('--build-directory',str(task),'--record-sources')
|
||||
snapshot=task/'diagram-source-hashes.json';data=json.loads(snapshot.read_text());data[next(iter(data))]='0'*64;snapshot.write_text(json.dumps(data))
|
||||
expect('Source edits after build snapshot','Sources changed since the build snapshot',lambda:call('--build-directory',str(task)))
|
||||
(Path(__file__).parent/'index-checks.json').write_text(json.dumps(results,indent=2)+'\n')
|
||||
print('PASS 4 diagram-index maintenance guards; no authored source mutation')
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"version": "0.1.4-alpha",
|
||||
"protectedFilesUnchanged": 677,
|
||||
"registerCounts": {
|
||||
"RequirementID": 111,
|
||||
"TestCaseID": 82,
|
||||
"VerificationID": 111,
|
||||
"UseCaseID": 9,
|
||||
"UserStoryID": 11,
|
||||
"ValidationID": 11,
|
||||
"AIRequirementID": 17,
|
||||
"ReportRequirementID": 58
|
||||
},
|
||||
"applicationTestsRun": false,
|
||||
"pdfs": {
|
||||
"submission": {
|
||||
"pages": 254,
|
||||
"internalLinks": 3655,
|
||||
"namedDestinations": 1073,
|
||||
"figuresChecked": 51,
|
||||
"diagnostics": [],
|
||||
"underfullNotices": 5,
|
||||
"sha256": "6c3d6bd34cec5695abbebce177be253096197506dfd700a394732e9165182736"
|
||||
},
|
||||
"developer": {
|
||||
"pages": 323,
|
||||
"internalLinks": 3892,
|
||||
"namedDestinations": 1302,
|
||||
"figuresChecked": 51,
|
||||
"diagnostics": [],
|
||||
"underfullNotices": 5,
|
||||
"sha256": "3e262f2340454188ba961fda0e0844d0e8268a052bb8dbe0b6092df0918ffab2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"removedPath": "C:\\Users\\vince\\Documents\\Projects\\TikZRefinery\\work\\diagram-audit-2026-11-24",
|
||||
"removedFiles": 257,
|
||||
"reclaimedBytes": 48537113.0,
|
||||
"reclaimedMiB": 46.29,
|
||||
"removedMaterial": "Task-created individual raster pages, overview thumbnails, scratch scripts, standalone layout proofs and report build intermediates/duplicate outputs",
|
||||
"retainedEvidence": "Final contact sheets, check scripts/results, diagnostics, source hashes, prior checkpoint and frozen deployment source",
|
||||
"retainedContactSheets": 19,
|
||||
"protectedFilesUnchanged": 677,
|
||||
"canonicalDeliverablesVerified": true
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
\begin{tikzpicture}[
|
||||
font=\fontsize{9}{11}\selectfont,
|
||||
artifact/.style={draw=tkrBlue,fill=white,rounded corners=1pt,
|
||||
align=center,text width=5.5cm,inner sep=8pt},
|
||||
external/.style={artifact,draw=tkrGray,fill=tkrGray!5,text width=5.2cm},
|
||||
file/.style={artifact,draw=tkrGreen,fill=tkrGreen!5,text width=5.2cm},
|
||||
io/.style={<->,>=Stealth,thick,draw=tkrBlue},
|
||||
flow/.style={->,>=Stealth,thick,draw=tkrGray},
|
||||
dependency/.style={-{Straight Barb[length=2mm]},dashed,draw=tkrBlue},
|
||||
deploymentLabel/.style={font=\fontsize{8}{9.6}\selectfont,fill=none,inner sep=2pt,align=center}
|
||||
]
|
||||
% Version of the retained deployed artifact, independent of later report revisions.
|
||||
\def\tkrDeploymentVersion{0.10.3}
|
||||
\node[anchor=west,font=\fontsize{14.4}{17}\selectfont\bfseries,text=tkrBlue] at (0,0.9)
|
||||
{TikZRefinery --- frozen Alpha \tkrDeploymentVersion};
|
||||
\node[anchor=west,font=\fontsize{9}{11}\selectfont,text=tkrGray] at (0,0.35)
|
||||
{Retained Windows demo and manual comparison workflow};
|
||||
|
||||
% A physical device with a nested execution environment, rather than a cloud topology.
|
||||
\fill[tkrBlue!8] (0,0) rectangle (16.4,-1.1);
|
||||
\draw[very thick,draw=tkrBlue] (0,0) rectangle (16.4,-13.4);
|
||||
\draw[draw=tkrBlue] (0,0) -- (0.28,0.2) -- (16.68,0.2) -- (16.68,-13.2) -- (16.4,-13.4);
|
||||
\draw[draw=tkrBlue] (16.4,0) -- (16.68,0.2);
|
||||
\node[anchor=west,align=left,text=tkrBlue] at (0.45,-0.55)
|
||||
{\textbf{\guillemotleft device\guillemotright\ Author's computer}\\Windows x64};
|
||||
\draw[draw=tkrGray] (0.4,-1.4) rectangle (16,-13.0);
|
||||
\node[anchor=west,font=\bfseries,text=tkrGray,fill=none,inner sep=4pt] at (0.65,-1.75)
|
||||
{\guillemotleft executionEnvironment\guillemotright\ Windows desktop};
|
||||
|
||||
% Artifacts shipped together. The compiler and PDF viewer are not in this bundle.
|
||||
\fill[tkrBlue!3] (0.8,-2.15) rectangle (7.55,-10.4);
|
||||
\draw[draw=tkrBlue,thick] (0.8,-2.15) rectangle (7.55,-10.4);
|
||||
\node[anchor=west,font=\bfseries,text=tkrBlue] at (1.05,-2.55)
|
||||
{Deployed application folder};
|
||||
\node[artifact] (application) at (4.15,-3.85) {
|
||||
\guillemotleft artifact\guillemotright\\
|
||||
\textbf{TikZRefinery.exe}\\
|
||||
Alpha \tkrDeploymentVersion\\[2pt]
|
||||
Runs as a local desktop process
|
||||
};
|
||||
\node[artifact] (runtime) at (4.15,-6.55) {
|
||||
\guillemotleft artifact\guillemotright\\
|
||||
\textbf{Bundled runtime files}\\
|
||||
Qt 6.12 DLLs and platform plugins\\
|
||||
MinGW compiler-runtime DLLs
|
||||
};
|
||||
\draw[dependency] (application.south) -- node[deploymentLabel,right]{loads} (runtime.north);
|
||||
\node[artifact] (identity) at (4.15,-9.05) {
|
||||
\guillemotleft artifact\guillemotright\\
|
||||
\textbf{Build-identity records}\\
|
||||
\texttt{build-info.json}\\
|
||||
\texttt{package-manifest.json}\\[2pt]
|
||||
Version, source checkpoint and state
|
||||
};
|
||||
|
||||
\node[file] (source) at (12.1,-3.85) {
|
||||
\guillemotleft artifact\guillemotright\\
|
||||
\textbf{Local TikZ source files}\\
|
||||
User-selected \texttt{.tex} / \texttt{.tikz} paths
|
||||
};
|
||||
\draw[io] (application.east) -- node[deploymentLabel,above,pos=0.62,text width=1.5cm,font=\fontsize{7}{8.4}\selectfont]{Open /\\guarded Save} (source.west);
|
||||
|
||||
\node[external] (compiler) at (12.1,-6.65) {
|
||||
\guillemotleft external toolchain\guillemotright\\
|
||||
\textbf{Installed TinyTeX}\\
|
||||
\texttt{pdflatex}\\
|
||||
LaTeX and TikZ packages\\[2pt]
|
||||
Started separately by the author
|
||||
};
|
||||
\draw[flow] (source.south) -- node[deploymentLabel,right]{reads saved source\\manual compilation} (compiler.north);
|
||||
|
||||
\node[file] (pdf) at (12.1,-9.25) {
|
||||
\guillemotleft artifact\guillemotright\\
|
||||
\textbf{Compiled PDF}\\
|
||||
Output from the external toolchain
|
||||
};
|
||||
\draw[flow] (compiler.south) -- node[deploymentLabel,right]{produces} (pdf.north);
|
||||
\node[external] (viewer) at (12.1,-11.7) {
|
||||
\guillemotleft process\guillemotright\\
|
||||
\textbf{External PDF viewer}\\
|
||||
Opened separately by the author
|
||||
};
|
||||
\draw[flow] (pdf.south) -- node[deploymentLabel,right]{author opens} (viewer.north);
|
||||
|
||||
\node[align=left,text width=6.2cm,anchor=north west,text=tkrGray,font=\fontsize{8}{9.6}\selectfont]
|
||||
at (1.05,-10.6) {
|
||||
\textbf{Current boundary}\\[3pt]
|
||||
Compiler and PDF viewer are external.\\
|
||||
No application server is deployed.\\[4pt]
|
||||
Identity is embedded in the executable;\\
|
||||
JSON files are companion records.
|
||||
};
|
||||
\node[anchor=west,font=\fontsize{8}{9.6}\selectfont,text=tkrGray] at (0,-13.95)
|
||||
{Solid arrows: local file I/O or manual output flow. Dashed arrow: runtime dependency.};
|
||||
\end{tikzpicture}
|
||||
@@ -0,0 +1,37 @@
|
||||
# Report diagram audit - November 24, 2026
|
||||
|
||||
Vincent authorized reconciliation of the report diagrams with current code and
|
||||
reviewed design, retaining **0.1.4-alpha**, plus a maintained diagram index.
|
||||
This is local documentation/build-support work. No application implementation,
|
||||
package rebuild, new application test run, commit, push or cloud publication.
|
||||
|
||||
| Family | Disposition and evidence |
|
||||
|---|---|
|
||||
| Requirements, stories and use-case goals | Reviewed unchanged. No product obligation, ID or acceptance status added. Focused UC-001/002/003 notes now distinguish provider support, planned endpoint editing, retained history and future compilation. UC-004 links the current restoration sequence. Existing reciprocal product mappings remain. |
|
||||
| Current architecture | Updated physical deployment to the actual 0.1.4-alpha executable/module/runtime and external manual tools. Retained old deployment source and pre-audit PDFs. Corrected parser role, atomic candidate/source/history sequence, no-op paths and Open/Save/close history effects. |
|
||||
| Reviewed future design | Corrected existing-shell/extension labels, session-history distinctions, provider realization spacing, data-type notation and typed lifelines. Generic transactions, shared catalogue ownership, creation, labels, provider choice and updates remain planned. |
|
||||
| Naming feedback | Current diagrams retain actual `tkrRectangleShapeProvider`; the requested `tkrShapeProviderRectangle` is explicitly a planned rename. Coordinated code/files/build/test changes need a later authorized implementation task. DLL identity is distinct. |
|
||||
| Navigation/build | Added the Cornell class's existing List of Figures component, concise figure-list captions and explicit manifest. Build records physical pages at shipout and generates Markdown/JSON source/status/page indexes from final auxiliary records. A source snapshot rejects edits made after compilation began. Standard-library Python only; no new installation. |
|
||||
| Roadmap and AI guidance | RPT-050 records the requested navigation delivery; RPT-033 records this bounded audit. Existing AI-REQ-013--017 cover build/UML/review/impact; no new directive or directive status change. AGENTS/README and diagram README link the procedure. Whole-document impact/layout review remains required for design additions/changes. |
|
||||
| Evaluation | Product tests/verification/validation definitions and statuses unchanged. `checks.json` records unique IDs, all 51 figure destinations/page maps in both editions and all internal named links. `index-checks.json` records four maintenance failure guards. These are document/tool checks, not product acceptance. |
|
||||
| Supporting records | Updated Document History, Prompt Log, changelog and checkpoint at the same version by explicit user instruction. Glossary and external references reviewed unchanged: no new domain concept or external claim. Coding guide reviewed unchanged: source ownership/conventions and package identity are unchanged. |
|
||||
| Protected work | All 677 previously inventoried source/package/slide/submission files retain their SHA-256 values. Existing uncommitted work is preserved. Earlier report editions and prior checkpoint retained. |
|
||||
|
||||
Both editions use the complete TinyTeX bibliography/index sequence. Final logs
|
||||
have no errors, unresolved citations/references, duplicate destinations, overfull
|
||||
boxes or oversized floats. Five existing underfull spacing notices remain in
|
||||
each; the rendered layouts were checked. Submission: 254 pages; developer: 323.
|
||||
|
||||
All active figures were inspected through the source/page index, including
|
||||
current classes/MVC/provider/deployment, focused use cases, planned records,
|
||||
classes/components/lifecycle/creation/wireframes and current/planned activities
|
||||
and sequences. Whole-report thumbnail layout scans and detailed affected-page
|
||||
reviews covered navigation, history, roadmap and internal AI guidance/logs.
|
||||
Pixel-identical shared pages in the two editions were recorded rather than
|
||||
treated as separate visual findings. Contact sheets, selection records and final
|
||||
diagnostics provide compact review evidence; individual raster pages and build
|
||||
intermediates were temporary. See `cleanup.json` for exact cleanup accounting.
|
||||
|
||||
Final sources are the editable TeX files in the repository; the generated PDFs
|
||||
are canonical deliverables. `diagram-index.json` also carries source hashes and
|
||||
figure caption/section/line metadata. Do not use the PDF for requirement lookup.
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"check": "Duplicate active figure label",
|
||||
"result": "PASS",
|
||||
"diagnostic": "Duplicate active figure labels"
|
||||
},
|
||||
{
|
||||
"check": "Missing editable input",
|
||||
"result": "PASS",
|
||||
"diagnostic": "Missing figure asset C:\\Users\\vince\\Documents\\Projects\\TikZRefinery\\documents\\latex\\missing-audit-example.tex"
|
||||
},
|
||||
{
|
||||
"check": "Unclassified active figure",
|
||||
"result": "PASS",
|
||||
"diagnostic": "Classify new figures / remove stale entries: missing={'Figure:AlphaDeployment'}, inactive=set()"
|
||||
},
|
||||
{
|
||||
"check": "Source edits after build snapshot",
|
||||
"result": "PASS",
|
||||
"diagnostic": "Sources changed since the build snapshot; rebuild before generating page locations"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,449 @@
|
||||
{
|
||||
"submission": {
|
||||
"selectedPages": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
24,
|
||||
60,
|
||||
62,
|
||||
65,
|
||||
67,
|
||||
69,
|
||||
71,
|
||||
73,
|
||||
74,
|
||||
76,
|
||||
78,
|
||||
81,
|
||||
83,
|
||||
86,
|
||||
88,
|
||||
89,
|
||||
90,
|
||||
91,
|
||||
92,
|
||||
94,
|
||||
95,
|
||||
96,
|
||||
97,
|
||||
98,
|
||||
100,
|
||||
103,
|
||||
106,
|
||||
110,
|
||||
112,
|
||||
116,
|
||||
118,
|
||||
120,
|
||||
121,
|
||||
122,
|
||||
124,
|
||||
127,
|
||||
129,
|
||||
131,
|
||||
132,
|
||||
133,
|
||||
134,
|
||||
154,
|
||||
191,
|
||||
192,
|
||||
193,
|
||||
194,
|
||||
195,
|
||||
230,
|
||||
231,
|
||||
232,
|
||||
233,
|
||||
234,
|
||||
235,
|
||||
236,
|
||||
237,
|
||||
238,
|
||||
239,
|
||||
240,
|
||||
241,
|
||||
242,
|
||||
244,
|
||||
246,
|
||||
247
|
||||
],
|
||||
"pixelIdenticalPages": [],
|
||||
"sheets": 13,
|
||||
"overviewSheets": 11
|
||||
},
|
||||
"developer": {
|
||||
"selectedPages": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
27,
|
||||
63,
|
||||
65,
|
||||
68,
|
||||
70,
|
||||
72,
|
||||
74,
|
||||
76,
|
||||
77,
|
||||
79,
|
||||
81,
|
||||
84,
|
||||
86,
|
||||
89,
|
||||
91,
|
||||
92,
|
||||
93,
|
||||
94,
|
||||
95,
|
||||
97,
|
||||
98,
|
||||
99,
|
||||
100,
|
||||
101,
|
||||
103,
|
||||
106,
|
||||
109,
|
||||
113,
|
||||
115,
|
||||
119,
|
||||
121,
|
||||
123,
|
||||
124,
|
||||
125,
|
||||
127,
|
||||
130,
|
||||
132,
|
||||
134,
|
||||
135,
|
||||
136,
|
||||
137,
|
||||
157,
|
||||
194,
|
||||
195,
|
||||
196,
|
||||
197,
|
||||
198,
|
||||
233,
|
||||
234,
|
||||
235,
|
||||
236,
|
||||
237,
|
||||
238,
|
||||
239,
|
||||
240,
|
||||
241,
|
||||
242,
|
||||
243,
|
||||
244,
|
||||
245,
|
||||
247,
|
||||
249,
|
||||
250,
|
||||
262,
|
||||
263,
|
||||
264,
|
||||
265,
|
||||
266,
|
||||
267,
|
||||
268,
|
||||
269,
|
||||
270,
|
||||
271,
|
||||
306,
|
||||
307,
|
||||
308,
|
||||
309,
|
||||
310,
|
||||
311,
|
||||
315,
|
||||
316,
|
||||
317,
|
||||
318,
|
||||
319
|
||||
],
|
||||
"pixelIdenticalPages": [
|
||||
{
|
||||
"physical": 2,
|
||||
"same_as": "submission-2"
|
||||
},
|
||||
{
|
||||
"physical": 4,
|
||||
"same_as": "submission-4"
|
||||
},
|
||||
{
|
||||
"physical": 5,
|
||||
"same_as": "submission-5"
|
||||
},
|
||||
{
|
||||
"physical": 6,
|
||||
"same_as": "submission-6"
|
||||
},
|
||||
{
|
||||
"physical": 7,
|
||||
"same_as": "submission-7"
|
||||
},
|
||||
{
|
||||
"physical": 8,
|
||||
"same_as": "submission-8"
|
||||
},
|
||||
{
|
||||
"physical": 27,
|
||||
"same_as": "submission-24"
|
||||
},
|
||||
{
|
||||
"physical": 63,
|
||||
"same_as": "submission-60"
|
||||
},
|
||||
{
|
||||
"physical": 65,
|
||||
"same_as": "submission-62"
|
||||
},
|
||||
{
|
||||
"physical": 68,
|
||||
"same_as": "submission-65"
|
||||
},
|
||||
{
|
||||
"physical": 70,
|
||||
"same_as": "submission-67"
|
||||
},
|
||||
{
|
||||
"physical": 72,
|
||||
"same_as": "submission-69"
|
||||
},
|
||||
{
|
||||
"physical": 74,
|
||||
"same_as": "submission-71"
|
||||
},
|
||||
{
|
||||
"physical": 76,
|
||||
"same_as": "submission-73"
|
||||
},
|
||||
{
|
||||
"physical": 77,
|
||||
"same_as": "submission-74"
|
||||
},
|
||||
{
|
||||
"physical": 79,
|
||||
"same_as": "submission-76"
|
||||
},
|
||||
{
|
||||
"physical": 81,
|
||||
"same_as": "submission-78"
|
||||
},
|
||||
{
|
||||
"physical": 84,
|
||||
"same_as": "submission-81"
|
||||
},
|
||||
{
|
||||
"physical": 86,
|
||||
"same_as": "submission-83"
|
||||
},
|
||||
{
|
||||
"physical": 89,
|
||||
"same_as": "submission-86"
|
||||
},
|
||||
{
|
||||
"physical": 91,
|
||||
"same_as": "submission-88"
|
||||
},
|
||||
{
|
||||
"physical": 92,
|
||||
"same_as": "submission-89"
|
||||
},
|
||||
{
|
||||
"physical": 93,
|
||||
"same_as": "submission-90"
|
||||
},
|
||||
{
|
||||
"physical": 94,
|
||||
"same_as": "submission-91"
|
||||
},
|
||||
{
|
||||
"physical": 95,
|
||||
"same_as": "submission-92"
|
||||
},
|
||||
{
|
||||
"physical": 97,
|
||||
"same_as": "submission-94"
|
||||
},
|
||||
{
|
||||
"physical": 98,
|
||||
"same_as": "submission-95"
|
||||
},
|
||||
{
|
||||
"physical": 99,
|
||||
"same_as": "submission-96"
|
||||
},
|
||||
{
|
||||
"physical": 100,
|
||||
"same_as": "submission-97"
|
||||
},
|
||||
{
|
||||
"physical": 101,
|
||||
"same_as": "submission-98"
|
||||
},
|
||||
{
|
||||
"physical": 103,
|
||||
"same_as": "submission-100"
|
||||
},
|
||||
{
|
||||
"physical": 106,
|
||||
"same_as": "submission-103"
|
||||
},
|
||||
{
|
||||
"physical": 109,
|
||||
"same_as": "submission-106"
|
||||
},
|
||||
{
|
||||
"physical": 113,
|
||||
"same_as": "submission-110"
|
||||
},
|
||||
{
|
||||
"physical": 115,
|
||||
"same_as": "submission-112"
|
||||
},
|
||||
{
|
||||
"physical": 119,
|
||||
"same_as": "submission-116"
|
||||
},
|
||||
{
|
||||
"physical": 121,
|
||||
"same_as": "submission-118"
|
||||
},
|
||||
{
|
||||
"physical": 123,
|
||||
"same_as": "submission-120"
|
||||
},
|
||||
{
|
||||
"physical": 124,
|
||||
"same_as": "submission-121"
|
||||
},
|
||||
{
|
||||
"physical": 125,
|
||||
"same_as": "submission-122"
|
||||
},
|
||||
{
|
||||
"physical": 127,
|
||||
"same_as": "submission-124"
|
||||
},
|
||||
{
|
||||
"physical": 130,
|
||||
"same_as": "submission-127"
|
||||
},
|
||||
{
|
||||
"physical": 132,
|
||||
"same_as": "submission-129"
|
||||
},
|
||||
{
|
||||
"physical": 134,
|
||||
"same_as": "submission-131"
|
||||
},
|
||||
{
|
||||
"physical": 135,
|
||||
"same_as": "submission-132"
|
||||
},
|
||||
{
|
||||
"physical": 136,
|
||||
"same_as": "submission-133"
|
||||
},
|
||||
{
|
||||
"physical": 137,
|
||||
"same_as": "submission-134"
|
||||
},
|
||||
{
|
||||
"physical": 157,
|
||||
"same_as": "submission-154"
|
||||
},
|
||||
{
|
||||
"physical": 194,
|
||||
"same_as": "submission-191"
|
||||
},
|
||||
{
|
||||
"physical": 233,
|
||||
"same_as": "submission-230"
|
||||
},
|
||||
{
|
||||
"physical": 234,
|
||||
"same_as": "submission-231"
|
||||
},
|
||||
{
|
||||
"physical": 235,
|
||||
"same_as": "submission-232"
|
||||
},
|
||||
{
|
||||
"physical": 236,
|
||||
"same_as": "submission-233"
|
||||
},
|
||||
{
|
||||
"physical": 237,
|
||||
"same_as": "submission-234"
|
||||
},
|
||||
{
|
||||
"physical": 238,
|
||||
"same_as": "submission-235"
|
||||
},
|
||||
{
|
||||
"physical": 239,
|
||||
"same_as": "submission-236"
|
||||
},
|
||||
{
|
||||
"physical": 240,
|
||||
"same_as": "submission-237"
|
||||
},
|
||||
{
|
||||
"physical": 241,
|
||||
"same_as": "submission-238"
|
||||
},
|
||||
{
|
||||
"physical": 242,
|
||||
"same_as": "submission-239"
|
||||
},
|
||||
{
|
||||
"physical": 243,
|
||||
"same_as": "submission-240"
|
||||
},
|
||||
{
|
||||
"physical": 244,
|
||||
"same_as": "submission-241"
|
||||
},
|
||||
{
|
||||
"physical": 245,
|
||||
"same_as": "submission-242"
|
||||
},
|
||||
{
|
||||
"physical": 247,
|
||||
"same_as": "submission-244"
|
||||
},
|
||||
{
|
||||
"physical": 249,
|
||||
"same_as": "submission-246"
|
||||
},
|
||||
{
|
||||
"physical": 250,
|
||||
"same_as": "submission-247"
|
||||
}
|
||||
],
|
||||
"sheets": 6,
|
||||
"overviewSheets": 14
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
"""Diagram audit: authored-source checks, PDF navigation, raster review only."""
|
||||
from pathlib import Path
|
||||
import re, json, hashlib, argparse
|
||||
from collections import Counter
|
||||
from pypdf import PdfReader
|
||||
import pypdfium2 as pdfium
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
ROOT=next(p for p in Path(__file__).resolve().parents if (p/'AGENTS.md').is_file())
|
||||
EVIDENCE=Path(__file__).resolve().parent
|
||||
TASK=ROOT/'work/diagram-audit-2026-11-24'
|
||||
BUILD=TASK/'report'
|
||||
RENDER=TASK/'review'
|
||||
|
||||
def sha(path): return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
def groups(text,start):
|
||||
values=[]
|
||||
while start<len(text) and text[start]=='{':
|
||||
depth=1; end=start+1
|
||||
while depth:
|
||||
if text[end]=='{' and text[end-1]!='\\':depth+=1
|
||||
if text[end]=='}' and text[end-1]!='\\':depth-=1
|
||||
end+=1
|
||||
values.append(text[start+1:end-1]);start=end
|
||||
return values
|
||||
|
||||
def checks(strict):
|
||||
protected=json.loads((EVIDENCE/'protected-hashes.json').read_text(encoding='utf-8-sig'))
|
||||
for item in protected:
|
||||
p=Path(item['Path']); assert p.is_file() and sha(p).upper()==item['Hash'],str(p)
|
||||
text='\n'.join(p.read_text(encoding='utf-8-sig') for p in (ROOT/'documents/latex').glob('*.tex'))
|
||||
counts={}
|
||||
for macro,total in [('RequirementID',111),('TestCaseID',82),('VerificationID',111),('UseCaseID',9),('UserStoryID',11),('ValidationID',11),('AIRequirementID',17),('ReportRequirementID',58)]:
|
||||
ids=re.findall(r'\\'+macro+r'\{([^}]+)\}',text)
|
||||
assert len(ids)==len(set(ids))==total,(macro,len(ids))
|
||||
counts[macro]=total
|
||||
# Product obligations and reciprocal mappings are untouched in this audit.
|
||||
index=json.loads((ROOT/'documents/diagram-index.json').read_text())
|
||||
assert index['version']=='0.1.4-alpha' and len(index['figures'])==51
|
||||
result=dict(version=index['version'],protectedFilesUnchanged=len(protected),registerCounts=counts,applicationTestsRun=False,pdfs={})
|
||||
for key,stem in [('submission','TikZRefinerySubmission'),('developer','TikZRefinery')]:
|
||||
folder=BUILD/stem; reader=PdfReader(folder/(stem+'.pdf'));dest=reader.named_destinations
|
||||
aux='\n'.join(p.read_text(errors='replace') for p in folder.glob('*.aux'))
|
||||
links=0
|
||||
for page in reader.pages:
|
||||
for ref in page.get('/Annots',[]):
|
||||
ann=ref.get_object();target=ann.get('/Dest');action=ann.get('/A')
|
||||
if action and action.get('/S')=='/GoTo':target=action.get('/D')
|
||||
if target is None:continue
|
||||
links+=1
|
||||
if isinstance(target,str):assert target in dest,target
|
||||
for row in index['figures']:
|
||||
label=row['label']; match=re.search(r'\\newlabel\{'+re.escape(label)+r'\}\{',aux)
|
||||
assert match,label
|
||||
fields=groups(aux,match.end())
|
||||
assert len(fields)>=4,(label,fields)
|
||||
anchor=fields[3]; physical=reader.get_destination_page_number(dest[anchor])+1
|
||||
assert physical==row[key]['physical'],(label,physical,row[key])
|
||||
assert reader.page_labels[physical-1]==row[key]['printed']
|
||||
log=(folder/(stem+'.log')).read_text(errors='replace')
|
||||
problems=re.findall(r'^.*(?:Overfull|Float too large|undefined references|undefined citations|Citation .+ undefined|Reference .+ undefined|destination with the same identifier|LaTeX Error).*$' ,log,re.M)
|
||||
if strict:assert not problems,problems
|
||||
result['pdfs'][key]=dict(pages=len(reader.pages),internalLinks=links,namedDestinations=len(dest),figuresChecked=len(index['figures']),diagnostics=problems,underfullNotices=log.count('Underfull'),sha256=sha(folder/(stem+'.pdf')))
|
||||
(EVIDENCE/'checks.json').write_text(json.dumps(result,indent=2)+'\n')
|
||||
print(json.dumps(result,indent=2))
|
||||
|
||||
def render():
|
||||
RENDER.mkdir(parents=True,exist_ok=True)
|
||||
index=json.loads((ROOT/'documents/diagram-index.json').read_text())
|
||||
selection={}; previous={}
|
||||
for key,stem in [('submission','TikZRefinerySubmission'),('developer','TikZRefinery')]:
|
||||
folder=BUILD/stem; reader=PdfReader(folder/(stem+'.pdf'));doc=pdfium.PdfDocument(str(folder/(stem+'.pdf')))
|
||||
aux='\n'.join(p.read_text(errors='replace') for p in folder.glob('*.aux'))
|
||||
locations={m[1]:m[3] for m in re.finditer(r'\\newlabel\{([^}]+)\}\{\{([^}]*)\}\{([^}]*)\}',aux)}
|
||||
pages={row[key]['physical'] for row in index['figures']}
|
||||
# Navigation/front matter and changed history/roadmap/guide/log text.
|
||||
pages.update(i+1 for i,label in enumerate(reader.page_labels) if not label.isdigit())
|
||||
for label in ['Table:DocumentHistory','ReportRequirement:RPT-050','Section:M3Coverage','Section:UMLAuthoring','Section:AIGuideDocumentBuild','Section:AIGuideChecklist','Section:DiagramAuditLog']:
|
||||
if label in locations:
|
||||
start=reader.page_labels.index(locations[label])+1
|
||||
pages.update(range(max(1,start-1),min(len(reader.pages),start+3)+1))
|
||||
if key=='developer':
|
||||
# New final prompt record occurs at the end of the prompt-log chapter.
|
||||
begin=reader.page_labels.index(locations['Chapter:AIPromptLog'])+1
|
||||
# Bibliography bookmark bounds the chapter without PDF text lookup.
|
||||
end=reader.get_destination_page_number(reader.named_destinations['chapter*.3'])+1 if 'chapter*.3' in reader.named_destinations else len(reader.pages)-12
|
||||
pages.update(range(max(begin,end-5),min(end,len(reader.pages))+1))
|
||||
tiles=[]; duplicates=[]
|
||||
for physical in sorted(pages):
|
||||
im=doc[physical-1].render(scale=1.5).to_pil().convert('RGB')
|
||||
digest=hashlib.sha256(im.tobytes()).hexdigest()
|
||||
if digest in previous:
|
||||
duplicates.append(dict(physical=physical,same_as=previous[digest]));continue
|
||||
previous[digest]=f'{key}-{physical}'
|
||||
im.save(RENDER/f'{key}-{physical}.png')
|
||||
thumb=im.copy();thumb.thumbnail((540,700))
|
||||
tile=Image.new('RGB',(560,730),'#ddd');tile.paste(thumb,((560-thumb.width)//2,25))
|
||||
ImageDraw.Draw(tile).text((8,7),f'{key}: PDF {physical} / printed {reader.page_labels[physical-1]}',fill='black')
|
||||
tiles.append(tile)
|
||||
for start in range(0,len(tiles),6):
|
||||
sheet=Image.new('RGB',(1120,2190),'white')
|
||||
for n,tile in enumerate(tiles[start:start+6]):sheet.paste(tile,((n%2)*560,(n//2)*730))
|
||||
sheet.save(RENDER/f'{key}-sheet-{start//6+1:02}.jpg',quality=87)
|
||||
# Entire-document layout overview, at thumbnail scale; targeted figures
|
||||
# above retain readable resolution for detailed review.
|
||||
for start in range(0,len(reader.pages),24):
|
||||
sheet=Image.new('RGB',(1600,3180),'white')
|
||||
for n,i in enumerate(range(start,min(len(reader.pages),start+24))):
|
||||
im=doc[i].render(scale=0.45).to_pil().convert('RGB');im.thumbnail((385,490))
|
||||
x=(n%4)*400;y=(n//4)*530
|
||||
sheet.paste(im,(x+(400-im.width)//2,y+22))
|
||||
ImageDraw.Draw(sheet).text((x+8,y+4),f'{key} PDF {i+1}',fill='black')
|
||||
sheet.save(RENDER/f'{key}-overview-{start//24+1:02}.jpg',quality=85)
|
||||
selection[key]=dict(selectedPages=sorted(pages),pixelIdenticalPages=duplicates,sheets=(len(tiles)+5)//6,overviewSheets=(len(reader.pages)+23)//24)
|
||||
(EVIDENCE/'render-selection.json').write_text(json.dumps(selection,indent=2)+'\n')
|
||||
print(json.dumps({key:{k:v for k,v in info.items() if k not in ['selectedPages','pixelIdenticalPages']} for key,info in selection.items()},indent=2))
|
||||
|
||||
if __name__=='__main__':
|
||||
parser=argparse.ArgumentParser();parser.add_argument('--render',action='store_true');parser.add_argument('--strict',action='store_true');args=parser.parse_args()
|
||||
checks(args.strict)
|
||||
if args.render:render()
|
||||
Reference in New Issue
Block a user