Skip to content

Commit 3e7bc5a

Browse files
author
Topi Jarvinen
committed
chore: Bump version to 0.8.6 and apply minor formatting adjustments.
1 parent 5bd1c87 commit 3e7bc5a

4 files changed

Lines changed: 22 additions & 20 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "FileUtils"
7-
version = "0.8.5"
7+
version = "0.8.6"
88
description = "File utilities for data science projects with Azure support"
99
readme = "README.md"
1010
authors = [{name = "Topi Jarvinen", email = "topi.jarvinen@gmail.com"}]

src/FileUtils/core/file_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(
6868
"""
6969
# Determine effective log level
7070
import logging
71-
71+
7272
if log_level is not None:
7373
effective_level = log_level # Explicit log_level has highest priority
7474
elif quiet:

src/FileUtils/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Version information."""
22

3-
__version__ = "0.8.4"
3+
__version__ = "0.8.6"
44
__author__ = "Topi Jarvinen"

tests/unit/test_logging_control.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ def test_quiet_mode_suppresses_info_logging(self, temp_dir, caplog):
4343
"""Test that quiet mode suppresses INFO level logging."""
4444
with caplog.at_level(logging.INFO):
4545
fu = FileUtils(project_root=temp_dir, quiet=True)
46-
46+
4747
# Even though we captured at INFO level, the logger should be at CRITICAL
4848
# So INFO messages should not be logged
4949
assert fu.logger.level == logging.CRITICAL
50-
50+
5151
# Try to log an INFO message
5252
fu.logger.info("This should not appear")
53-
53+
5454
# Verify that no INFO messages were actually logged
5555
info_records = [r for r in caplog.records if r.levelno == logging.INFO]
5656
assert len(info_records) == 0
@@ -68,7 +68,7 @@ def test_json_output_clean(self, temp_dir):
6868
try:
6969
# Create FileUtils in quiet mode
7070
fu = FileUtils(project_root=temp_dir, quiet=True)
71-
71+
7272
# Perform operations
7373
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
7474
saved_files, _ = fu.save_data_to_storage(
@@ -78,30 +78,30 @@ def test_json_output_clean(self, temp_dir):
7878
file_name="test_json",
7979
include_timestamp=False,
8080
)
81-
81+
8282
# Output should be clean (no logging)
8383
output = captured_output.getvalue()
84-
84+
8585
# In quiet mode, there should be no INFO logging output
8686
# (Though the test itself doesn't print JSON, in real usage
8787
# the application would print structured output here)
8888
assert "FileUtils initialized" not in output
8989
assert "Project root:" not in output
9090
assert "INFO" not in output
91-
91+
9292
finally:
9393
sys.stdout = old_stdout
9494

9595
def test_debug_mode_verbose(self, temp_dir, caplog):
9696
"""Test that DEBUG mode shows verbose logging."""
9797
with caplog.at_level(logging.DEBUG):
9898
fu = FileUtils(project_root=temp_dir, log_level=logging.DEBUG)
99-
99+
100100
assert fu.logger.level == logging.DEBUG
101-
101+
102102
# Log a debug message
103103
fu.logger.debug("Debug message")
104-
104+
105105
# Verify debug message was captured
106106
debug_records = [r for r in caplog.records if r.levelno == logging.DEBUG]
107107
assert len(debug_records) > 0
@@ -110,17 +110,19 @@ def test_warning_level_filters_info(self, temp_dir, caplog):
110110
"""Test that WARNING level filters out INFO messages."""
111111
with caplog.at_level(logging.DEBUG): # Capture all levels
112112
fu = FileUtils(project_root=temp_dir, log_level=logging.WARNING)
113-
113+
114114
assert fu.logger.level == logging.WARNING
115-
115+
116116
# Try logging at different levels
117117
fu.logger.info("Info message")
118118
fu.logger.warning("Warning message")
119-
119+
120120
# Only WARNING and above should be logged
121121
info_records = [r for r in caplog.records if r.levelno == logging.INFO]
122-
warning_records = [r for r in caplog.records if r.levelno == logging.WARNING]
123-
122+
warning_records = [
123+
r for r in caplog.records if r.levelno == logging.WARNING
124+
]
125+
124126
# INFO should be filtered out
125127
assert len(info_records) == 0
126128
# WARNING should be present
@@ -136,11 +138,11 @@ def test_log_level_string_case_insensitive(self, temp_dir):
136138
# Test lowercase
137139
fu1 = FileUtils(project_root=temp_dir, log_level="warning")
138140
assert fu1.logger.level == logging.WARNING
139-
141+
140142
# Test uppercase
141143
fu2 = FileUtils(project_root=temp_dir, log_level="WARNING")
142144
assert fu2.logger.level == logging.WARNING
143-
145+
144146
# Test mixed case
145147
fu3 = FileUtils(project_root=temp_dir, log_level="Warning")
146148
assert fu3.logger.level == logging.WARNING

0 commit comments

Comments
 (0)