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 viewer crash with empty layers #339

Merged
merged 5 commits into from
Nov 20, 2021
Merged

Conversation

abey79
Copy link
Owner

@abey79 abey79 commented Nov 18, 2021

Description

The viewer crashes when presented with empty layers (eg due to crop).

Fixes #338

Checklist

  • feature/fix implemented
  • code formatting ok (black and isort)
  • mypy vpype vpype_cli tests returns no error
  • tests added/updated and pytest succeeds
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • RTD doc updated and building with no error (make clean && make html in docs/)

@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #339 (4497036) into master (2cebb44) will increase coverage by 92.35%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #339       +/-   ##
===========================================
+ Coverage        0   92.35%   +92.35%     
===========================================
  Files           0       50       +50     
  Lines           0     3989     +3989     
  Branches        0      522      +522     
===========================================
+ Hits            0     3684     +3684     
- Misses          0      203      +203     
- Partials        0      102      +102     
Impacted Files Coverage Δ
tests/test_viewer.py 100.00% <100.00%> (ø)
vpype_viewer/engine.py 96.42% <100.00%> (ø)
vpype/config.py 97.87% <0.00%> (ø)
tests/test_model.py 100.00% <0.00%> (ø)
tests/test_layers.py 100.00% <0.00%> (ø)
vpype_cli/primitives.py 100.00% <0.00%> (ø)
vpype_cli/generators.py 100.00% <0.00%> (ø)
vpype/io.py 78.23% <0.00%> (ø)
vpype/primitives.py 61.40% <0.00%> (ø)
vpype/__init__.py 100.00% <0.00%> (ø)
... and 42 more

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 2cebb44...4497036. Read the comment docs.

@abey79
Copy link
Owner Author

abey79 commented Nov 18, 2021

@cbmoore May I ask if this PR fixes the issue? (I'm still struggling with Monterey/M1 issues at the moment)

Use the following command to install from this branch:

pip install -U git+https://github.com/abey79/vpype@fix-empty-layer-crash-338#egg=vpype[all]

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@abey79 abey79 merged commit 48c8765 into master Nov 20, 2021
@abey79 abey79 deleted the fix-empty-layer-crash-338 branch November 20, 2021 18:06
@cbmoore
Copy link

cbmoore commented Nov 23, 2021

@abey79 Sorry it took me so long to get back to you--looks like you already tested and merged but if there's anything else I can do to be helpful. Thanks for addressing this issue so quickly.

@abey79
Copy link
Owner Author

abey79 commented Nov 23, 2021

@cbmoore No worries. Reporting issues is already very helpful!

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.

When presented with an empty layer, the viewer fails to show anything
2 participants