Skip to content

Conversation

@SFJohnson24
Copy link
Collaborator

@SFJohnson24 SFJohnson24 commented Oct 29, 2025

this PR updates the is_contained_by
to test CG0001:
negative1 should have 2 issues but shows 3. CM dataset has C49563 in both define_variable_codelist_coded_codes and domain_lib_ccode so it should not flag this as an issues as it is_not_contained_by. The issue stems from it not parsing the values from the target. it is looking for the list ['C49563 '] instead of looking for the value within the other list.

This pull request updates the logic for checking containment within the is_contained_by method in dataframe_operators.py. The main improvement is more robust handling of columns containing iterable values, ensuring that containment checks work correctly for lists and other iterables in DataFrame columns.

Containment logic improvements:

  • Enhanced the is_contained_by method to iterate over columns of iterables, using the new is_in function to check if any item in a list is contained in the comparator value, ensuring correct handling of columns with lists.
  • Updated the import section to include the new is_in function, which is now used for containment checks.

@SFJohnson24 SFJohnson24 self-assigned this Oct 29, 2025
@SFJohnson24 SFJohnson24 requested review from RamilCDISC and removed request for RamilCDISC October 29, 2025 19:18
@SFJohnson24 SFJohnson24 marked this pull request as ready for review October 29, 2025 19:49
@SFJohnson24 SFJohnson24 changed the title Isin CG0001 Oct 29, 2025
Copy link
Collaborator

@RamilCDISC RamilCDISC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR updates the is_in operator to handle an edge case. The updated PR was validated by:

  1. Reviewing the PR for any unwanted code or comments.
  2. Reviewing the updated logic in accordance with the AC.
  3. Ensuring all unit and regression tests pass.
  4. Running manual validation against positive datasets.
  5. Running manual validations against negative datasets.

@RamilCDISC RamilCDISC merged commit 87a5431 into main Nov 3, 2025
11 checks passed
@RamilCDISC RamilCDISC deleted the isin branch November 3, 2025 13:52
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.

3 participants