brisvag / blik

Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
https://brisvag.github.io/blik/
GNU General Public License v3.0
23 stars 8 forks source link

Refactor Viewer code and addition of volume selector #80

Closed brisvag closed 3 years ago

brisvag commented 3 years ago

Volume selector is here!

Now p.show() will also automatically dock a simple dropdown menu widget in the napari viewer. This widget lets you select which volume to show!

There's also a couple of minor bufixes thrown in.

codecov[bot] commented 3 years ago

Codecov Report

Merging #80 (856f255) into develop (8a149f4) will increase coverage by 2.35%. The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #80      +/-   ##
===========================================
+ Coverage    79.84%   82.19%   +2.35%     
===========================================
  Files           98      103       +5     
  Lines         1945     2011      +66     
===========================================
+ Hits          1553     1653     +100     
+ Misses         392      358      -34     
Impacted Files Coverage Δ
peepingtom/depictors/__init__.py 100.00% <ø> (ø)
peepingtom/depictors/napari/naparidepictor.py 83.33% <ø> (+14.10%) :arrow_up:
peepingtom/depictors/napari/particledepictor.py 85.71% <0.00%> (ø)
peepingtom/io_/read/tbl/utils.py 81.81% <50.00%> (ø)
peepingtom/gui/widgets/volume_selector.py 60.00% <60.00%> (ø)
peepingtom/peeper.py 73.52% <78.26%> (+3.17%) :arrow_up:
peepingtom/gui/viewer.py 96.77% <96.77%> (ø)
peepingtom/__main__.py 54.54% <100.00%> (ø)
peepingtom/_tests/test_cli.py 100.00% <100.00%> (ø)
peepingtom/depictors/depictor.py 76.47% <100.00%> (ø)
... and 14 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 4e7e4ee...856f255. Read the comment docs.

alisterburt commented 3 years ago

non-obvious fail in tests, does it happen when you test locally?

brisvag commented 3 years ago

@alisterburt I'm trying to fix it... it's a qt problem, almost certainly. Locally it's fine, but running graphical programs on the github actions VMs seems to be a bit tricky!

alisterburt commented 3 years ago

uh oh! Have you looked at the qtbot fixture? https://pytest-qt.readthedocs.io/en/latest/intro.html That's what's used in napari for qt testing

On Tue, 16 Mar 2021 at 16:39, Lorenzo Gaifas @.***> wrote:

@alisterburt https://github.com/alisterburt I'm trying to fix it... it's a qt problem, almost certainly. Locally it's fine, but running graphical programs on the github actions VMs seems to be a bit tricky!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gutsche-lab/peepingtom/pull/80#issuecomment-800423246, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXYBYEVOWFWN7DVCQWVZC3TD6CU7ANCNFSM4ZITORHQ .

brisvag commented 3 years ago

I decided to drop testing of qt stuff, for now. It seems to be the same as this issue, which has no solution yet. The problem actually happened locally as well, I was just doing things wrong at first. The thing is, tests pass just fine, but then the command fails with an exit code of 1 because some qt stuff breaks after all the tests are already finished.

To keep codecov happy, I added some unrelated tests for now, so we can merge this :P

brisvag commented 3 years ago

Qt tests are up and running, thanks to the make_napari_viewer pytest fixture!