Skip to content

Detect duplicates in participant_id column#102

Open
HippocampusGirl wants to merge 4 commits into
mainfrom
detect-duplicates
Open

Detect duplicates in participant_id column#102
HippocampusGirl wants to merge 4 commits into
mainfrom
detect-duplicates

Conversation

@HippocampusGirl

@HippocampusGirl HippocampusGirl commented Feb 24, 2026

Copy link
Copy Markdown
Member

Fix #101

And add unit test

Copilot AI review requested due to automatic review settings February 24, 2026 09:07
@HippocampusGirl HippocampusGirl changed the title Detect duplicates in participant_id column Fix #101 detect duplicates in participant_id column Feb 24, 2026
@HippocampusGirl HippocampusGirl changed the title Fix #101 detect duplicates in participant_id column Detect duplicates in participant_id column Feb 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds duplicate detection for the participant_id column in phenotype files and includes corresponding unit tests. The changes ensure data integrity by preventing duplicate participant IDs from being loaded into the workflow. Type annotations are also added to improve code clarity.

Changes:

  • Added duplicate participant_id validation in load_data_frame() function
  • Added type annotations for ages and genders numpy arrays
  • Created comprehensive unit tests for the load_data_frame() function

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
wonkyconn/workflow.py Added duplicate detection check for participant_id and type annotations for age/gender arrays
wonkyconn/tests/test_workflow.py New test file with comprehensive tests for load_data_frame validation logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wonkyconn/tests/test_workflow.py Outdated
Comment thread wonkyconn/tests/test_workflow.py Outdated
Comment thread wonkyconn/tests/test_workflow.py Outdated
@codecov

codecov Bot commented Feb 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.00000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.65%. Comparing base (68c04a7) to head (919d623).

Files with missing lines Patch % Lines
wonkyconn/tests/test_workflow.py 28.57% 15 Missing ⚠️
wonkyconn/workflow.py 25.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
- Coverage   54.03%   53.65%   -0.38%     
==========================================
  Files          26       27       +1     
  Lines        1414     1437      +23     
==========================================
+ Hits          764      771       +7     
- Misses        650      666      +16     
Files with missing lines Coverage Δ
wonkyconn/workflow.py 81.45% <25.00%> (-0.43%) ⬇️
wonkyconn/tests/test_workflow.py 28.57% <28.57%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

HippocampusGirl and others added 4 commits February 26, 2026 17:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

Crash for duplicate participants in phenotype file

2 participants