summaryrefslogtreecommitdiff
path: root/Qwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh
diff options
context:
space:
mode:
authorzitian-gao <zitian.gao@outlook.com>2025-05-27 16:50:19 +0800
committerzitian-gao <zitian.gao@outlook.com>2025-05-27 16:50:19 +0800
commite616513b163f3feb2ee197cb0846ece37727580d (patch)
treebfc85be3a904973b11b39ee3564c23ba434476d9 /Qwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh
parent7c792461c8e4e4f1f8734fed143630c74e76b27f (diff)
init eval
Diffstat (limited to 'Qwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh')
-rwxr-xr-xQwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/Qwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh b/Qwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh
new file mode 100755
index 0000000..a704a21
--- /dev/null
+++ b/Qwen2.5-Eval/evaluation/latex2sympy/scripts/coverage.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Get relative path of the root directory of the project
+rdir=`git rev-parse --git-dir`
+rel_path="$(dirname "$rdir")"
+# Change to that path and run the file
+cd $rel_path
+
+# Activate virtual environment
+echo "activating venv..."
+if test -f .env/bin/activate
+then source .env/bin/activate && echo "venv activate (bin)"
+elif test -f .env/Scripts/activate
+then source .env/Scripts/activate && echo "venv activated (Scripts)"
+else exit 1
+fi
+
+# Run unit test coverage
+echo "starting coverage..."
+if pytest --doctest-modules --cov-report=html --cov-config=.coveragerc --cov=latex2sympy tests
+then echo "coverage finished"
+else exit 1
+fi