Skip to content

Removed undo - #342

Merged
rozyczko merged 5 commits into
release-3.0from
removed_undo
Oct 23, 2026
Merged

rozyczko merged 5 commits into
release-3.0from
removed_undo

Conversation

@rozyczko

Copy link
Copy Markdown
Member

The undo/redo stack needs complete overhaul. This PR removes any vestiges of it so we can start from fresh.
For reference, the pre-PR version of release-3.0 will be forked off.

@rozyczko rozyczko added [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) [priority] high Should be prioritized soon [area] base classes Changes to or creation of new base classes labels Oct 22, 2026
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.70%. Comparing base (45a26fe) to head (80d914e).
⚠️ Report is 6 commits behind head on release-3.0.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           release-3.0     #342      +/-   ##
===============================================
- Coverage        93.78%   92.70%   -1.08%     
===============================================
  Files               48       47       -1     
  Lines             3764     3400     -364     
===============================================
- Hits              3530     3152     -378     
- Misses             234      248      +14     
Flag Coverage Δ
unittests 92.70% <100.00%> (-1.08%) ⬇️

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

Files with missing lines Coverage Δ
src/easyscience/__init__.py 100.00% <ø> (ø)
src/easyscience/base_classes/new_base.py 98.38% <ø> (-1.62%) ⬇️
.../easyscience/fitting/minimizers/minimizer_bumps.py 99.30% <100.00%> (-0.05%) ⬇️
...rc/easyscience/fitting/minimizers/minimizer_dfo.py 95.78% <100.00%> (-1.96%) ⬇️
.../easyscience/fitting/minimizers/minimizer_lmfit.py 98.29% <100.00%> (-0.15%) ⬇️
src/easyscience/fitting/samplers/sampler_bumps.py 100.00% <ø> (ø)
src/easyscience/global_object/__init__.py 100.00% <ø> (ø)
src/easyscience/global_object/global_object.py 100.00% <ø> (ø)
src/easyscience/variable/descriptor_array.py 89.16% <100.00%> (+0.04%) ⬆️
src/easyscience/variable/descriptor_base.py 95.65% <ø> (-0.10%) ⬇️
... and 4 more

... and 3 files with indirect coverage changes

@rozyczko
rozyczko requested a review from damskii9992 October 23, 2026 06:52
@rozyczko
rozyczko marked this pull request as ready for review October 23, 2026 06:52
Base automatically changed from 207-remove-typedict to release-3.0 October 23, 2026 06:54

@damskii9992 damskii9992 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just 1 unnecessary test and a question. Otherwise it LGTM

Comment on lines +69 to +70
def test_no_undo_stack(self):
"""Undo/redo support has been removed from the GlobalObject"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test for removed functionality? :)

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.

Bad bot! Need to tweak UNIT_TESTS.md

Comment on lines -357 to +353
self._array.variances = variance.astype('float')
# Values must be floats for optimization
variance = variance.astype('float')
self._array.variances = variance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What happened here? Did you find a bug?

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 catch! Yes, this was a bug.
the setter accepts None, which clears the variances.
The rest of the code is inside if variance is not None, but the old last line was outside that block.
So descriptor.variance = None crashed with AttributeError: 'NoneType' object has no attribute 'astype', and you couldn't clear the variances through the property.
Also, added a test for it in test_descriptor_array.

I know we want to potentially remove descriptor array entirely, but I wanted to fix this in case we keep the class.

@rozyczko
rozyczko merged commit b534eba into release-3.0 Oct 23, 2026
28 checks passed
@rozyczko
rozyczko deleted the removed_undo branch October 23, 2026 10:39
@damskii9992 damskii9992 linked an issue Oct 23, 2026 that may be closed by this pull request
@rozyczko rozyczko mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[area] base classes Changes to or creation of new base classes [priority] high Should be prioritized soon [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove undo/redo vestiges

2 participants