Skip to content

Move to EasyList#185

Merged
henrikjacobsenfys merged 22 commits into
developfrom
move-to-easylist
May 19, 2026
Merged

Move to EasyList#185
henrikjacobsenfys merged 22 commits into
developfrom
move-to-easylist

Conversation

@henrikjacobsenfys
Copy link
Copy Markdown
Member

@henrikjacobsenfys henrikjacobsenfys commented May 16, 2026

It's missing a few tests, and perhaps moving a few tests around. However, the missing tests are really simple and I therefore deem it ready for review.

See #186 for the philosophy behind this.

Closes #117

@henrikjacobsenfys henrikjacobsenfys added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] medium Normal/default priority labels May 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 99.44751% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.42%. Comparing base (687e079) to head (9ca833e).

Files with missing lines Patch % Lines
.../easydynamics/sample_model/component_collection.py 97.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #185      +/-   ##
===========================================
+ Coverage    98.18%   98.42%   +0.23%     
===========================================
  Files           47       50       +3     
  Lines         3142     3175      +33     
  Branches       570      576       +6     
===========================================
+ Hits          3085     3125      +40     
+ Misses          35       26       -9     
- Partials        22       24       +2     
Flag Coverage Δ
integration 46.17% <50.27%> (+0.05%) ⬆️
unittests 98.42% <99.44%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@henrikjacobsenfys henrikjacobsenfys marked this pull request as draft May 16, 2026 18:36
@henrikjacobsenfys henrikjacobsenfys linked an issue May 18, 2026 that may be closed by this pull request
self._validate_type(value)
self._check_name_unique(value)
super().insert(index, value)
value.lock_name()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ProtectedType_ is bound to NewBase, but NewBase doesn't have a lock_name method. I see it's from a name_mixin, but then i'd expect typevar must be different. Doesn't ruff complain about this call?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point! The protected type should be my base classes, not the easyscience ones.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(But to answer your question: no, Ruff did not complain)

@henrikjacobsenfys henrikjacobsenfys marked this pull request as ready for review May 18, 2026 12:25
Copy link
Copy Markdown
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

Good changes!
Please consider adding the duplicate check to append, then this PR is ready to merge.

Comment on lines +102 to +103
self._validate_type(value)
super().append(value)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this method, as opposed to say, insert, doesn't check for duplicate names.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I wonder if this is needed, since I believe all methods in the end call insert to do the insertion. The tests will show when I get around to writing them :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update: it's not needed :)

@henrikjacobsenfys henrikjacobsenfys merged commit bf5e9ea into develop May 19, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] medium Normal/default priority [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use EasyList or similar for ComponentCollection

3 participants