Repository navigation
feat(detect): classify Smarty templates as documents - #5625
azizur100389 wants to merge 2 commits into
Conversation
Refs Graphify-Labs#1060. Co-Authored-By: Codex <[email protected]>
|
Thanks for the pull request, @azizur100389. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify review 
3 possible issues to check · High impact
3 possible issues we couldn't confirm
- Every
.tplfile, including non-Smarty templates such as Helm helpers, is now classified as a document ·graphify/detect.py:49 - The test no longer checks that an unrecognized extension stays unclassified ·
tests/test_language_overrides.py:257 - The
.txtremap check classifies a file that does not exist on disk ·tests/test_language_overrides.py:263
They don't change the score.
What this review covered
- We didn't review 1 file that isn't source code, such as docs, config, images, or generated or third-party code.
- 3 of 3 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 5352 functions depend on this change
- 658 of 658 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 247582f
Co-Authored-By: Codex <[email protected]>
Extractor accuracy (Swift #5641, Apex #5627, Python #5647, TypeScript #5604/#5614/#5612, Bash caller-var #5602), GitHub Actions run-step extraction (#5603), incremental correctness (#5634/#5638/#5636), symlink and semantic-cache fixes (#5617/#5618), export/report hardening and perf (#5643/#5644/#5645/#5646/#5619/#5620/#5621), and CLI/docs/skill/install work (#5629/#5628/#5626/#5624/#5623/#5625/#5642/#5583). AST cache schema 59 to 60; Swift/Apex/Python/Bash/GHA inputs re-extract on first build. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Landed in v0.9.124 (just released to PyPI), cherry-picked with your authorship preserved so it shows under your name in the history. Thanks @azizur100389 for classifying Smarty .tpl templates as documents — verified green in the full suite and, where applicable, smoke-tested against the published package. 🙏 |
Closes #1060.
.tplfiles now go through normal document detection and semantic extraction. A project that maps.tplto a code language in.graphifyrckeeps its configured extractor. This implements the document support requested in the issue. Parsing Smarty include or inheritance syntax is outside this change.Verification
The classification regression returned
Noneon cleanv8. It now checks both the document default and the PHP override on the same template. Windows detection, language overrides and oversized-document slicing: 419 passed, 12 skipped. Large templates are sliced without losing trailing text. Ruff and pre-commit passed.Full upstream CI passed all seven jobs at 247582f, including the parallel and serial suites on Python 3.11 through 3.14.