tektronix / TekHSI

Transfer waveforms from Tektronix Oscilloscopes using the High-Speed Interface
https://tekhsi.readthedocs.io
Apache License 2.0
5 stars 4 forks source link

Switch from print to logging #46

Closed nfelt14 closed 1 week ago

nfelt14 commented 2 weeks ago

Proposed changes

This switches TekHSI to use logging instead of normal printing. A new function, configure_logging() is provided so that users can configure what is being logged where. The default behavior keeps the stdout output very similar and adds a file log that contains all logging output.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 96.29630% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.72%. Comparing base (a0694c8) to head (d4c250c). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/tekhsi/tek_hsi_connect.py 92.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #46 +/- ## ========================================== + Coverage 77.66% 80.72% +3.06% ========================================== Files 3 3 Lines 488 524 +36 Branches 106 94 -12 ========================================== + Hits 379 423 +44 + Misses 89 82 -7 + Partials 20 19 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

github-actions[bot] commented 2 weeks ago

Breaking API Changes

src/tekhsi/helpers/__init__.py:0: print_with_timestamp:
Public object was removed

src/tekhsi/helpers/functions.py:0: <module>:
Public object was removed

Link to workflow run

github-actions[bot] commented 2 weeks ago

Test Results (ubuntu)

path passed subtotal
tests/test_client.py 62 62
tests/test_logging.py 3 3
TOTAL 65 65

Link to workflow run

github-actions[bot] commented 2 weeks ago

Test Results (macos)

path passed subtotal
tests/test_client.py 62 62
tests/test_logging.py 3 3
TOTAL 65 65

Link to workflow run

github-actions[bot] commented 2 weeks ago

Test Results (windows)

path passed subtotal
tests\test_client.py 62 62
tests\test_logging.py 3 3
TOTAL 65 65

Link to workflow run