Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix widgets #2625

Merged
merged 5 commits into from Mar 7, 2021
Merged

Fix widgets #2625

merged 5 commits into from Mar 7, 2021

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Jan 24, 2021

Fix various bugs with CircleWidget and Line2DWidget, which became noticeable following #2615.

Progress of the PR

  • CircleWidget fixes:
    • Fix initialisation: the inner radius was incorrect. Previously, this was not noticeable, because the patch was updated, removing unnecessary patch update event makes this bug visible
    • Fix error when the inner radius reach zeros by decreasing the size
  • Line2DWidget fixes:
    • Fix plotting of the linewidth indicator lines: same as for the CircleWidget, removing redundant update event makes this issue noticeable.
    • Fix removing add adding again linewidth indicator lines when the linewidth reaches zeros and is increased again
    • raise ValueError when linewidth > 0 and the scale of the axis are different.
  • add entry to CHANGES.rst (if appropriate),
  • add tests,
  • ready for review.

@codecov
Copy link

codecov bot commented Jan 24, 2021

Codecov Report

Merging #2625 (c6f0c52) into RELEASE_next_patch (b191b19) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##           RELEASE_next_patch    #2625      +/-   ##
======================================================
+ Coverage               76.44%   76.58%   +0.13%     
======================================================
  Files                     202      202              
  Lines                   29688    29698      +10     
  Branches                 6493     6497       +4     
======================================================
+ Hits                    22696    22745      +49     
+ Misses                   5223     5187      -36     
+ Partials                 1769     1766       -3     
Impacted Files Coverage Δ
hyperspy/drawing/_widgets/circle.py 74.38% <100.00%> (+21.48%) ⬆️
hyperspy/drawing/_widgets/line2d.py 54.29% <100.00%> (+4.70%) ⬆️
hyperspy/drawing/widget.py 69.64% <100.00%> (+0.39%) ⬆️
hyperspy/roi.py 78.02% <0.00%> (+0.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b191b19...c6f0c52. Read the comment docs.

@ericpre ericpre added this to the v1.6.2 milestone Feb 27, 2021
@francisco-dlp
Copy link
Member

LGTM, could you update it with Rnp?

@ericpre
Copy link
Member Author

ericpre commented Mar 7, 2021

Done!

@francisco-dlp francisco-dlp merged commit 922cbc9 into hyperspy:RELEASE_next_patch Mar 7, 2021
@ericpre ericpre deleted the fix_widgets branch March 7, 2021 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants