You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-30Lines changed: 29 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,40 +23,35 @@ Install using pip:
23
23
24
24
pip install sms-tools
25
25
26
-
Binary packages are available for Linux, macOS (Intel & Apple Silicon) and Windows (64 bit) on all recent python versions.
27
-
28
-
To build and install the package locally you can use the python packaging tools:
29
-
30
-
pip install build
31
-
python -m build
32
26
27
+
When installing via pip, the Cython extension is built automatically if a compatible compiler and Python environment are available. This provides significant speedups for core routines.
33
28
34
-
Running tests
35
-
-------------
36
-
37
-
To run the unit test suite locally:
29
+
pip install sms-tools
38
30
39
-
python3 -m venv .venv
40
-
source .venv/bin/activate
41
-
python -m pip install -e ".[test]"
42
-
python -m pytest
31
+
If you are developing locally or want to ensure the Cython extension is built, you can run:
43
32
44
-
To run a single test file:
33
+
pip install sms-tools
34
+
python setup.py build_ext --inplace
45
35
46
-
python -m pytest tests/test_errors.py
36
+
If you encounter issues with the Cython extension, ensure you have Cython, setuptools, and a C compiler installed. The extension is optional; sms-tools will fall back to pure-Python routines if unavailable.
47
37
48
-
To run a single test function by name:
38
+
You can verify which backend is active at runtime:
49
39
50
-
python -m pytest tests/test_errors.py -k wavread
40
+
python - <<'PY'
41
+
from smstools.models import utilFunctions as UF
42
+
print("Using Cython backend:", UF.UF_C is not None)
To install test dependencies and run the test suite, use:
77
+
78
+
pip install .[test]
79
+
pytest
80
+
81
+
You can run a specific test file with:
79
82
80
-
*`tests/test_api_contracts.py`: API/signature and output-shape contract checks for core model entry points.
81
-
*`tests/test_errors.py`: error-handling contracts (invalid parameters and invalid I/O paths).
82
-
*`tests/test_models_smoke.py`: fast smoke coverage for all analysis/synthesis model modules.
83
-
*`tests/test_transformations_smoke.py`: fast smoke coverage for all transformation modules.
84
-
*`tests/test_models_ground_truth.py`: algorithmic/ground-truth model tests on synthetic signals (frequency accuracy, additivity, and quality invariants).
0 commit comments