11LINT_TARGET_DIRS := PyEMD doc example
2+ PYTHON := .venv/bin/python
23
34init :
45 python -m venv .venv
78 @echo " Run 'source .venv/bin/activate' to activate the virtual environment"
89
910test :
10- python -m PyEMD.tests.test_all
11+ $( PYTHON ) -m PyEMD.tests.test_all
1112
1213clean :
1314 find PyEMD -name __pycache__ -execdir rm -r {} +
1718 cd doc && make html
1819
1920format :
20- python -m black $(LINT_TARGET_DIRS )
21- python -m isort PyEMD
21+ $( PYTHON ) -m black $(LINT_TARGET_DIRS )
22+ $( PYTHON ) -m isort PyEMD
2223
2324lint-check :
24- python -m isort --check PyEMD
25- python -m black --check $(LINT_TARGET_DIRS )
25+ $(PYTHON ) -m isort --check PyEMD
26+ $(PYTHON ) -m black --check $(LINT_TARGET_DIRS )
27+
28+ # Performance tests
29+ # Results saved to perf_test/results/<timestamp>/
30+
31+ .PHONY : perf perf-quick perf-scaling perf-splines perf-extrema perf-eemd perf-ceemdan perf-complexity perf-sifting
32+
33+ perf :
34+ @echo " Running full performance test suite..."
35+ $(PYTHON ) perf_test/perf_test_comprehensive.py
36+
37+ perf-quick :
38+ @echo " Running quick performance test suite..."
39+ $(PYTHON ) perf_test/perf_test_comprehensive.py --quick
40+
41+ perf-scaling :
42+ @echo " Running EMD scaling test..."
43+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test scaling
44+
45+ perf-splines :
46+ @echo " Running spline comparison test..."
47+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test splines
48+
49+ perf-extrema :
50+ @echo " Running extrema detection test..."
51+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test extrema
52+
53+ perf-eemd :
54+ @echo " Running EEMD parallel scaling test..."
55+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test eemd
56+
57+ perf-ceemdan :
58+ @echo " Running CEEMDAN performance test..."
59+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test ceemdan
60+
61+ perf-complexity :
62+ @echo " Running signal complexity test..."
63+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test complexity
64+
65+ perf-sifting :
66+ @echo " Running sifting parameters test..."
67+ $(PYTHON ) perf_test/perf_test_comprehensive.py --test sifting
68+
69+ perf-compare :
70+ @if [ $$ (ls -d perf_test/results/* / 2> /dev/null | wc -l) -lt 2 ]; then \
71+ echo " Error: Need at least 2 result directories to compare" ; \
72+ exit 1; \
73+ fi
74+ @BASELINE=$$(ls -dt perf_test/results/*/ | sed -n '2p' | sed 's/\/$$//' ) ; \
75+ COMPARISON=$$(ls -dt perf_test/results/*/ | sed -n '1p' | sed 's/\/$$//' ) ; \
76+ echo " Comparing:" ; \
77+ echo " Baseline: $$ BASELINE" ; \
78+ echo " Comparison: $$ COMPARISON" ; \
79+ echo " " ; \
80+ $(PYTHON ) perf_test/compare_results.py " $$ BASELINE" " $$ COMPARISON"
81+
82+ perf-list :
83+ @echo " Available performance test targets:"
84+ @echo " make perf - Full test suite"
85+ @echo " make perf-quick - Quick test suite (smaller parameters)"
86+ @echo " make perf-scaling - EMD scaling with signal length"
87+ @echo " make perf-splines - Spline method comparison"
88+ @echo " make perf-extrema - Extrema detection comparison"
89+ @echo " make perf-eemd - EEMD parallel scaling"
90+ @echo " make perf-ceemdan - CEEMDAN performance"
91+ @echo " make perf-complexity - Signal complexity impact"
92+ @echo " make perf-sifting - Sifting parameters impact"
93+ @echo " "
94+ @echo " Comparison:"
95+ @echo " make perf-compare - Compare two most recent results"
96+ @echo " $( PYTHON) perf_test/compare_results.py <baseline> <comparison>"
97+ @echo " "
98+ @echo " Results saved to: perf_test/results/<timestamp>_<test>/"
2699
27100perf/build :
28101 docker build -t pyemd-perf -f perf_test/Dockerfile .
0 commit comments