Draft
Conversation
- Add search for zip files in parent directories when `config_folder` is missing. - Improve error messages with suggestions for data recovery. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Implement `is_valid_pid` and `is_valid_sid` functions in `data_path_utils`. - Add unit tests for PID and SID validation in a new test module. Signed-off-by: Carlson Büth <commit@cbueth.de>
…restructuring - Implement `validate_psychometric_data` to check participant configurations and data folder consistency. - Update restructuring script to use the new validation utility, ensuring data integrity. - Add support for psychometric test mapping in config (`PSYCHOMETRIC_TEST_MAPPING`). - Enhance logging with structured warnings and instructions for errors in psychometric tests. - Extend `__init__.py` to expose the new utility `validate_psychometric_data`. - Improve CLI with new options for sanity checks (`--check-only`, `--restructured`). Signed-off-by: Carlson Büth <commit@cbueth.de>
- Implement `parse_sid` in `data_path_utils` to parse and validate standard and extended SID formats. - Update `is_valid_sid` to use `parse_sid` for improved validation logic. - Add unit tests for `parse_sid`, including valid and invalid cases. - Extend `__init__.py` to expose the new `parse_sid` utility. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Document potential warnings in psychometric test calculations. - Provide troubleshooting steps for data integrity, experimenter documentation, and configuration updates. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Add comprehensive tests for various scenarios, including missing data, unexpected data, session normalization, and SID compliance. - Ensure robust validation of configuration and data folder structure. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Add detailed docstrings and parameter validation for psychometric test preprocessing functions, improving maintainability and clarity. - Extend preprocessing logic to include `session_id`, detailed notes, and session parts in generated outputs. - Refactor existing test-specific preprocessing functions (Stroop, Flanker, WikiVocab, PLAB, etc.) for stricter input validation and improved error handling. - Add unit tests for restructuring and normalization of psychometric test sessions, including edge cases for missing/unexpected data and SID compliance. Signed-off-by: Carlson Büth <commit@cbueth.de>
…dling - Introduce `Sid` dataclass in `preprocessing.models` to replace the `parse_sid` utility. - Update `preprocess_psychometric_tests` and `validate_psychometric_data` to use `Sid` for parsing and validation. - Add extensive unit tests for `Sid` class, covering initialisation, validation, and equivalence. - Remove legacy `is_valid_sid` and `parse_sid` functions from `data_path_utils`. - Refactor preprocessing logic to improve SID-related error handling and validation consistency. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Replace custom session name parsing with `Sid` for consistency and robustness across preprocessing scripts. - Refactor psychometric test matching to use `Sid.equals_soft` for flexible folder identification. - Improve error handling for invalid or non-standard session identifiers. - Update unit tests to reflect changes and remove `parse_sid` remnants. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Replace `pid_from_session` utility with `Sid` class throughout preprocessing scripts for consistent SID handling. - Remove `is_valid_pid` function, consolidating validation logic within `Sid`. - Update all unit tests to ensure compatibility with the new `Sid` implementation. - Simplify utils module by removing redundant functions and their references. - Enhance error handling and validation for non-standard session identifiers. Signed-off-by: Carlson Büth <commit@cbueth.de>
- Implement `create_merged_psychometric_overview` to merge disjoint psychometric test sessions into a single overview. - Add logic to handle overlapping test results with warnings and separate entries. - Extend preprocessing pipeline to create merged psychometric overviews automatically. - Add comprehensive unit tests covering disjoint sessions, overlapping sessions, and independent merging scenarios. 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>
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.
This PR includes various usability improvements for the calculation of the psychometric tests, ut also some new features:
Sidclass for holding and verifying session IDs.sids across folder names and participant configs, which need to be matched. THis should also be used across the package.