Skip to content

add file menu action to clear project cache #65

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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 keithshep and SkepticRaven 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.

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.

3 participants