Open
Conversation
…ring logic Signed-off-by: Carlson Büth <commit@cbueth.de>
…tering Signed-off-by: Carlson Büth <commit@cbueth.de>
…processing pipeline Signed-off-by: Carlson Büth <commit@cbueth.de>
…processing pipeline Signed-off-by: Carlson Büth <commit@cbueth.de>
Signed-off-by: Carlson Büth <commit@cbueth.de>
Signed-off-by: Carlson Büth <commit@cbueth.de>
- update logging setup and tests Signed-off-by: Carlson Büth <commit@cbueth.de>
Signed-off-by: Carlson Büth <commit@cbueth.de>
- `get_logger` utility for consistent logging across modules. - Added configurable `WARNINGS_CAPTURE_LEVEL` and captured warnings feature. - Replaced `print` statements with structured logging in scripts. - Updated logging levels to rely on constants or configuration defaults. Signed-off-by: Carlson Büth <commit@cbueth.de>
- added `ColorFormatter` for ANSI color-coded console logs - moved package-wide logging initialisation in `__init__.py`. - refined file and console logging setup to use consistent formatters - updated default log level for initial configuration messages Signed-off-by: Carlson Büth <commit@cbueth.de>
- Track found sessions during directory filtering - Add warnings for included and excluded sessions not found in the data folder Signed-off-by: Carlson Büth <commit@cbueth.de>
- Add more detailed messages for missing sessions in error handling - Update logging level from `debug` to `warning` for excluded sessions not found Signed-off-by: Carlson Büth <commit@cbueth.de>
- test `check_data_collection_exists` with validation for folder existence, emptiness, and existing log file Signed-off-by: Carlson Büth <commit@cbueth.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Centralizes and improves logging across the MultiplEYE preprocessing pipeline, silences false‑positive session warnings, and captures key user/data orientation warnings. This replaces scattered
print()and manual file writes with a structured, configurable logging setup.Key changes
IGNORED_SESSION_FOLDERSand filter non‑matching session folders accordingly.Implementation details
preprocessing/constants.pyIGNORED_SESSION_FOLDERS = ["test_sessions", "core_sessions", "pilot_sessions"].CONSOLE_LOG_LEVEL,FILE_LOG_LEVEL, andWARNINGS_CAPTURE_LEVELsourced frommultipleye_settings_preprocessing.yaml.preprocessing/data_collection/multipleye_data_collection.pyadd_recorded_sessions(...), only warn for non‑matching directories if not inIGNORED_SESSION_FOLDERS.preprocessing/utils/logging.pysetup_logging(log_file, console_level, file_level): configures console + optional file handlers, colored console logs, and captureswarningsvialogging.captureWarnings(True).pymovementsversion at startup.logging._captured_warningsfor later summaries.get_logger(name): returns module or named logger (preprocessing[...]).clear_log_file(path): utility to truncate logs when not appending.preprocessing/__init__.pysets up logging on import:<DATASET_DIR>/preprocessing_logs.txtwhen dataset dir exists.LOG_APPENDfrom config; otherwise clears the log file.User‑facing behavior
WARNING(configurable).INFO(configurable) including versions and git metadata.UserWarningfrompymovements.gaze.gaze.Migration notes
print()and any manual writes topreprocessing_logs.txt.preprocessingimport. For scripts, ensure the package is imported early or callsetup_logging(...)explicitly if you need a custom destination.multipleye_settings_preprocessing.yaml:Tests
tests/unit/utils/test_logging.pyadd_recorded_sessions.Related issues
Notable commits
IGNORED_SESSION_FOLDERSand update folder filtering logic