Orm design refactor#2190
Merged
Merged
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. |
sphuber
requested changes
Nov 12, 2018
Contributor
sphuber
left a comment
There was a problem hiding this comment.
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
sphuber
approved these changes
Nov 12, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Collectionclass for each object type to interact with the collection of those things eg.User.objectsresolves to the collection of users and can be used to do things like delete users.