Skip to content
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
merged 2 commits into from
May 28, 2020

Commits on May 28, 2020

  1. Add arithmetic workflows and restructure calculation plugins

    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.
    mbercx authored and sphuber committed May 28, 2020
    Configuration menu
    Copy the full SHA
    94efa26 View commit details
    Browse the repository at this point in the history
  2. Add tests for new MultiplyAddWorkChain and add_multiply plugins

    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 committed May 28, 2020
    Configuration menu
    Copy the full SHA
    17e4060 View commit details
    Browse the repository at this point in the history