Skip to content

Cleanup: format, lint, prune comments, fix tests, add CI - #113

Merged
derekwisong merged 1 commit into
mainfrom
cleanup/black-and-comments
May 14, 2026
Merged

Cleanup: format, lint, prune comments, fix tests, add CI#113
derekwisong merged 1 commit into
mainfrom
cleanup/black-and-comments

Conversation

@derekwisong

@derekwisong derekwisong commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adopt black + ruff as dev deps; format pyagent/ and tests/.
  • Strip narrative comments from pyagent/ (~11% line reduction with no behavior change).
  • Prune stale planning docs and rewrite the survivors (docs/ loses ~56% of its lines); add docs/architecture.md with mermaid diagrams and a runnable examples/quickstart.py.
  • Real bug fix: doc_tools._run_subllm was reading the wrong key on LLM responses (textcontent), so extract_doc / summarize_doc were broken against every provider.
  • Pin tree-sitter-language-pack <1.0 — the 1.x line moved most grammars (including Go) to download-on-demand and hung offline.
  • Gate fastembed recall tests behind PYAGENT_HEAVY_TESTS=1 so CI doesn't try to download a ~130MB model.
  • Update stale stubs in 5 smoke tests so the suite is green again (55/55 pass).
  • Add a GitHub Actions workflow that runs black --check, ruff, and every smoke test on push to main and on PRs.

Diff: 123 files, +2,561 / −6,523 (~4,000 lines removed at no feature cost).

Test plan

  • CI passes on this PR (lint + 55 smoke tests).
  • Local: pip install -e '.[dev]' && python -m black --check pyagent tests && python -m ruff check pyagent tests.
  • Local: for f in tests/smoke_*.py; do python -m tests.\$(basename \"\$f\" .py) || echo FAIL; done — expect every test to pass.
  • Spot-check the rewritten docs — README.md, docs/architecture.md, docs/plugin-design.md, docs/library-usage.md.
  • Verify examples/quickstart.py runs end-to-end with a real API key set.

@derekwisong
derekwisong force-pushed the cleanup/black-and-comments branch 3 times, most recently from dbd8847 to 539e626 Compare May 14, 2026 02:14
- Add black + ruff as dev deps; format pyagent/ and tests/.
- Strip narrative comments from pyagent/ source.
- Prune stale planning docs; tighten the survivors; add an
  architecture page with mermaid diagrams and a runnable
  examples/quickstart.py.
- Fix doc_tools sub-LLM result key (real bug); pin
  tree-sitter-language-pack to the 0.x line (Go grammar regression
  on 1.x); gate fastembed recall tests behind PYAGENT_HEAVY_TESTS.
- Update stale stubs in 5 smoke tests so the suite is green again.
- GitHub Actions CI: lint + smoke tests on push to main and PRs.
@derekwisong
derekwisong force-pushed the cleanup/black-and-comments branch from 539e626 to 135ec11 Compare May 14, 2026 02:21
@derekwisong
derekwisong merged commit d60041c into main May 14, 2026
1 check passed
@derekwisong
derekwisong deleted the cleanup/black-and-comments branch May 14, 2026 02:23
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.

1 participant