Skip to content

Commit

Permalink
build: improve cloc targets and metrics
Browse files Browse the repository at this point in the history
- Add separate cloc-llm target to measure LLM-specific code
- Better organize cloc targets with FILES_LLM and FILES_CORE variables
- Update cloc-tests to include all test files
- Add LLM metrics section to arewetiny.rst
  • Loading branch information
ErikBjare committed Nov 22, 2024
1 parent 6d52f30 commit 46cf058
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,13 @@ clean-test:

cloc: cloc-core cloc-tools cloc-server cloc-tests

FILES_LLM=gptme/llm/*.py
FILES_CORE=gptme/*.py $(FILES_LLM) gptme/util/*.py gptme/tools/__init__.py gptme/tools/base.py
cloc-core:
cloc gptme/*.py gptme/tools/__init__.py gptme/tools/base.py --by-file
cloc $(FILES_CORE) --by-file

cloc-llm:
cloc $(FILES_LLM) --by-file

cloc-tools:
cloc gptme/tools/*.py --by-file
Expand All @@ -146,7 +151,7 @@ cloc-server:
cloc gptme/server --by-file

cloc-tests:
cloc tests/*.py --by-file
cloc tests --by-file

cloc-eval:
cloc gptme/eval/**.py --by-file
Expand Down
6 changes: 6 additions & 0 deletions docs/arewetiny.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ LoC Core
.. command-output:: make cloc-core
:cwd: ..

LoC LLM
*******

.. command-output:: make cloc-llm
:cwd: ..

LoC Tools
*********

Expand Down

0 comments on commit 46cf058

Please sign in to comment.