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

Ensure data format compatibility #1222

Merged
merged 4 commits into from
Mar 16, 2023

Conversation

roomrys
Copy link
Collaborator

@roomrys roomrys commented Mar 14, 2023

Description

In #1122, we added two new attributes in the Skeleton class called description and preview_image. Consequently, while you are able to open older files on v1.3.0a0, files from this version are unable to be opened on previous versions - which is not a problem if working on a single SLEAP version. However, this could easily become extremely annoying if working on multiple workstations which all have different versions of SLEAP installed - not to mention possibly breaking data format backwards compatibility.

The fields we added are currently not used except for the already provided template skeletons. Hence, this PR selectively writes the new fields depending on whether the skeleton is a template (manually specified via API - only by those looking to add to our collection of template skeletons). This should not break compatibility since template skeletons are only provided as early as 1.3.0a0.

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (explain)

Does this address any currently open issues?

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

@roomrys roomrys requested a review from talmo March 15, 2023 00:01
@roomrys roomrys marked this pull request as ready for review March 15, 2023 00:33
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #1222 (df6cb5d) into develop (5b3b598) will decrease coverage by 0.23%.
The diff coverage is 67.24%.

@@             Coverage Diff             @@
##           develop    #1222      +/-   ##
===========================================
- Coverage    72.36%   72.14%   -0.23%     
===========================================
  Files          132      132              
  Lines        23502    23538      +36     
===========================================
- Hits         17008    16982      -26     
- Misses        6494     6556      +62     
Impacted Files Coverage Δ
sleap/gui/learning/scopedkeydict.py 90.32% <ø> (ø)
sleap/gui/learning/dialog.py 64.42% <41.93%> (-1.45%) ⬇️
sleap/skeleton.py 91.16% <94.73%> (+0.01%) ⬆️
sleap/gui/commands.py 60.85% <100.00%> (ø)
sleap/gui/learning/receptivefield.py 85.85% <100.00%> (-0.15%) ⬇️

... and 1 file with indirect coverage changes

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

Copy link
Collaborator

@talmo talmo left a comment

Choose a reason for hiding this comment

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

lgtm -- probably should've made older skeletons less brittle, but this is the next best thing i guess

@roomrys roomrys merged commit 465ac07 into develop Mar 16, 2023
@roomrys roomrys deleted the liezl/ensure-data-format-compatibility branch March 16, 2023 16:20
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.

2 participants