Skip to content

Conversation

@gbeane
Copy link
Collaborator

@gbeane gbeane commented Apr 5, 2025

adds an action in the File menu to clear a project cache

opens a dialog for the user to confirm

forces reload of the currently selected video so the pose is loaded from the original .h5 file

@gbeane gbeane requested review from SkepticRaven and keithshep April 5, 2025 04:23
@gbeane gbeane self-assigned this Apr 7, 2025
@gbeane gbeane added the enhancement New feature or request label Apr 7, 2025
@keithshep
Copy link
Contributor

When would a user clear the project cache?

Copy link
Contributor

@keithshep keithshep left a comment

Choose a reason for hiding this comment

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

Looks good to me. If we add logging at some point the except OSError should emit something

@gbeane
Copy link
Collaborator Author

gbeane commented Apr 7, 2025

When would a user clear the project cache?

it should be infrequent, but we've had some incompatibilities in cached files between versions so they needed to be cleared and regenerated. At some point I am going to add some version information into the cache so JABS can deal with this automatically.

@gbeane
Copy link
Collaborator Author

gbeane commented Apr 8, 2025

@keithshep I'm not convinced this is necessary

I'm going to hold off on merging this. I think a better solution would be to add some versioning and validation of any cached file in the project directory, and invalidate anything missing this versioning (so all cached files created by previous versions of JABS would be re-generated)

@SkepticRaven
Copy link
Contributor

It's hit us before (e.g. #4), which happened to be working with v5 files. I know there's a version for features and re-generating those, but it looks like the cache version numbers are managed per-inherited class. A cursory glance shows that it's only present for v3 and v4, so since most of our recent stuff is v6 it's not being checked/managed.

@gbeane
Copy link
Collaborator Author

gbeane commented Sep 26, 2025

@keithshep @SkepticRaven @bergsalex

I've found myself wanting this functionality a few times. I've updated the branch, and addressed a comment, I'm going to merge unless there are any objections -- but first I'm going to add some version checking to the cache files and make that part of this pull request.

@gbeane gbeane marked this pull request as draft September 26, 2025 21:05
@gbeane gbeane marked this pull request as ready for review September 29, 2025 15:37
@gbeane
Copy link
Collaborator Author

gbeane commented Sep 29, 2025

updated to improve pose cache versioning

@gbeane gbeane merged commit 24852f0 into main Sep 30, 2025
2 checks passed
@gbeane gbeane deleted the add_clear_cache_action branch September 30, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants