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

cacheSelfie().xxx_TODO() should cascade through later cacheSelfie calls #237

Open
nedtwigg opened this issue Feb 20, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@nedtwigg
Copy link
Member

A classic problem in Jupyter / IPython workflows is:

  • you run the whole notebook
  • you make some changes and run just the first cell
  • you look at the last cell which has cached results from the initial run, but has not updated since the changes in the first cell, and you are confused

If you use //selfieonce or //SELFIEWRITE, these sorts of problems don't happen. But with _TODO they can. We should probably have something like this in our settings:

enum CacheTodoCascade {
  NONE, // This is our current behavior
  WITHIN_TEST, // Once a _TODO is encountered in a test,
               // it will rewrite everything after that in the test.
               // This should probably be the default.
  WITHIN_TEST_CLASS, // Rewrite everything in all the rest of the tests in that class
                     // This introduces coupling between tests, which is ill-defined if they are
                     // being executed in parallel. Might be not be a good idea...
}

This is quite hazardous with cacheSelfie. With expectSelfie it's not hazardous but can be annoying. I'm inclined for this functionality to be limited only to CacheTodoCascade, but it's worth considering just TodoCascade and use it for both expectSelfie and cacheSelfie calls.

@nedtwigg nedtwigg added the enhancement New feature or request label Feb 20, 2024
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

No branches or pull requests

1 participant