-
Notifications
You must be signed in to change notification settings - Fork 192
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
Orm design refactor #2190
Orm design refactor #2190
Conversation
orm.User is now a concrete class. Also get_automatic_user has been replaced by: from aiida.orm import User User.objects.get_default()
Now the backend will not normalize the email because all User creation is done through the concrete frontend class.
Coverage decreased (-7.3%) to 61.283% when pulling 4f287777eac2c547e29a45bb461ac1c5f9b5d5f7 on muhrin:orm_design_refactor into eec38d8 on aiidateam:develop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes. In addition, we might want to remove explicitly passing in the backend in objects()
calls in the tests and just use the property to pass in the backend that is defined for the currently loaded profile
4f28777
to
ce2eef4
Compare
Ported Computer, AuthInfo and User to new backend design where the user interacts with concrete classes which themselves contain the abstract class corresponding to the backend type for that class.
Having the user interact with concrete classes means that they can, amongst other things, instantiate them using the constructor and have the correct backend type be crated underneath (rather than using import magic as before).
There is also a corresponding
Collection
class for each object type to interact with the collection of those things eg.User.objects
resolves to the collection of users and can be used to do things like delete users.