forked from usra-riacs/stochastic-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathquick-reference.sh
More file actions
executable file
·88 lines (70 loc) · 4.79 KB
/
quick-reference.sh
File metadata and controls
executable file
·88 lines (70 loc) · 4.79 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
# Quick Reference Card for CI Testing
# Print this for easy reference
cat << 'EOF'
╔═══════════════════════════════════════════════════════════════════════════╗
║ STOCHASTIC-BENCHMARK CI TESTING ║
║ Quick Reference Card ║
╚═══════════════════════════════════════════════════════════════════════════╝
📋 INITIAL SETUP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Create CI environment (Python 3.10 default)
./setup-ci-env.sh
# Or specify Python version
./setup-ci-env.sh 3.11 # Python 3.11
./setup-ci-env.sh 3.12 # Python 3.12
🧪 RUNNING TESTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Activate environment
conda activate stochastic-benchmark-ci-py310
# Run full CI test suite
./run-ci-tests.sh
# Run specific tests
export PYTHONPATH="${PYTHONPATH}:${PWD}/src"
pytest tests/test_bootstrap.py -v
# Run with parallel execution
pytest tests/ -n auto
🔄 TEST ALL PYTHON VERSIONS (3.10, 3.11, 3.12)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Test all versions automatically
./test-all-python-versions.sh
📊 VIEW COVERAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# HTML report (open in browser)
firefox htmlcov/index.html
# Terminal report
coverage report
🔍 LINTING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Check for critical errors
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
# Full style check
flake8 src --max-line-length=120 --statistics
🧹 CLEANUP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Remove environment
conda deactivate
conda env remove -n stochastic-benchmark-ci-py310
# Remove coverage reports
rm -rf htmlcov/ .coverage coverage.xml .pytest_cache/
📚 ENVIRONMENT NAMES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Python 3.10 → stochastic-benchmark-ci-py310
Python 3.11 → stochastic-benchmark-ci-py311
Python 3.12 → stochastic-benchmark-ci-py312
💡 TIPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Always set PYTHONPATH before running manual pytest commands
• Use run-ci-tests.sh to replicate CI exactly
• Create all Python version environments to match CI matrix
• Check CI-TESTING.md for detailed documentation
📄 FILES CREATED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• environment-ci.yml → Conda environment specification
• setup-ci-env.sh → Environment setup script
• run-ci-tests.sh → Run full CI test suite
• test-all-python-versions.sh → Test all Python versions
• CI-TESTING.md → Complete documentation
• quick-reference.sh → This reference card
═══════════════════════════════════════════════════════════════════════════
EOF