Conversation
… logging in adat functions - CAN-27
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the somadata package by improving code maintainability, adding flexible ADAT concatenation options, and upgrading diagnostic logging. The changes focus on refactoring for readability while adding new functionality for handling different SOMAmer sets during concatenation.
Key Changes:
- Introduced
merge_strategyparameter ('inner' or 'outer') tosmart_adat_concatenationfor flexible RFU matrix merging - Replaced warnings with structured logging for better diagnostics and traceability
- Enhanced
CalReferenceandPlateScale_Referencehandling during concatenation with pipe-delimited merging
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Version bump from 1.2.4 to 1.2.5 |
somadata/base/adat_meta_helpers.py |
Reformatted method signatures and replaced warnings with logging for missing metadata |
somadata/tools/adat_concatenation.py |
Added merge_strategy parameter and special handling for CalReference/PlateScale_Reference fields |
somadata/tools/adat_concatenation_utils.py |
Added prepare_rfu_matrix_for_outer_merge function and replaced warnings with logging |
tests/base/test_adat_metadata_helpers.py |
Updated tests to use assertLogs instead of pytest.warns |
tests/tools/test_adat_concatenation.py |
Updated tests for logging changes and added coverage for new concatenation behavior |
tests/tools/test_adat_concatenation_utils.py |
Comprehensive test coverage for outer merge functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jrefi-illumina
approved these changes
Nov 12, 2025
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 pull request focuses on improving code readability, maintainability, and flexibility in the
somadatapackage, especially in metadata handling and ADAT concatenation. The main changes include significant refactoring for code clarity, better error and warning messaging, and enhanced functionality for concatenating ADAT files.Refactoring and readability improvements:
AdatMetaHelpersclass inadat_meta_helpers.pyfor better readability: reformatted long method signatures, improved error messages, and replaced some warnings with logging for better traceability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Enhanced ADAT concatenation functionality:
merge_strategyparameter tosmart_adat_concatenationinadat_concatenation.py, allowing users to choose between 'inner' and 'outer' merge strategies for the RFU matrix, increasing flexibility when combining ADATs with different SOMAmer sets. [1] [2] [3]CalReferenceandPlateScale_Referencemetadata during concatenation: now merges unique values using a pipe delimiter and logs a warning if differences are found across ADATs, helping users track potential downstream issues.Logging improvements:
adat_meta_helpers.pyandadat_concatenation.pyto replace some warnings and improve diagnostic output. [1] [2] [3]Version bump:
1.2.4to1.2.5inpyproject.toml.