Skip to content

Move console_level into pyfaradaycup._logging - #146

Merged
namurphy merged 1 commit into
PlasmaPy:mainfrom
namurphy:share-console-level
Nov 19, 2026
Merged

namurphy merged 1 commit into
PlasmaPy:mainfrom
namurphy:share-console-level

Conversation

@namurphy

Copy link
Copy Markdown
Member

Summary

This moves _console_level from pyfaradaycup.decommutator.main to a public console_level in pyfaradaycup._logging, next to configure_logging. It converts the -v/--verbose and -q/--quiet options into a logging level, which isn't specific to pfc_decommutator. This lets the upcoming pfc_l05_to_l1 tool (#136) reuse it. The function's behavior doesn't change.

  • console_level now has a full numpydoc docstring.
  • test_console_level moves from tests/decommutator/test_decommutator.py to tests/test_logging.py, and gets a new case where -v and -q are both given (quiet wins).

This was split out of #136 to make that PR smaller.

🤖 Generated with Claude Code

The level of messages printed for the -v/--verbose and -q/--quiet
options is not specific to pfc_decommutator, so move it next to
configure_logging so that other command line tools can use it. Move its
test into tests/test_logging.py and add a case for when both options
are given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.99%. Comparing base (79f9345) to head (8a2fd45).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #146   +/-   ##
=======================================
  Coverage   70.99%   70.99%           
=======================================
  Files           8        8           
  Lines        1124     1124           
  Branches      163      163           
=======================================
  Hits          798      798           
  Misses        291      291           
  Partials       35       35           
Files with missing lines Coverage Δ
src/pyfaradaycup/_logging.py 100.00% <100.00%> (ø)
src/pyfaradaycup/decommutator/main.py 94.87% <100.00%> (-0.48%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@namurphy
namurphy merged commit aed3f55 into PlasmaPy:main Nov 19, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant