11LINT_TARGET_DIRS := PyEMD doc example
2- PYTHON := .venv/bin/python
32
3+ .PHONY : init sync test clean doc format lint-check freeze nox nox-lint
4+ .PHONY : perf perf-quick perf-scaling perf-splines perf-extrema perf-eemd perf-ceemdan perf-complexity perf-sifting perf-compare perf-list perf/build
5+
6+ # Development setup
47init :
5- python -m venv .venv
6- .venv/bin/pip install -r requirements.txt
7- .venv/bin/pip install -e .[dev]
8- @echo " Run 'source .venv/bin/activate' to activate the virtual environment"
8+ uv sync --all-extras
9+ @echo " Development environment ready. Run 'source .venv/bin/activate' to activate."
10+
11+ sync :
12+ uv sync --all-extras
913
14+ # Testing
1015test :
11- $( PYTHON ) -m PyEMD.tests.test_all
16+ uv run python -m PyEMD.tests.test_all
1217
13- clean :
14- find PyEMD -name __pycache__ -execdir rm -r {} +
18+ test-pytest :
19+ uv run pytest PyEMD/tests/
1520
16- .PHONY : doc
17- doc :
18- cd doc && make html
21+ # Multi-version testing with nox
22+ nox :
23+ uv run nox -s tests
24+
25+ nox-lint :
26+ uv run nox -s lint
27+
28+ nox-all :
29+ uv run nox
1930
31+ # Code quality
2032format :
21- $( PYTHON ) -m black $(LINT_TARGET_DIRS )
22- $( PYTHON ) -m isort PyEMD
33+ uv run black $(LINT_TARGET_DIRS )
34+ uv run isort PyEMD
2335
2436lint-check :
25- $(PYTHON ) -m isort --check PyEMD
26- $(PYTHON ) -m black --check $(LINT_TARGET_DIRS )
37+ uv run isort --check PyEMD
38+ uv run black --check $(LINT_TARGET_DIRS )
39+
40+ # Documentation
41+ doc :
42+ cd doc && make html
43+
44+ # Cleanup
45+ clean :
46+ find PyEMD -name __pycache__ -execdir rm -r {} +
47+ rm -rf .venv
48+
49+ # Export requirements for pip users
50+ freeze :
51+ uv export --no-hashes --no-dev --no-emit-project -o requirements.txt
52+ uv export --no-hashes --only-dev --no-emit-project -o requirements-dev.txt
53+ @echo " Exported requirements.txt and requirements-dev.txt"
2754
2855# Performance tests
2956# Results saved to perf_test/results/<timestamp>/
3057
31- .PHONY : perf perf-quick perf-scaling perf-splines perf-extrema perf-eemd perf-ceemdan perf-complexity perf-sifting
32-
3358perf :
3459 @echo " Running full performance test suite..."
35- $( PYTHON ) perf_test/perf_test_comprehensive.py
60+ uv run python perf_test/perf_test_comprehensive.py
3661
3762perf-quick :
3863 @echo " Running quick performance test suite..."
39- $( PYTHON ) perf_test/perf_test_comprehensive.py --quick
64+ uv run python perf_test/perf_test_comprehensive.py --quick
4065
4166perf-scaling :
4267 @echo " Running EMD scaling test..."
43- $( PYTHON ) perf_test/perf_test_comprehensive.py --test scaling
68+ uv run python perf_test/perf_test_comprehensive.py --test scaling
4469
4570perf-splines :
4671 @echo " Running spline comparison test..."
47- $( PYTHON ) perf_test/perf_test_comprehensive.py --test splines
72+ uv run python perf_test/perf_test_comprehensive.py --test splines
4873
4974perf-extrema :
5075 @echo " Running extrema detection test..."
51- $( PYTHON ) perf_test/perf_test_comprehensive.py --test extrema
76+ uv run python perf_test/perf_test_comprehensive.py --test extrema
5277
5378perf-eemd :
5479 @echo " Running EEMD parallel scaling test..."
55- $( PYTHON ) perf_test/perf_test_comprehensive.py --test eemd
80+ uv run python perf_test/perf_test_comprehensive.py --test eemd
5681
5782perf-ceemdan :
5883 @echo " Running CEEMDAN performance test..."
59- $( PYTHON ) perf_test/perf_test_comprehensive.py --test ceemdan
84+ uv run python perf_test/perf_test_comprehensive.py --test ceemdan
6085
6186perf-complexity :
6287 @echo " Running signal complexity test..."
63- $( PYTHON ) perf_test/perf_test_comprehensive.py --test complexity
88+ uv run python perf_test/perf_test_comprehensive.py --test complexity
6489
6590perf-sifting :
6691 @echo " Running sifting parameters test..."
67- $( PYTHON ) perf_test/perf_test_comprehensive.py --test sifting
92+ uv run python perf_test/perf_test_comprehensive.py --test sifting
6893
6994perf-compare :
7095 @if [ $$ (ls -d perf_test/results/* / 2> /dev/null | wc -l) -lt 2 ]; then \
@@ -77,7 +102,7 @@ perf-compare:
77102 echo " Baseline: $$ BASELINE" ; \
78103 echo " Comparison: $$ COMPARISON" ; \
79104 echo " " ; \
80- $( PYTHON ) perf_test/compare_results.py " $$ BASELINE" " $$ COMPARISON"
105+ uv run python perf_test/compare_results.py " $$ BASELINE" " $$ COMPARISON"
81106
82107perf-list :
83108 @echo " Available performance test targets:"
@@ -93,9 +118,9 @@ perf-list:
93118 @echo " "
94119 @echo " Comparison:"
95120 @echo " make perf-compare - Compare two most recent results"
96- @echo " $( PYTHON ) perf_test/compare_results.py <baseline> <comparison>"
121+ @echo " uv run python perf_test/compare_results.py <baseline> <comparison>"
97122 @echo " "
98123 @echo " Results saved to: perf_test/results/<timestamp>_<test>/"
99124
100125perf/build :
101- docker build -t pyemd-perf -f perf_test/Dockerfile .
126+ docker build -t pyemd-perf -f perf_test/Dockerfile .
0 commit comments