talmolab / sleap

A deep learning framework for multi-animal pose tracking.
https://sleap.ai
Other
435 stars 97 forks source link

Fix skeleton templates #1404

Closed roomrys closed 1 year ago

roomrys commented 1 year ago

Description

In #1265 while moving the dock creation logic outside the MainWindow class, a critical line was overlooked: https://github.com/talmolab/sleap/blob/0e7a3725d5e238b97f5daa35795829a15cd156db/sleap/gui/commands.py#L1955

The MainWindow.skeletonTemplates attribute was renamed to MainWindow.skeleton_dock.skeleton_templates, but this line (untested due to its GUI nature) was left behind.

This PR corrects the line above to correctly call the Video_Dock.skeleton_templates attribute. While we do not test the OpenSkeleton.ask method where the error originated from, this PR moves the code used to get the filename to a staticmethod on the OpenSkeleton class which is called in the docks tests. The code has also been manually tested to run through the OpenSkeleton.ask method and works as expected.

Types of changes

Does this address any currently open issues?

Outside contributors checklist

Thank you for contributing to SLEAP!

:heart:

codecov[bot] commented 1 year ago

Codecov Report

Merging #1404 (1eae024) into develop (0e7a372) will increase coverage by 0.00%. The diff coverage is 83.33%.

@@           Coverage Diff            @@
##           develop    #1404   +/-   ##
========================================
  Coverage    72.73%   72.74%           
========================================
  Files          133      133           
  Lines        23719    23723    +4     
========================================
+ Hits         17252    17257    +5     
+ Misses        6467     6466    -1     
Impacted Files Coverage Δ
sleap/gui/commands.py 60.91% <83.33%> (+0.16%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more