-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·44 lines (38 loc) · 1.21 KB
/
Copy pathtest.sh
File metadata and controls
executable file
·44 lines (38 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -euo pipefail
# Quick test: process sample PDFs without Docker.
# This auto-detects the project dir and runs via uv.
#
# Usage:
# ./test.sh # test samples/ → /tmp/results.xlsx
# ./test.sh ./my_cvs out.xlsx # test custom dir
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INPUT="${1:-$SCRIPT_DIR/samples}"
OUTPUT="${2:-/tmp/results.xlsx}"
if [ ! -d "$INPUT" ]; then
echo "❌ Input directory not found: $INPUT"
echo "Usage: $0 [input_dir] [output_path]"
echo ""
echo " If no arguments given, tests samples/ directory."
echo " Create sample CVs by placing PDFs in samples/"
exit 1
fi
echo "📄 Testing with CVs from: $INPUT"
echo "📊 Output: $OUTPUT"
echo ""
cd "$SCRIPT_DIR"
# Use uv run if available, fallback to pip
if command -v uv &>/dev/null; then
uv run python cv_screener.py \
--input "$INPUT" \
--output "$OUTPUT" \
--criteria "$SCRIPT_DIR/criteria.yaml" \
--workers "$(nproc)"
else
source .venv/bin/activate 2>/dev/null || true
python cv_screener.py \
--input "$INPUT" \
--output "$OUTPUT" \
--criteria "$SCRIPT_DIR/criteria.yaml" \
--workers "$(nproc)"
fi