From 3f00be1c9887d337c1461d0320a6154ad9dcec7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Fri, 22 Nov 2024 19:17:05 +0100 Subject: [PATCH] build: improve cloc targets and metrics - 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 --- Makefile | 9 +++++++-- docs/arewetiny.rst | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6df28bc2..ae161dc5 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/docs/arewetiny.rst b/docs/arewetiny.rst index 249dbb01..2df6a168 100644 --- a/docs/arewetiny.rst +++ b/docs/arewetiny.rst @@ -42,6 +42,12 @@ LoC Core .. command-output:: make cloc-core :cwd: .. +LoC LLM +******* + +.. command-output:: make cloc-llm + :cwd: .. + LoC Tools *********