Add count_lines function and update documentation for clarity#1477
Open
rudrravarjula1234 wants to merge 8 commits into
Open
Add count_lines function and update documentation for clarity#1477rudrravarjula1234 wants to merge 8 commits into
rudrravarjula1234 wants to merge 8 commits into
Conversation
- Restructure CHANGELOG.md to Keep a Changelog 1.1.0 format: group entries per version under ### Added / ### Changed / ### Fixed / ### Security / ### Performance / ### Documentation subsections; strip inline Feat:/Fix:/Security:/Perf:/Refactor:/Chore:/Docs: prefixes - Update ARCHITECTURE.md module table: add reflect, ids, paths, dedup, prs, wiki, manifest, querylog, file_slice, diagnostics, global_graph, transcribe, llm, mcp_ingest; reorganise into Core / Query / Memory / Utilities groups; update extractor guidance for new extractors/ dir - README: add Work Memory section explaining save-result + reflect; add DEEPSEEK_BASE_URL, KIMI_BASE_URL, GEMINI_BASE_URL env vars to table
…etect-script docs: proper Keep a Changelog format, expand ARCHITECTURE.md, fill README gaps
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ECTURE.md function names, README clarity
…ments Fix count_lines memory usage, total_lines scope, stale ARCHITECTURE.md entry points, README example clarity
There was a problem hiding this comment.
Pull request overview
Adds corpus non-blank line counting to Graphify’s detection/reporting pipeline, and updates user-facing docs (README/architecture/changelog) to better describe work-memory workflow and configuration options.
Changes:
- Introduce
count_lines()and tracktotal_linesindetect()output, then surface it inGRAPH_REPORT.mdand watch rebuild metadata. - Extend callflow HTML export to display corpus stats by parsing the report’s “Corpus Check” section.
- Documentation updates: README work-memory section + backend base URL env vars, ARCHITECTURE module map refresh, and a large CHANGELOG reformat.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds work-memory usage docs and documents additional backend base URL env vars. |
| graphify/watch.py | Preserves total_lines in watch-mode detection metadata. |
| graphify/report.py | Displays total_lines in the “Corpus Check” summary line. |
| graphify/detect.py | Adds count_lines() and accumulates total_lines during corpus detection. |
| graphify/callflow_html.py | Parses corpus stats from GRAPH_REPORT.md and renders a new “Corpus” stats card. |
| CHANGELOG.md | Rewrites/reformats changelog into Keep-a-Changelog style sections. |
| ARCHITECTURE.md | Updates module responsibility tables and guidance for adding extractors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1808
to
+1809
| if corpus.get("lines") is not None: | ||
| corpus_rows += f"\n <tr><td>Lines of Code</td><td>{corpus['lines']:,}</td></tr>" |
Comment on lines
+659
to
+660
| def count_lines(path: Path) -> int: | ||
| """Non-blank line count — used for the corpus lines-of-code total.""" |
Comment on lines
+659
to
+669
| def count_lines(path: Path) -> int: | ||
| """Non-blank line count — used for the corpus lines-of-code total.""" | ||
| try: | ||
| count = 0 | ||
| with path.open(encoding="utf-8", errors="ignore") as fh: | ||
| for line in fh: | ||
| if line.strip(): | ||
| count += 1 | ||
| return count | ||
| except Exception: | ||
| return 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.