Skip to content

Allow adding and removing coefficients from Polynomial - #212

Merged
henrikjacobsenfys merged 1 commit into
developfrom
polynomial-add-remove-coefficients
Aug 9, 2026
Merged

Allow adding and removing coefficients from Polynomial#212
henrikjacobsenfys merged 1 commit into
developfrom
polynomial-add-remove-coefficients

Conversation

@henrikjacobsenfys

Copy link
Copy Markdown
Member

Allow adding and removing coefficients from Polynomial

Closes #63

@henrikjacobsenfys henrikjacobsenfys added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] medium Normal/default priority labels Jun 22, 2026
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.99%. Comparing base (45e4757) to head (5c1b03b).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #212   +/-   ##
========================================
  Coverage    98.98%   98.99%           
========================================
  Files           53       53           
  Lines         4037     4060   +23     
  Branches       697      706    +9     
========================================
+ Hits          3996     4019   +23     
  Misses          19       19           
  Partials        22       22           
Flag Coverage Δ
unittests 98.99% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...easydynamics/sample_model/components/polynomial.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henrikjacobsenfys
henrikjacobsenfys force-pushed the polynomial-add-remove-coefficients branch from b46920d to 5c1b03b Compare August 9, 2026 19:28
@henrikjacobsenfys

Copy link
Copy Markdown
Member Author

Rebased onto the new develop and updated to the new unit API (following the Unit overhaul 1-6 merge):

  • \unit=\ -> \x_unit=/\y_unit=\ throughout; sparse-dict init now preserves both.
  • Kept develop's existing \Parameter\ support in _init_\ and the \coefficients\ setter. The earlier revision of this branch dropped it, which would have been an unrelated regression.
  • \�dd_coefficient\ /
    emove_coefficient\ and sparse-dict construction carried over unchanged, plus tests for interaction with \convert_x_unit\ and \get_all_variables.
  • Dict keys now reject \�ool\ explicitly (\�ool\ is a subclass of \int).
  • Removed the {'coefficients': {}}\ case from \ est_input_type_validation_raises: an empty dict is now a valid-but-empty dict raising \ValueError, covered by \ est_sparse_dict_empty_raises.

The previous CI failure was \ est_repr\ expecting the
ame = X\ repr format, which the branch was too old to have. That is resolved by the rebase.

@henrikjacobsenfys
henrikjacobsenfys merged commit 1e0218d into develop Aug 9, 2026
33 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.

1 participant