Skip to content

Commit

Permalink
Merge pull request #4211 from aiidateam/release/1.3.0
Browse files Browse the repository at this point in the history
Release `v1.3.0`
  • Loading branch information
sphuber authored Jul 1, 2020
2 parents d13de0e + c20c868 commit 52bd5ad
Show file tree
Hide file tree
Showing 489 changed files with 14,395 additions and 10,220 deletions.
3 changes: 0 additions & 3 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ COPY doubler.sh /usr/local/bin/
# Use messed-up filename to test quoting robustness
RUN mv /usr/local/bin/doubler.sh /usr/local/bin/d\"o\'ub\ ler.sh

# Put the add script
COPY add.sh /usr/local/bin/

# add USER (no password); 1000 is the uid of the user in the jenkins docker
RUN groupadd -g ${gid} jenkins && useradd -m -s /bin/bash -u ${uid} -g ${gid} jenkins

Expand Down
2 changes: 1 addition & 1 deletion .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ pipeline {
// when conditions, e.g. to depending on details on the commit (e.g. only when specific
// files are changed, where there is a string in the commit log, for a specific branch,
// for a Pull Request,for a specific environment variable, ...):
// https://jenkins.io/doc/book/pipeline/syntax/#when
// https://jenkins.io/doc/book/pipeline/syntax/#when
8 changes: 0 additions & 8 deletions .ci/add.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .ci/polish/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def launch(expression, code, use_calculations, use_calcfunctions, sleep, timeout
import uuid
from aiida.orm import Code, Int, Str
from aiida.engine import run_get_node, submit
from lib.expression import generate, validate, evaluate
from lib.workchain import generate_outlines, format_outlines, write_workchain
from lib.expression import generate, validate, evaluate # pylint: disable=import-error
from lib.workchain import generate_outlines, format_outlines, write_workchain # pylint: disable=import-error

if use_calculations and not isinstance(code, Code):
raise click.BadParameter('if you specify the -C flag, you have to specify a code as well')
Expand Down
5 changes: 2 additions & 3 deletions .ci/polish/lib/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# For further information please visit http://www.aiida.net #
###########################################################################
"""Functions to dynamically generate reversed polish notation expressions."""

import collections
import operator as operators
import random
Expand Down Expand Up @@ -47,7 +46,7 @@ def generate(min_operator_count=3, max_operator_count=5, min_operand_value=-5, m
for _ in range(operator_count):
operator = random.choice(OPERATORS.keys())

if OPERATORS[operator] == operators.pow:
if OPERATORS[operator] is operators.pow:
operand = random.choice(operand_range_pow)
else:
operand = random.choice(operand_range)
Expand Down Expand Up @@ -91,7 +90,7 @@ def validate(expression):
if operator not in OPERATORS.keys():
return False, 'the operator {} is not supported'.format(operator)

if OPERATORS[operator] == operators.pow and operand < 0:
if OPERATORS[operator] is operators.pow and operand < 0:
return False, 'a negative operand {} was found for the ^ operator, which is not allowed'.format(operand)

# At this point the symbols list should only contain the initial operand
Expand Down
2 changes: 1 addition & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ verdi -p $AIIDA_TEST_BACKEND computer configure local localhost --non-interactiv
# Configure the 'add' code inside localhost
verdi -p $AIIDA_TEST_BACKEND code setup -n -L add \
-D "simple script that adds two numbers" --on-computer -P arithmetic.add \
-Y localhost --remote-abs-path=/usr/local/bin/add.sh
-Y localhost --remote-abs-path=/bin/bash
56 changes: 46 additions & 10 deletions .ci/test_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from aiida.engine.persistence import ObjectLoader
from aiida.manage.caching import enable_caching
from aiida.orm import CalcJobNode, load_node, Int, Str, List, Dict, load_code
from aiida.plugins import CalculationFactory
from aiida.plugins import CalculationFactory, WorkflowFactory
from workchains import (
NestedWorkChain, DynamicNonDbInput, DynamicDbInput, DynamicMixedInput, ListEcho, CalcFunctionRunnerWorkChain,
WorkFunctionRunnerWorkChain, NestedInputNamespace, SerializeWorkChain, ArithmeticAddBaseWorkChain
Expand Down Expand Up @@ -261,6 +261,23 @@ def create_calculation_process(code, inputval):
return TemplatereplacerCalculation, inputs, expected_result


def run_arithmetic_add():
"""Run the `ArithmeticAddCalculation`."""
ArithmeticAddCalculation = CalculationFactory('arithmetic.add')

code = load_code(CODENAME_ADD)
inputs = {
'x': Int(1),
'y': Int(2),
'code': code,
}

# Normal inputs should run just fine
results, node = run.get_node(ArithmeticAddCalculation, **inputs)
assert node.is_finished_ok, node.exit_status
assert results['sum'] == 3


def run_base_restart_workchain():
"""Run the `AddArithmeticBaseWorkChain` a few times for various inputs."""
code = load_code(CODENAME_ADD)
Expand All @@ -269,15 +286,6 @@ def run_base_restart_workchain():
'x': Int(1),
'y': Int(2),
'code': code,
'settings': Dict(dict={'allow_negative': False}),
'metadata': {
'options': {
'resources': {
'num_machines': 1,
'num_mpiprocs_per_machine': 1
}
}
}
}
}

Expand Down Expand Up @@ -313,17 +321,45 @@ def run_base_restart_workchain():
assert len(node.called) == 1


def run_multiply_add_workchain():
"""Run the `MultiplyAddWorkChain`."""
MultiplyAddWorkChain = WorkflowFactory('arithmetic.multiply_add')

code = load_code(CODENAME_ADD)
inputs = {
'x': Int(1),
'y': Int(2),
'z': Int(3),
'code': code,
}

# Normal inputs should run just fine
results, node = run.get_node(MultiplyAddWorkChain, **inputs)
assert node.is_finished_ok, node.exit_status
assert len(node.called) == 2
assert 'result' in results
assert results['result'].value == 5


def main():
"""Launch a bunch of calculation jobs and workchains."""
# pylint: disable=too-many-locals,too-many-statements
expected_results_calculations = {}
expected_results_workchains = {}
code_doubler = load_code(CODENAME_DOUBLER)

# Run the `ArithmeticAddCalculation`
print('Running the `ArithmeticAddCalculation`')
run_arithmetic_add()

# Run the `AddArithmeticBaseWorkChain`
print('Running the `AddArithmeticBaseWorkChain`')
run_base_restart_workchain()

# Run the `MultiplyAddWorkChain`
print('Running the `MultiplyAddWorkChain`')
run_multiply_add_workchain()

# Submitting the Calculations the new way directly through the launchers
print('Submitting {} calculations to the daemon'.format(NUMBER_CALCULATIONS))
for counter in range(1, NUMBER_CALCULATIONS + 1):
Expand Down
2 changes: 1 addition & 1 deletion .ci/test_rpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ else
for i in $(seq 1 $NUMBER_WORKCHAINS); do
$VERDI -p ${AIIDA_TEST_BACKEND} run "${CLI_SCRIPT}" -X $CODE -C -F -d -t $TIMEOUT
done
fi
fi
2 changes: 1 addition & 1 deletion .ci/test_verdi_load_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ while true; do
fi
fi

done
done
21 changes: 0 additions & 21 deletions .ci/transifex_upload.sh

This file was deleted.

40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2
jobs:
docs:
docker:
# see: https://circleci.com/docs/2.0/circleci-images/#python
- image: circleci/python:3.7-stretch
steps:
# Get our data and merge with upstream
- run: sudo apt-get update
- checkout

- restore_cache:
keys:
- cache-pip

- run: |
pip install numpy==1.17.4
pip install --user .[docs,tests]
- save_cache:
key: cache-pip
paths:
- ~/.cache/pip

# Build the docs
- run:
name: Build docs to store
# nit-picky mode, turn warnings into errors,
# but do not stop the build on errors (so we can still inspect the doc artifacts)
command: |
sphinx-build -b html -n -W --keep-going -d docs/_build/doctrees docs/source docs/_build/html
- store_artifacts:
path: docs/_build/html/
destination: html

workflows:
version: 2
default:
jobs:
- docs
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Report a bug you have encountered
title: ''
labels: type/bug
assignees: ''

---

<!-- Before raising an issue, it is suggested that you first check out the: -->

- [ ] [AiiDA Troubleshooting Documentation](https://aiida.readthedocs.io/projects/aiida-core/en/latest/intro/troubleshooting.html)
- [ ] [AiiDA Users Forum](https://groups.google.com/forum/#!forum/aiidausers)

### Describe the bug

<!-- A clear and concise description of what the bug is. -->

### Steps to reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Your environment

- Operating system [e.g. Linux]:
- Python version [e.g. 3.7.1]:
- aiida-core version [e.g. 1.2.1]:

Other relevant software versions, e.g. Postres & RabbitMQ

### Additional context

<!-- Add any other context about the problem here. -->
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: AiiDA Users Forum
url: http://www.aiida.net/mailing-list/
about: For general questions and discussion
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Documentation Improvement
about: Suggest improvements to the documentation
title: 'Docs: '
labels: topic/documentation
assignees: ''

---

### Describe the current issue

<!-- A clear and concise description of what the problem is,
e.g.. This section is unclear ..., or I can't find information on ...
-->

### Describe the solution you'd like

<!-- A clear and concise description of what you would like to see happen. -->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest a new or improved feature
title: ''
labels: type/feature request
assignees: ''

---

<!-- Before suggesting a feature, we suggest you also check out https://github.com/aiidateam/AEP -->

### Is your feature request related to a problem? Please describe

<!-- A clear and concise description of what the problem is. e.g. I'm always frustrated when ... -->

### Describe the solution you'd like

<!-- A clear and concise description of what you want to happen. -->

### Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context

<!-- Add any other context or screenshots about the feature request here. -->
2 changes: 1 addition & 1 deletion .github/config/add.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: add
input_plugin: arithmetic.add
on_computer: true
computer: localhost
remote_abs_path: PLACEHOLDER_REMOTE_ABS_PATH_ADD
remote_abs_path: /bin/bash
prepend_text: ' '
append_text: ' '
2 changes: 1 addition & 1 deletion .github/config/localhost-config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
safe_interval: 0
safe_interval: 0
2 changes: 1 addition & 1 deletion .github/config/localhost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ work_dir: PLACEHOLDER_WORK_DIR
mpirun_command: ' '
mpiprocs_per_machine: 1
prepend_text: ' '
append_text: ' '
append_text: ' '
Loading

0 comments on commit 52bd5ad

Please sign in to comment.