Skip to content

Conversation

@BadPrograms
Copy link
Collaborator

fixed bug that adds pos of root as an empty list while there should be nothing

Comment on lines 99 to 100
if isinstance(pos, (list, tuple)):
lT.pos[C_next] = list(pos)
Copy link
Member

Choose a reason for hiding this comment

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

Why do you make the position a list?
The position is forced to be a np.ndarray at construction is there a reason for you to change that here?
Also, if the position is given as a np.ndarray it would not work here, I don't think it's great behaviour.

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.42%. Comparing base (30be061) to head (66a5751).
⚠️ Report is 13 commits behind head on v3.x.

Files with missing lines Patch % Lines
src/lineagetree/_core/_modifier.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             v3.x      #95      +/-   ##
==========================================
- Coverage   86.46%   86.42%   -0.05%     
==========================================
  Files          20       20              
  Lines        1810     1812       +2     
==========================================
+ Hits         1565     1566       +1     
- Misses        245      246       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +100 to +101
if isinstance(pos, (list, tuple)):
lT.pos[C_next] = np.array(pos)
Copy link
Member

Choose a reason for hiding this comment

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

Also, I forgot but what we do that either all nodes have position or none but no in between

@leoguignard leoguignard merged commit 869745b into v3.x Jan 5, 2026
1 of 3 checks passed
@BadPrograms BadPrograms deleted the fix_the_add_root branch January 7, 2026 12:25
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.

2 participants