Skip to content

Commit

Permalink
Merge pull request #3934 from aiidateam/release/1.2.0
Browse files Browse the repository at this point in the history
Release `v1.2.0`
  • Loading branch information
sphuber authored Apr 15, 2020
2 parents 20fa6c2 + 8ad0f24 commit c746331
Show file tree
Hide file tree
Showing 187 changed files with 6,317 additions and 3,907 deletions.
1 change: 1 addition & 0 deletions .ci/workchains.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# For further information on the license, see the LICENSE.txt file #
# For further information please visit http://www.aiida.net #
###########################################################################
# pylint: disable=invalid-name
from aiida.common import AttributeDict
from aiida.engine import calcfunction, workfunction, WorkChain, ToContext, append_, while_, ExitCode
from aiida.engine import BaseRestartWorkChain, process_handler, ProcessHandlerReport
Expand Down
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[run]
source = aiida
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

[html]
directory = .ci/coverage/html
10 changes: 10 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# All files related to dependency management are owned by the
# currently active dependency manager (DM) to trigger an automatic review
# request from the DM upon changes. Please see AEP-002 for details:
# https://github.com/aiidateam/AEP/tree/master/002_dependency_management
setup.* @aiidateam/dependency-manager
environment.yml @aiidateam/dependency-manager
requirements*.txt @aiidateam/dependency-manager
pyproject.toml @aiidateam/dependency-manager
utils/dependency_management.py @aiidateam/dependency-manager
.github/workflows/dm.yml @aiidateam/dependency-manager
2 changes: 1 addition & 1 deletion .github/config/profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ db_port: 5432
db_name: PLACEHOLDER_DATABASE_NAME
db_username: postgres
db_password: ''
repository: PLACEHOLDER_REPOSITORY
repository: PLACEHOLDER_REPOSITORY
124 changes: 83 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,16 @@
name: aiida-core
name: continuous-integration

on: [push, pull_request]

jobs:

conda:

runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Conda install
env:
PYTHON_VERSION: 3.7
run:
.github/workflows/conda.sh

docs:

runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
Expand Down Expand Up @@ -60,7 +41,7 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

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

check-requirements:

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dm-script dependencies
run: pip install packaging==20.3 click~=7.0 pyyaml~=5.1 toml

- name: Check requirements files
run: python ./utils/dependency_management.py check-requirements DEFAULT

- name: Create commit comment
if: failure()
uses: peter-evans/commit-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: setup.json
body: |
It appears that at least one of the environments defined in the requirements files
('requirements/*.txt') is not meeting the dependencies specified in the 'setup.json' file.
These files define the environment for continuous integration tests, so it is important that they are updated.
If this commit is part of a pull request, you can automatically update the requirements by
commenting with '/update-requirements'.
Click [here](https://github.com/aiidateam/aiida-core/wiki/AiiDA-Dependency-Management) for more information.
tests:

runs-on: ubuntu-latest
Expand All @@ -91,18 +107,30 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.8]
backend: ['django', 'sqlalchemy']
python-version: [3.5, 3.8]

services:
postgres:
image: postgres:10
env:
POSTGRES_DB: test_${{ matrix.backend }}
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672

steps:
- uses: actions/checkout@v1
- uses: CasperWA/[email protected]
with:
postgresql version: '10'
postgresql db: test_${{ matrix.backend }}
postgresql user: postgres
postgresql password: ''
postgresql auth: trust
- uses: actions/checkout@v2

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

- name: Install system dependencies
run: |
wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add -
echo 'deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list
echo 'deb https://dl.bintray.com/rabbitmq/debian bionic main' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install postgresql-10 rabbitmq-server graphviz
sudo systemctl status rabbitmq-server.service
sudo apt install postgresql-10 graphviz
- name: Install python dependencies
- name: Upgrade pip
run: |
pip install --upgrade pip
pip install numpy==1.17.4
pip install -e .[atomic_tools,docs,notebook,rest,testing]
pip --version
- name: upgrade setuptools [py35]
if: matrix.python-version == 3.5
run: pip install -I setuptools==38.2.0 # Minimally required version for Python 3.5.

- name: Install aiida-core
run: |
pip install -r requirements/requirements-py-${{ matrix.python-version }}.txt
pip install --no-deps -e .
reentry scan
pip freeze
- name: Setup environment
env:
Expand All @@ -138,13 +171,22 @@ jobs:
run:
.github/workflows/tests.sh

- name: Upload coverage report
if: matrix.python-version == 3.5 && github.repository == 'aiidateam/aiida-core'
uses: codecov/codecov-action@v1
with:
name: aiida-pytests-py3.5-${{ matrix.backend }}
flags: ${{ matrix.backend }}
file: ./coverage.xml
fail_ci_if_error: true

verdi:

runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
Expand All @@ -166,7 +208,7 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Install docker
run: |
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/conda.sh

This file was deleted.

157 changes: 157 additions & 0 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: test-install

on:
pull_request:
paths:
- 'setup.*'
- 'environment.yml'
- '**/requirements*.txt'
- 'pyproject.toml'
- 'util/dependency_management.py'
- '.github/workflows/test-install.yml'
schedule:
- cron: '30 02 * * *' # nightly build

jobs:

validate-dependency-specification:
# Note: The specification is also validated by the pre-commit hook.

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install dm-script dependencies
run: pip install packaging==20.3 click~=7.0 pyyaml~=5.1 toml

- name: Validate
run: python ./utils/dependency_management.py validate-all

install-with-pip:

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Pip install
run: |
python -m pip install -e .
python -m pip freeze
- name: Test importing aiida
run:
python -c "import aiida"

install-with-conda:

runs-on: ubuntu-latest
name: install-with-conda

timeout-minutes: 5

steps:
- uses: actions/checkout@v2

- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: 3.7
- run: conda --version
- run: python --version
- run: which python

- name: Create conda environment
run: |
conda env create -f environment.yml -n test-environment
source activate test-environment
python -m pip install --no-deps -e .
- name: Test importing aiida
run: |
source activate test-environment
python -c "import aiida"
tests:

needs: [install-with-pip, install-with-conda]
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
backend: ['django', 'sqlalchemy']

services:
postgres:
image: postgres:10
env:
POSTGRES_DB: test_${{ matrix.backend }}
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install postgresql-10 graphviz
- run: pip install --upgrade pip

- name: upgrade setuptools [py35]
if: matrix.python-version == 3.5
run: pip install -I setuptools==38.2.0

- name: Install aiida-core
run: |
pip install -e .[atomic_tools,docs,notebook,rest,testing]
reentry scan
- run: pip freeze

- name: Setup AiiDA environment
env:
AIIDA_TEST_BACKEND: ${{ matrix.backend }}
run:
.github/workflows/setup.sh

- name: Run test suite
env:
AIIDA_TEST_BACKEND: ${{ matrix.backend }}
run:
.github/workflows/tests.sh
Loading

0 comments on commit c746331

Please sign in to comment.