Improve plotting utilities and robustness #27
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Testing
platform darwin -- Python 3.12.9, pytest-8.3.5, pluggy-1.6.0
rootdir: /Users/niru/code/jetplot
configfile: pyproject.toml
plugins: cov-6.1.1
collected 40 items
tests/test_colors.py ... [ 7%]
tests/test_images.py ..... [ 20%]
tests/test_plots.py ............. [ 52%]
tests/test_signals.py ....... [ 70%]
tests/test_style.py ... [ 77%]
tests/test_timepiece.py .. [ 82%]
tests/test_utils.py ....... [100%]
=============================== warnings summary ===============================
tests/test_signals.py::test_stable_rank
/Users/niru/code/jetplot/tests/test_signals.py:17: RuntimeWarning: divide by zero encountered in matmul
X = U @ np.diag(S) @ V.T
tests/test_signals.py::test_stable_rank
/Users/niru/code/jetplot/tests/test_signals.py:17: RuntimeWarning: overflow encountered in matmul
X = U @ np.diag(S) @ V.T
tests/test_signals.py::test_stable_rank
/Users/niru/code/jetplot/tests/test_signals.py:17: RuntimeWarning: invalid value encountered in matmul
X = U @ np.diag(S) @ V.T
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform darwin, python 3.12.9-final-0 _______________
Name Stmts Miss Cover
src/jetplot/init.py 9 0 100%
src/jetplot/chart_utils.py 130 6 95%
src/jetplot/colors.py 68 10 85%
src/jetplot/images.py 85 18 79%
src/jetplot/plots.py 167 9 95%
src/jetplot/signals.py 38 2 95%
src/jetplot/style.py 39 12 69%
src/jetplot/timepiece.py 67 12 82%
TOTAL 603 69 89%
======================== 40 passed, 3 warnings in 3.17s ========================