-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix caching for repos without remotes #194
Fix caching for repos without remotes #194
Conversation
@lakesare Happy to fix this, but I can't figure out the scenario you're encountering. If I run:
it works whether I run this in an empty directory, a directory I've just run As for how it is useful for caching: in some applications (like SciDash) the source of the model(s) used determines the uniqueness of a test score. The serializer does not otherwise store the actual code of the model, so serializing the commit hash and repo is a proxy for the actual code. Any model with the same commit hash and repo, and the same attributes (from the rest of the serialization) is taken to be the same model. |
You seem to have covered the scenario I encountered! In master we end up accessing Thank you for the explanation, makes perfect sense! |
@lakesare Now that you mention it I am actually using the current But I agree that |
I'm running the current master too (this issue is present in both v0.2.4 and the current master).
It would be sufficient, but it would be worse too? It's not an exception semantically (not having any remotes is normal and expected), and exceptions are harder to debug. |
I added some tests showing where the old version fails, see fdfd263#diff-4386d9251689717183d28bb7d126eec96d24d45406db360345df14b14eeccffcR88 (the tests pass on my machine). If the tests fail on your machine then we might have different versions of |
@lakesare Can you remove |
Thank you, @lakesare! |
SciUnit 0.2.4 (and up) wasn't working for me locally with the Backend (because I do have a .git repo, but don't have any remotes), this fixes it.
But I wonder - why do we need this, how is this useful for caching?