-
Notifications
You must be signed in to change notification settings - Fork 83
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 the incorrect usage of repository interface of aiida-core
#549
Conversation
I am putting this on hold. This actually serves as an example for other plugin developers for fixes they most likely have to apply to their plugins for them to be compatible with the upcoming new version of The current plan we are discussing is to add deprecation warnings in |
Is it just the Of course a bare As for |
Unfortunately, the way the new repository is currently implemented, this will be difficult. The reason is that the
Sure, except that |
Ah, I see. Well, I don't really see a use case where it would be necessary to manually open / close instead of using the context manager, so I guess it's fine to deprecate that.
Yeah, true.. definitely best to proactively check who is using it and warn them.
That just means the old interface won't work with the new repository, right? As in, the updated code will still be compatible with older (1.0+) AiiDA versions? |
Yeah, currently you can get something like:
If with "updated code" you mean the updated Unfortunately, due to the code fixed in this PR that many plugins will have, it will be impossible to have older plugin versions backward compatible with the new repository interface. The use of Would you be interested in giving a look at my repo branch to see if you can spot potential backwards incompatibilities that I introduced that I forgot about? In any case, I think once I finalized it, I will send a mail to plugin developers notifying them about the plans, this PR and the changes they should prepare themselves and then have them test their plugin against my branch. All input and comments to the plan are welcome to try and make this as smooth as possible. |
Yeah, I mean at least there's a happy updating path, and with a deprecation period.. not ideal, but I'd say good enough :) At least it doesn't force users to upgrade
Sure, I can give it a glance. Which branch is that? |
https://github.com/sphuber/aiida_core/tree/fix/3445/disk-object-store-repository Note that I wrote this without trying to be fully backwards compatible. Since we now decided that we still want to try, in the latest commit I started "adding" backward compatibility stuff. But what I will have to do soon, is take those affected resources and already put those deprecations on |
I've added a few comments here: greschd/aiida_core#5 (review) By no means a guarantee that I found all backwards-incompatible bits. |
I think it would be ok to merge this now - it should be compatible with 1.3+ and (as far as we know now) 2.0, right? If we want to point other plugins here as an example, there's no harm in it being merged already. |
Yeah this could be merged. I was just keeping it open as an example, but we could just as easy refer to it when it is closed. Will update it |
64c15be
to
2e17769
Compare
Good to go for me, just one minor comment. |
The following illegal uses have been fixed: * `Node.open` has to be use in a context manager * `Node._get_base_folder` will soon be removed and cannot be used.
2e17769
to
3846a0b
Compare
Fixes #548
The following illegal uses have been fixed:
Node.open
has to be use in a context managerNode._get_base_folder
will soon be removed and cannot be used.