Skip to content

Commit c746331

Browse files
authored
Merge pull request #3934 from aiidateam/release/1.2.0
Release `v1.2.0`
2 parents 20fa6c2 + 8ad0f24 commit c746331

File tree

187 files changed

+6317
-3907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+6317
-3907
lines changed

.ci/workchains.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# For further information on the license, see the LICENSE.txt file #
88
# For further information please visit http://www.aiida.net #
99
###########################################################################
10+
# pylint: disable=invalid-name
1011
from aiida.common import AttributeDict
1112
from aiida.engine import calcfunction, workfunction, WorkChain, ToContext, append_, while_, ExitCode
1213
from aiida.engine import BaseRestartWorkChain, process_handler, ProcessHandlerReport

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[run]
22
source = aiida
3-
omit = aiida/test*.py,aiida/*/test*.py,aiida/*/*/test*.py,aiida/*/*/*/test*.py,aiida/*/*/*/*/test*.py,aiida/*/*/*/*/*/test*.py,aiida/*/migrations/*.py,aiida/*/migrations/versions/*.py
43

54
[html]
65
directory = .ci/coverage/html

.github/CODEOWNERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# All files related to dependency management are owned by the
2+
# currently active dependency manager (DM) to trigger an automatic review
3+
# request from the DM upon changes. Please see AEP-002 for details:
4+
# https://github.com/aiidateam/AEP/tree/master/002_dependency_management
5+
setup.* @aiidateam/dependency-manager
6+
environment.yml @aiidateam/dependency-manager
7+
requirements*.txt @aiidateam/dependency-manager
8+
pyproject.toml @aiidateam/dependency-manager
9+
utils/dependency_management.py @aiidateam/dependency-manager
10+
.github/workflows/dm.yml @aiidateam/dependency-manager

.github/config/profile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ db_port: 5432
1111
db_name: PLACEHOLDER_DATABASE_NAME
1212
db_username: postgres
1313
db_password: ''
14-
repository: PLACEHOLDER_REPOSITORY
14+
repository: PLACEHOLDER_REPOSITORY

.github/workflows/ci.yml

Lines changed: 83 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,16 @@
1-
name: aiida-core
1+
name: continuous-integration
22

33
on: [push, pull_request]
44

55
jobs:
66

7-
conda:
8-
9-
runs-on: ubuntu-latest
10-
timeout-minutes: 30
11-
12-
steps:
13-
- uses: actions/checkout@v1
14-
15-
- name: Set up Python 3.7
16-
uses: actions/setup-python@v1
17-
with:
18-
python-version: 3.7
19-
20-
- name: Conda install
21-
env:
22-
PYTHON_VERSION: 3.7
23-
run:
24-
.github/workflows/conda.sh
25-
267
docs:
278

289
runs-on: ubuntu-latest
2910
timeout-minutes: 30
3011

3112
steps:
32-
- uses: actions/checkout@v1
13+
- uses: actions/checkout@v2
3314

3415
- name: Set up Python 3.7
3516
uses: actions/setup-python@v1
@@ -60,7 +41,7 @@ jobs:
6041
timeout-minutes: 30
6142

6243
steps:
63-
- uses: actions/checkout@v1
44+
- uses: actions/checkout@v2
6445

6546
- name: Set up Python 3.7
6647
uses: actions/setup-python@v1
@@ -83,6 +64,41 @@ jobs:
8364
run:
8465
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
8566

67+
check-requirements:
68+
69+
runs-on: ubuntu-latest
70+
timeout-minutes: 5
71+
72+
steps:
73+
- uses: actions/checkout@v2
74+
75+
- name: Set up Python 3.8
76+
uses: actions/setup-python@v1
77+
with:
78+
python-version: 3.8
79+
80+
- name: Install dm-script dependencies
81+
run: pip install packaging==20.3 click~=7.0 pyyaml~=5.1 toml
82+
83+
- name: Check requirements files
84+
run: python ./utils/dependency_management.py check-requirements DEFAULT
85+
86+
- name: Create commit comment
87+
if: failure()
88+
uses: peter-evans/commit-comment@v1
89+
with:
90+
token: ${{ secrets.GITHUB_TOKEN }}
91+
path: setup.json
92+
body: |
93+
It appears that at least one of the environments defined in the requirements files
94+
('requirements/*.txt') is not meeting the dependencies specified in the 'setup.json' file.
95+
These files define the environment for continuous integration tests, so it is important that they are updated.
96+
97+
If this commit is part of a pull request, you can automatically update the requirements by
98+
commenting with '/update-requirements'.
99+
100+
Click [here](https://github.com/aiidateam/aiida-core/wiki/AiiDA-Dependency-Management) for more information.
101+
86102
tests:
87103

88104
runs-on: ubuntu-latest
@@ -91,18 +107,30 @@ jobs:
91107
strategy:
92108
fail-fast: false
93109
matrix:
94-
python-version: [3.5, 3.8]
95110
backend: ['django', 'sqlalchemy']
111+
python-version: [3.5, 3.8]
112+
113+
services:
114+
postgres:
115+
image: postgres:10
116+
env:
117+
POSTGRES_DB: test_${{ matrix.backend }}
118+
POSTGRES_PASSWORD: ''
119+
POSTGRES_HOST_AUTH_METHOD: trust
120+
options: >-
121+
--health-cmd pg_isready
122+
--health-interval 10s
123+
--health-timeout 5s
124+
--health-retries 5
125+
ports:
126+
- 5432:5432
127+
rabbitmq:
128+
image: rabbitmq:latest
129+
ports:
130+
- 5672:5672
96131

97132
steps:
98-
- uses: actions/checkout@v1
99-
- uses: CasperWA/[email protected]
100-
with:
101-
postgresql version: '10'
102-
postgresql db: test_${{ matrix.backend }}
103-
postgresql user: postgres
104-
postgresql password: ''
105-
postgresql auth: trust
133+
- uses: actions/checkout@v2
106134

107135
- name: Set up Python ${{ matrix.python-version }}
108136
uses: actions/setup-python@v1
@@ -111,20 +139,25 @@ jobs:
111139

112140
- name: Install system dependencies
113141
run: |
114-
wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add -
115-
echo 'deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list
116-
echo 'deb https://dl.bintray.com/rabbitmq/debian bionic main' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list
117142
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
118143
sudo apt update
119-
sudo apt install postgresql-10 rabbitmq-server graphviz
120-
sudo systemctl status rabbitmq-server.service
144+
sudo apt install postgresql-10 graphviz
121145
122-
- name: Install python dependencies
146+
- name: Upgrade pip
123147
run: |
124148
pip install --upgrade pip
125-
pip install numpy==1.17.4
126-
pip install -e .[atomic_tools,docs,notebook,rest,testing]
149+
pip --version
150+
151+
- name: upgrade setuptools [py35]
152+
if: matrix.python-version == 3.5
153+
run: pip install -I setuptools==38.2.0 # Minimally required version for Python 3.5.
154+
155+
- name: Install aiida-core
156+
run: |
157+
pip install -r requirements/requirements-py-${{ matrix.python-version }}.txt
158+
pip install --no-deps -e .
127159
reentry scan
160+
pip freeze
128161
129162
- name: Setup environment
130163
env:
@@ -138,13 +171,22 @@ jobs:
138171
run:
139172
.github/workflows/tests.sh
140173

174+
- name: Upload coverage report
175+
if: matrix.python-version == 3.5 && github.repository == 'aiidateam/aiida-core'
176+
uses: codecov/codecov-action@v1
177+
with:
178+
name: aiida-pytests-py3.5-${{ matrix.backend }}
179+
flags: ${{ matrix.backend }}
180+
file: ./coverage.xml
181+
fail_ci_if_error: true
182+
141183
verdi:
142184

143185
runs-on: ubuntu-latest
144186
timeout-minutes: 30
145187

146188
steps:
147-
- uses: actions/checkout@v1
189+
- uses: actions/checkout@v2
148190

149191
- name: Set up Python 3.7
150192
uses: actions/setup-python@v1
@@ -166,7 +208,7 @@ jobs:
166208
timeout-minutes: 30
167209

168210
steps:
169-
- uses: actions/checkout@v1
211+
- uses: actions/checkout@v2
170212

171213
- name: Install docker
172214
run: |

.github/workflows/conda.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/test-install.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: test-install
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'setup.*'
7+
- 'environment.yml'
8+
- '**/requirements*.txt'
9+
- 'pyproject.toml'
10+
- 'util/dependency_management.py'
11+
- '.github/workflows/test-install.yml'
12+
schedule:
13+
- cron: '30 02 * * *' # nightly build
14+
15+
jobs:
16+
17+
validate-dependency-specification:
18+
# Note: The specification is also validated by the pre-commit hook.
19+
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 5
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Set up Python 3.7
27+
uses: actions/setup-python@v1
28+
with:
29+
python-version: 3.7
30+
31+
- name: Install dm-script dependencies
32+
run: pip install packaging==20.3 click~=7.0 pyyaml~=5.1 toml
33+
34+
- name: Validate
35+
run: python ./utils/dependency_management.py validate-all
36+
37+
install-with-pip:
38+
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 5
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
45+
- name: Set up Python 3.7
46+
uses: actions/setup-python@v1
47+
with:
48+
python-version: 3.7
49+
50+
- name: Pip install
51+
run: |
52+
python -m pip install -e .
53+
python -m pip freeze
54+
55+
- name: Test importing aiida
56+
run:
57+
python -c "import aiida"
58+
59+
install-with-conda:
60+
61+
runs-on: ubuntu-latest
62+
name: install-with-conda
63+
64+
timeout-minutes: 5
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
69+
- name: Setup Conda
70+
uses: s-weigand/setup-conda@v1
71+
with:
72+
update-conda: true
73+
python-version: 3.7
74+
- run: conda --version
75+
- run: python --version
76+
- run: which python
77+
78+
- name: Create conda environment
79+
run: |
80+
conda env create -f environment.yml -n test-environment
81+
source activate test-environment
82+
python -m pip install --no-deps -e .
83+
84+
- name: Test importing aiida
85+
run: |
86+
source activate test-environment
87+
python -c "import aiida"
88+
89+
tests:
90+
91+
needs: [install-with-pip, install-with-conda]
92+
runs-on: ubuntu-latest
93+
timeout-minutes: 30
94+
95+
strategy:
96+
fail-fast: false
97+
matrix:
98+
python-version: [3.5, 3.6, 3.7, 3.8]
99+
backend: ['django', 'sqlalchemy']
100+
101+
services:
102+
postgres:
103+
image: postgres:10
104+
env:
105+
POSTGRES_DB: test_${{ matrix.backend }}
106+
POSTGRES_PASSWORD: ''
107+
POSTGRES_HOST_AUTH_METHOD: trust
108+
options: >-
109+
--health-cmd pg_isready
110+
--health-interval 10s
111+
--health-timeout 5s
112+
--health-retries 5
113+
ports:
114+
- 5432:5432
115+
rabbitmq:
116+
image: rabbitmq:latest
117+
ports:
118+
- 5672:5672
119+
120+
steps:
121+
- uses: actions/checkout@v2
122+
123+
- name: Set up Python ${{ matrix.python-version }}
124+
uses: actions/setup-python@v1
125+
with:
126+
python-version: ${{ matrix.python-version }}
127+
128+
- name: Install system dependencies
129+
run: |
130+
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
131+
sudo apt update
132+
sudo apt install postgresql-10 graphviz
133+
134+
- run: pip install --upgrade pip
135+
136+
- name: upgrade setuptools [py35]
137+
if: matrix.python-version == 3.5
138+
run: pip install -I setuptools==38.2.0
139+
140+
- name: Install aiida-core
141+
run: |
142+
pip install -e .[atomic_tools,docs,notebook,rest,testing]
143+
reentry scan
144+
145+
- run: pip freeze
146+
147+
- name: Setup AiiDA environment
148+
env:
149+
AIIDA_TEST_BACKEND: ${{ matrix.backend }}
150+
run:
151+
.github/workflows/setup.sh
152+
153+
- name: Run test suite
154+
env:
155+
AIIDA_TEST_BACKEND: ${{ matrix.backend }}
156+
run:
157+
.github/workflows/tests.sh

0 commit comments

Comments
 (0)