-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add arithmetic workflows and restructure calculations #4124
Merged
Conversation
This file contains 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
sphuber
requested changes
May 27, 2020
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.
Thanks @mbercx , few suggestions and comments
sphuber
force-pushed
the
arithmetic
branch
5 times, most recently
from
May 28, 2020 13:05
80d1e7b
to
9c84cec
Compare
Refactor the calculations package to remove the plugin directory. The calculation job plugins that ship with `aiida-core` were being stored in `aiida.calculations.plugins` but the `plugins` submodule is unnecessary so it is removed. The old import is kept for now and will emit a deprecation warning. The `ArithemeticAddCalculation` is updated to simplify its usage as well as to make it easier to understand the implementation, which is important as it is used consistenly as an example in tutorials and the documentation. The following changes are applied: * `metadata.options.resources` has a default * Unnecessary utility methods are removed to reduce amount of code * `calc_info.cmdline_params` are replaced with `calc_info.stdin_name` * Code will now work directly with bash instead of custom `add.sh` script Finally, two workflows implementations are added for testing and demonstration purposes. The `add_multiply` work function and the `MultiplyAddWorkChain`. These will be used extensively in the how-to guides of the documentation and the tutorials.
sphuber
force-pushed
the
arithmetic
branch
2 times, most recently
from
May 28, 2020 14:22
ea73747
to
a85bd4c
Compare
Add also tests for the `ArithmeticAddCalculation` which is not new but was up till now untested. Now that this will start to be used heavily in tutorials and documentation for teaching purposes, we should make sure that it is well tested. Here we add an integration test and a unit test for the `prepare_for_submission` method.
sphuber
approved these changes
May 28, 2020
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.
Overhaul of the arithmetic processes for demonstration purposes and the documentation revamp.
Refactors the calculations package to remove the plugin directory. Also changes the
ArithmeticAddCalculation
to add defaults for the resources, and change the required code to bash.Introduces new workflows for demonstration purposes, consistent with the revamped documentation:
multiply_add
module with theMultiplyAddWorkChain
class and requiredmultiply
calculation function.add_multiply
module with theadd_and_multiply
work function anAddMultiplyWorkChain
class.