Skip to content

Add count_lines function and update documentation for clarity#1477

Open
rudrravarjula1234 wants to merge 8 commits into
Graphify-Labs:v8from
rudrravarjula1234:v8
Open

Add count_lines function and update documentation for clarity#1477
rudrravarjula1234 wants to merge 8 commits into
Graphify-Labs:v8from
rudrravarjula1234:v8

Conversation

@rudrravarjula1234

Copy link
Copy Markdown

No description provided.

Copilot AI and others added 8 commits June 26, 2026 15:07
- 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>
…ments

Fix count_lines memory usage, total_lines scope, stale ARCHITECTURE.md entry points, README example clarity
Copilot AI review requested due to automatic review settings June 26, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 track total_lines in detect() output, then surface it in GRAPH_REPORT.md and 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 thread graphify/callflow_html.py
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 thread graphify/detect.py
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 thread graphify/detect.py
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants