Formalize the definition and import location of plugin factories#2498
Merged
sphuber merged 4 commits intoFeb 18, 2019
Merged
Conversation
This will make it easier to switch to generic testing frameworks as well as make it easier to distinguish them from implementation files in an editor that without the prefix often share the same name.
Also refactored the `computer` and `authinfo` modules for both backend implementations to get rid of the pre-commit exceptions.
To keep in line with the naming scheme of the other modules the respective modules have been renamed to their plurals: * `aiida.scheduler` -> `aiida.schedulers` * `aiida.transport` -> `aiida.transports`
The are exposed and importable from `aiida.plugins`.
giovannipizzi
approved these changes
Feb 18, 2019
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.
Fixes #2176
Even though each factory is designed to load a specific sub class of the base classes for the various entry point groups and therefore it could be argued that they should be defined in the corresponding module, these "functions" are not actual factories as such and are really syntactic sugar to load a plugin class through an entry point . As such, it was decided to define all plugin factories in
aiida.plugins.factoriesand expose them to be imported fromaiida.plugins.In this PR I also took the liberty to rename some modules for consistency and to simplify development.
Short overview of the changes:
test_prefixaiida.orm.implementation.authinfotoaiida.orm.implementation.authinfosaiida.orm.implementation.computertoaiida.orm.implementation.computersaiida.schedulertoaiida.schedulersaiida.transporttoaiida.transports