diff --git a/.travis-data/test_setup.py b/.travis-data/test_setup.py index 640ea6106e..e17d802ad9 100644 --- a/.travis-data/test_setup.py +++ b/.travis-data/test_setup.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """ Integration tests for setup and quicksetup diff --git a/AUTHORS.txt b/AUTHORS.txt index 4640684d06..cdf89901b1 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -3,28 +3,28 @@ as well as the known contributors to the code. The current members of the AiiDA team are, in alphabetical order: ################################################################# -* Andrea Cepellotti -* Fernando Gargiulo -* Leonid Kahle -* Boris Kozinsky * Rico Häuselmann * Sebastiaan P. Huber +* Leonid Kahle +* Boris Kozinsky * Nicola Marzari * Andrius Merkys * Nicolas Mounet +* Elsa Passaro * Giovanni Pizzi +* Leopold Talirz * Martin Uhrin * Snehal Waychal * Spyros Zoupanos - Former members of the AiiDA team ################################ +* Andrea Cepellotti (2012-2016) +* Fernando Gargiulo (2016-2017) * Riccardo Sabatini (2013-2015) - Contributors ############ We would like to thank the following people for their contibution @@ -34,6 +34,7 @@ We would like to thank the following people for their contibution AiiDA web interface * Jocelyn Boullier (EPFL, Switzerland): for the first version of the SQLAlchemy implementation +* Jens Bröder: (FZ Jülich, Germany) contributions to the workflow engine * Marco Dorigo (ICAMS, Germany): for the SGE scheduler plugin * Marco Gibertini: for the Quantum ESPRESSO plugin for the NEB code and the extension of the PW plugin to the ENVIRON code @@ -45,11 +46,11 @@ We would like to thank the following people for their contibution the new plugin system (developed in 2017) * Phillippe Schwaller (EPFL, Switzerland): for the ICSD importer -And the following people for corrections, improving the documentation, -spotting typos or useful suggestions: +And the following people for general improvements to the code, fixing bugs, +corrections and improvements to the documentation and useful suggestions: -Jens Broeder, Ivano E. Castelli, Ian Lee, Gianluca Prandini, -Jianxing Huang, Antimo Marrazzo, Nicola Varini, Mario Zic +Ivano E. Castelli, Ian Lee, Gianluca Prandini, Jianxing Huang, Antimo Marrazzo, +Nicola Varini, Mario Zic, Vladimir Dikan, Michael Atambo --- diff --git a/CHANGELOG.md b/CHANGELOG.md index bb70108805..2bcca91a33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,38 @@ +## v0.10.0rc1: + +### Major changes +- The `DbPath` table has been removed and replaced with a dynamic transitive closure, because, among others, nested workchains could lead to the `DbPath` table exploding in size +- Code plugins have been removed from `aiida_core` and have been migrated to their own respective plugin repositories and can be found here: + * [Quantum ESPRESSO](https://github.com/aiidateam/aiida-quantumespresso) + * [ASE](https://github.com/aiidateam/aiida-ase) + * [COD tools](https://github.com/aiidateam/aiida-codtools) + * [NWChem](https://github.com/aiidateam/aiida-nwchem) + + Each can be installed from `pip` using e.g. `pip install aiida-quantumespresso`. + Existing installations will require a migration (see [update instructions in the documentation](https://aiida-core.readthedocs.io/en/v0.10.0/installation/updating.html#plugin-migration)). + For a complete overview of available plugins you can visit [the registry](https://aiidateam.github.io/aiida-registry/). + +### Improvements +- New verdi command: `verdi work kill` to kill running workchains [[#821]](https://github.com/aiidateam/aiida_core/pull/821) +- New verdi command: `verdi data remote [ls,cat,show]` to inspect the contents of `RemoteData` objects [[#743]](https://github.com/aiidateam/aiida_core/pull/743) +- New verdi command: `verdi export migrate` allows the migration of existing export archives to new formats [[#781]](https://github.com/aiidateam/aiida_core/pull/781) +- Implemented faster query to obtain database statistics [[#738]](https://github.com/aiidateam/aiida_core/pull/738) +- Added testing for automatic SqlAlchemy database migrations through alembic [[#834]](https://github.com/aiidateam/aiida_core/pull/834) + +### Critical bug fixes +- Export will now write the link types to the archive and import will properly recreate the link [[#760]](https://github.com/aiidateam/aiida_core/pull/760) +- Fix bug in workchain persistence that would lead to crashed workchains under certain conditions being resubmitted [[#728]](https://github.com/aiidateam/aiida_core/pull/728) + +### Minor bug fixes +- Fixed bug in `TCODexporter` [[#761]](https://github.com/aiidateam/aiida_core/pull/761) +- `verdi profile delete` now respects the configured `dbport` setting [[#713]](https://github.com/aiidateam/aiida_core/pull/713) +- Restore correct help text for `verdi --help` [[#704]](https://github.com/aiidateam/aiida_core/pull/704) +- Fixed query in the ICSD importer element that caused certain structures to be erroneously skipped [[#690]](https://github.com/aiidateam/aiida_core/pull/690) + +### Miscellaneous +- Improved and restructured the documentation + + ## v0.9.1: ### Critical bug fixes diff --git a/aiida/__init__.py b/aiida/__init__.py index 47912c9719..dffb4b9d5d 100644 --- a/aiida/__init__.py +++ b/aiida/__init__.py @@ -14,7 +14,7 @@ __copyright__ = u"Copyright (c), This file is part of the AiiDA platform. For further information please visit http://www.aiida.net/. All rights reserved." __license__ = "MIT license, see LICENSE.txt file." -__version__ = "0.9.1" +__version__ = "0.10.0rc1" __authors__ = "The AiiDA team." __paper__ = """G. Pizzi, A. Cepellotti, R. Sabatini, N. Marzari, and B. Kozinsky, "AiiDA: automated interactive infrastructure and database for computational science", Comp. Mat. Sci 111, 218-230 (2016); http://dx.doi.org/10.1016/j.commatsci.2015.09.013 - http://www.aiida.net.""" __paper_short__ = """G. Pizzi et al., Comp. Mat. Sci 111, 218 (2016).""" diff --git a/aiida/backends/djsite/db/migrations/0005_add_cmtime_indices.py b/aiida/backends/djsite/db/migrations/0005_add_cmtime_indices.py index c6cc94cb8d..7d2a0572f6 100644 --- a/aiida/backends/djsite/db/migrations/0005_add_cmtime_indices.py +++ b/aiida/backends/djsite/db/migrations/0005_add_cmtime_indices.py @@ -1,4 +1,12 @@ # -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from __future__ import unicode_literals from django.db import models, migrations diff --git a/aiida/backends/djsite/db/migrations/0006_delete_dbpath.py b/aiida/backends/djsite/db/migrations/0006_delete_dbpath.py index 3b1a937346..2b06105a31 100644 --- a/aiida/backends/djsite/db/migrations/0006_delete_dbpath.py +++ b/aiida/backends/djsite/db/migrations/0006_delete_dbpath.py @@ -1,4 +1,12 @@ # -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from __future__ import unicode_literals from django.db import models, migrations diff --git a/aiida/backends/djsite/db/migrations/0007_update_linktypes.py b/aiida/backends/djsite/db/migrations/0007_update_linktypes.py index 6ec28dffdf..0c1622345e 100644 --- a/aiida/backends/djsite/db/migrations/0007_update_linktypes.py +++ b/aiida/backends/djsite/db/migrations/0007_update_linktypes.py @@ -1,4 +1,12 @@ # -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from __future__ import unicode_literals from django.db import models, migrations diff --git a/aiida/backends/sqlalchemy/migrations/env.py b/aiida/backends/sqlalchemy/migrations/env.py index 7475382071..5fc2498ae7 100644 --- a/aiida/backends/sqlalchemy/migrations/env.py +++ b/aiida/backends/sqlalchemy/migrations/env.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from __future__ import with_statement from alembic import context diff --git a/aiida/backends/sqlalchemy/migrations/versions/70c7d732f1b2_delete_dbpath.py b/aiida/backends/sqlalchemy/migrations/versions/70c7d732f1b2_delete_dbpath.py index 2f545e1df6..17d89c40c8 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/70c7d732f1b2_delete_dbpath.py +++ b/aiida/backends/sqlalchemy/migrations/versions/70c7d732f1b2_delete_dbpath.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Deleting dbpath table and triggers Revision ID: 70c7d732f1b2 diff --git a/aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py b/aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py index d085a86c21..a37017aeea 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py +++ b/aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Updating link types - This is a copy of the Django migration script Revision ID: a6048f0ffca8 diff --git a/aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py b/aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py index e612700683..c78b530159 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py +++ b/aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Initial schema Revision ID: e15ef2630a1b diff --git a/aiida/backends/sqlalchemy/tests/migration_test/versions/470e57bc0936_create_account_table.py b/aiida/backends/sqlalchemy/tests/migration_test/versions/470e57bc0936_create_account_table.py index 80e91dc9de..f4391c96d3 100644 --- a/aiida/backends/sqlalchemy/tests/migration_test/versions/470e57bc0936_create_account_table.py +++ b/aiida/backends/sqlalchemy/tests/migration_test/versions/470e57bc0936_create_account_table.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """create account table Revision ID: 470e57bc0936 diff --git a/aiida/backends/sqlalchemy/tests/migration_test/versions/b947a8821295_add_a_column.py b/aiida/backends/sqlalchemy/tests/migration_test/versions/b947a8821295_add_a_column.py index 8a586962d6..217c4c637a 100644 --- a/aiida/backends/sqlalchemy/tests/migration_test/versions/b947a8821295_add_a_column.py +++ b/aiida/backends/sqlalchemy/tests/migration_test/versions/b947a8821295_add_a_column.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Add a column Revision ID: b947a8821295 diff --git a/aiida/cmdline/tests/__init__.py b/aiida/cmdline/tests/__init__.py index e69de29bb2..a7e3fad50c 100644 --- a/aiida/cmdline/tests/__init__.py +++ b/aiida/cmdline/tests/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### diff --git a/aiida/cmdline/tests/common.py b/aiida/cmdline/tests/common.py index 647094f9af..45a27a3546 100644 --- a/aiida/cmdline/tests/common.py +++ b/aiida/cmdline/tests/common.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Common code to be used in cli testing""" import sys from contextlib import contextmanager diff --git a/aiida/cmdline/tests/test_verdi_help.py b/aiida/cmdline/tests/test_verdi_help.py index b46ec95a99..856f02abec 100644 --- a/aiida/cmdline/tests/test_verdi_help.py +++ b/aiida/cmdline/tests/test_verdi_help.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Bug regression tests for ``verdi help``""" import unittest diff --git a/aiida/common/graph.py b/aiida/common/graph.py index 99976d2fb0..f1103aea3c 100644 --- a/aiida/common/graph.py +++ b/aiida/common/graph.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### import os, tempfile def draw_graph(origin_node, ancestor_depth=None, descendant_depth=None, format='dot', diff --git a/aiida/control/__init__.py b/aiida/control/__init__.py index fe5491c96d..5d7d7e2f45 100644 --- a/aiida/control/__init__.py +++ b/aiida/control/__init__.py @@ -1 +1,10 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """User facing APIs to control AiiDA from the verdi cli, scripts or plugins""" diff --git a/aiida/control/postgres.py b/aiida/control/postgres.py index 072061ab3d..0b749a421f 100644 --- a/aiida/control/postgres.py +++ b/aiida/control/postgres.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Provides an API for postgres database maintenance tasks""" try: import subprocess32 as subprocess diff --git a/aiida/control/tests/__init__.py b/aiida/control/tests/__init__.py index e69de29bb2..a7e3fad50c 100644 --- a/aiida/control/tests/__init__.py +++ b/aiida/control/tests/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### diff --git a/aiida/control/tests/test_postgres.py b/aiida/control/tests/test_postgres.py index 0fee2f5899..01a0561053 100644 --- a/aiida/control/tests/test_postgres.py +++ b/aiida/control/tests/test_postgres.py @@ -1,4 +1,12 @@ # -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Unit tests for postgres database maintenance functionality""" import unittest diff --git a/aiida/control/user.py b/aiida/control/user.py index 72dfb04179..18faee6fe2 100644 --- a/aiida/control/user.py +++ b/aiida/control/user.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### """Create, configure, manage users""" diff --git a/aiida/orm/implementation/general/utils.py b/aiida/orm/implementation/general/utils.py index 5b9d5b9914..53eeebbfc4 100644 --- a/aiida/orm/implementation/general/utils.py +++ b/aiida/orm/implementation/general/utils.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### def get_db_columns(db_class): """ This function returns a dictionary where the keys are the columns of diff --git a/aiida/restapi/translator/data/bands.py b/aiida/restapi/translator/data/bands.py index 58364cb107..dddb01455b 100644 --- a/aiida/restapi/translator/data/bands.py +++ b/aiida/restapi/translator/data/bands.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from aiida.restapi.translator.data import DataTranslator class BandsDataTranslator(DataTranslator): diff --git a/aiida/restapi/translator/data/kpoints.py b/aiida/restapi/translator/data/kpoints.py index d5e9742253..cc9c405b7e 100644 --- a/aiida/restapi/translator/data/kpoints.py +++ b/aiida/restapi/translator/data/kpoints.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from aiida.restapi.translator.data import DataTranslator class KpointsDataTranslator(DataTranslator): diff --git a/aiida/restapi/translator/data/structure.py b/aiida/restapi/translator/data/structure.py index a6c9738ff8..a9f7054ab7 100644 --- a/aiida/restapi/translator/data/structure.py +++ b/aiida/restapi/translator/data/structure.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from aiida.restapi.translator.data import DataTranslator from aiida.restapi.common.exceptions import RestValidationError diff --git a/aiida/utils/find_folder.py b/aiida/utils/find_folder.py index 7dd4c21596..b2a3328228 100644 --- a/aiida/utils/find_folder.py +++ b/aiida/utils/find_folder.py @@ -1,5 +1,13 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### import os import itertools diff --git a/aiida/work/interstep.py b/aiida/work/interstep.py index d4b06b298c..d7a2460345 100644 --- a/aiida/work/interstep.py +++ b/aiida/work/interstep.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### from abc import ABCMeta, abstractmethod from collections import namedtuple, MutableSequence from plum.engine.execution_engine import Future diff --git a/docs/__init__.py b/docs/__init__.py index e69de29bb2..a7e3fad50c 100644 --- a/docs/__init__.py +++ b/docs/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### diff --git a/docs/requirements_for_rtd.txt b/docs/requirements_for_rtd.txt index 77639f90db..42b0dd6f0a 100644 --- a/docs/requirements_for_rtd.txt +++ b/docs/requirements_for_rtd.txt @@ -28,6 +28,7 @@ python-dateutil==2.6.0 python-mimeparse==0.1.4 pytz==2014.10 reentry==1.0.2 +scipy<1.0.0 setuptools==36.6.0 singledispatch==3.4.0.3 six==1.10.0 diff --git a/docs/source/installation/updating.rst b/docs/source/installation/updating.rst index 76e83ee19c..e8e794812d 100644 --- a/docs/source/installation/updating.rst +++ b/docs/source/installation/updating.rst @@ -1,24 +1,50 @@ -====================================== -Updating AiiDA from a previous version -====================================== +============== +Updating AiiDA +============== +Before you update your AiiDA installation, first make sure that you do the following: -AiiDA can be updated from a previously installed version. Before beginning -the procedure, make sure of the following: +* Stop your daemon by executing ``verdi daemon stop`` +* Create a backup of your database(s) by following the guidelines in the :ref:`backup section` +* Create a backup of the ``~/.aiida`` folder (where configuration files are stored) - * your daemon is stopped (use ``verdi daemon stop``), - * you know your current AiiDA version. In case, you can get it from the ``verdi shell``:: +If you have installed AiiDA manually from a local clone of the ``aiida_core`` repository, skip to the instructions for :ref:`developers `. +Otherwise, if you have installed AiiDA through ``pip``, you can also update your installation through ``pip``. +If you installed ``aiida_core`` in a virtual environment make sure to load it first. +Now you are ready to update your AiiDA installation through ``pip``:: - import aiida - aiida.__version__ + pip install --upgrade aiida_core - (only the two first digits matter), - * you have a backup of your database(s) (follow the guidelines in the - :ref:`backup section`), - * you have a backup of the full ``~/.aiida`` folder (where configuration - files are stored), - * (optional) ``virtualenv`` is installed, i.e. you once ran the command:: +After upgrading your AiiDA installation you may have to perform :ref:`version specific migrations `. +When all necessary migrations are completed, finalize the update by executing:: - pip install --user -U setuptools pip wheel virtualenv + verdi setup + +This updates your daemon profile and related files. +It should not be done when another version of aiida is wished to be used productively on the same machine/user. + +.. _update_developers: + +Updating AiiDA for developers ++++++++++++++++++++++++++++++ +After you have performed all the steps in the checklist described in the previous section, go to your local clone of the ``aiida_core`` repository and checkout the desired branch or tag. +If you installed ``aiida_core`` in a virtual environment make sure that you have loaded it. + +Each version increase may come with its own necessary migrations and you should only ever update the version by one at a time. +Therefore, first make sure you know the version number of the current installed version by using ``verdi shell`` and typing:: + + import aiida + aiida.__version__ + +Now you can install the updated version of ``aiida_core`` by simply executing:: + + pip install -e . + +After upgrading your AiiDA installation you may have to perform :ref:`version specific migrations ` based on the version of your previous installation. +When all necessary migrations are completed, finalize the update by executing:: + + verdi setup + +This updates your daemon profile and related files. .. note:: A few general remarks: @@ -26,44 +52,54 @@ the procedure, make sure of the following: * If you want to update the code in the same folder, but modified some files locally, you can stash them (``git stash``) before cloning or pulling the new code. Then put them back with ``git stash pop`` (note that conflicts might appear). - * If you encounter any problems and/or inconsistencies, delete any .pyc + * If you encounter any problems and/or inconsistencies, delete any ``.pyc`` files that may have remained from the previous version. E.g. If you are in your AiiDA folder you can type ``find . -name "*.pyc" -type f -delete``. - * From 0.8.0 onwards there is no ``requirements.txt`` file anymore. It has been replaced by ``setup_requirements.py`` and ``pip`` will install all the requirements automatically. If for some reason you would still like to get such a file, you can create it using the script ``aiida_core/utils/create_requirements.py`` .. note:: - Since AiiDA 0.9.0, we use Alembic for the database migrations of the + Since AiiDA ``0.9.0``, we use Alembic for the database migrations of the SQLAlchemy backend. In case you were using SQLAlchemy before the introduction of Alembic, you may experience problems during your first migration. If it is the case, please have a look at the following section :ref:`first_alembic_migration` -Updating between development versions (for Developers) -++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. _update_migrations: -After you checkout a development branch or pull a new state from the repository +Version migration instructions +++++++++++++++++++++++++++++++ -* run ``pip install -e`` again (or in a different virtualenv) - This applies changes to the distribution system (setup.py and related) +Updating from 0.9.* to 0.10.0 +----------------------------- +Multiple things have changed in AiiDA ``v0.10.0`` that require some manual attention when upgrading the ``aiida_core`` code base. +There have been changes to the: -To use the new version in production: +1. Database schema +2. Export archive format +3. Plugins for Quantum ESPRESSO, ASE, COD tools and NWChem -* run ``verdi setup`` - This updates your daemon profile and related files. It should not be done when another version of aiida is wished to be used productively on the same machine/user. +For each of these three points, you will find instructions on how to perform the necessary migration below. -Updating from 0.9.* Django to 0.10.0 Django -+++++++++++++++++++++++++++++++++++++++++++ +Database migration +"""""""""""""""""" -* Backup your database +The exact migration procedure will differ slightly depending on which backend the profile uses, but for both Django and SqlAlchemy the procedure starts as follows. +* Backup your database * Upgrade AiiDA within the virtual environment -* Run the migration:: +After having performed these steps, the remainder of the migration can be triggered by executing any ``verdi`` command. +For example you can execute ``verdi calculation list`` and you should be prompted with an exception for Django or a message for SqlAlchemy. +Depending on your backend, follow the instructions below. + +Django +~~~~~~ + +When the profile that you want to migrate uses Django for the backend you will get an exception and instructions to run a command that looks like the following:: - python backends/djsite/manage.py --aiida-profile=PROFILENAME migrate + python aiida_core/aiida/backends/djsite/manage.py --aiida-profile=PROFILENAME migrate - An warning will appear since we are deleting a table:: +After you execute the migration command, a warning will appear since we are deleting a table:: - The following content types are stale and need to be deleted: + The following content types are stale and need to be deleted: db | dbpath @@ -73,7 +109,7 @@ Updating from 0.9.* Django to 0.10.0 Django Type 'yes' to continue, or 'no' to cancel: - Have faith in your AiiDA team and type ``yes``! +Have faith in your AiiDA team and type ``yes``! .. note:: For everyone who `tuned` his AiiDA-database by dropping the path-table and the corresponding triggers, @@ -94,98 +130,81 @@ Updating from 0.9.* Django to 0.10.0 Django parent_id integer NOT NULL ); +SqlAlchemy +~~~~~~~~~~ -Updating from 0.9.* to 0.10.0 -++++++++++++++++++++++++++++++++++++++++++ - -Export archive files ------------------------------------------- -The format of the export archives, created with ``verdi export``, has changed and in order -to import them, they have to be migrated. To do this you can use the ``verdi export migrate`` command. -The archive format version up to ``0.10.0`` was ``0.2`` and starting from ``0.10.0`` it is now ``0.3``. - -Quantum ESPRESSO plugins ------------------------------------------- -In version ``0.10.0`` the Quantum ESPRESSO plugin was removed from the ``aiida_core`` repository and moved to a -`separate plugin repository `_. -With the new plugin system introduced in version ``0.9.0``, installing the Quantum ESPRESSO plugin through the repository is very easy. -However, if your current AiiDA installation still has the plugin files in the ``aiida_core`` tree, they have to be removed manually and the old entry points have to be removed from the cache. -The instructions to accomplish this will be detailed below. +When the profile that you want to migrate uses SqlAlchemy for the backend you will get a message that looks like the following:: -* First, make sure that you are in the correct virtual environment, for example (replace the path with the path to your actual virtual environment:: + It is time to perform your first SQLAlchemy migration. + Would you like to migrate to the latest version? [Y/n] - source ~/aiidapy/bin/activate +Simply enter ``Y`` and hit enter and the database migration should be automatically applied. -* Go to the directory of the ``aiida_core`` source code tree, for example:: - cd ~/code/aiida/core +Export archive file migration +----------------------------- -* Check out the new version, either through the develop branch or a specific tag:: +The format of the export archives, created with ``verdi export``, has changed in ``aiida_core v0.10.0`` and in order +to be able to import them, they have to be migrated. To do this you can use the ``verdi export migrate`` command. +The archive format version up to ``0.10.0`` was ``0.2`` and starting from ``0.10.0`` it is now ``0.3``. - git checkout -b develop - git pull origin develop +Plugin migration +---------------- - or:: +In ``v0.10.0`` the plugins for Quantum ESPRESSO, ASE, COD tools and NWChem that used to be included in ``aiida_core`` have +been moved to separate plugin repositories which can be found here: - git checkout -b v0.10.0 v0.10.0 +* `Quantum ESPRESSO`_ (aiida-quantumespresso) +* `ASE`_ (aiida-ase) +* `COD tools`_ (aiida-codtools) +* `NWChem`_ (aiida-nwchem) -* Remove the obsolete Quantum ESPRESSO plugin directory:: +.. _Quantum ESPRESSO: https://github.com/aiidateam/aiida-quantumespresso +.. _ASE: https://github.com/aiidateam/aiida-ase +.. _COD tools: https://github.com/aiidateam/aiida-codtools +.. _NWChem: https://github.com/aiidateam/aiida-nwchem - rm -rf aiida/orm/calculation/job/quantumespresso +With the new plugin system introduced in ``aiida_core v0.9.0``, all you have to do to install a plugin for AiiDA is to install it with ``pip``. +For example, to install all four original plugins you can execute:: -* Install the new version of AiiDA by typing:: + pip install aiida-quantumespresso aiida-ase aiida-codtools aiida-nwchem - pip install -e .[] +Note, however, that if you are upgrading an existing manual installation of ``aiida_core``, you first need to make sure that your code base is cleaned. +After you have upgraded your local repository to ``v0.10.0`` by checking out the relevant branch or tag, before you run ``pip install``, make sure +that all old ``*pyc`` files are removed, by running the following command from your local checked out repository:: - where is a comma separated list of the optional features you wish to install (see the :ref:`optional dependencies`). + find . -name "*pyc" -type f -delete -This should have successfully removed the old plugin entry points from your virtual environment installation. -To verify this, execute the following command and make sure that the ``quantumespresso.*`` plugins are **not** listed:: +Now you can install the new version of ``aiida_core`` with any of the optional extra dependencies that you might need:: - verdi calculation plugins + pip install -e .[] -If this is not the case, run the following command and check the ``verdi`` command again:: +and make sure to refresh the plugin cache by executing:: reentry scan - verdi calculation plugins -If the plugin is no longer listed, we can safely reinstall them from the new plugin repository and the plugin loading system. -First, clone the plugin repository from github in a separate directory:: +Now you can reinstall any of the Quantum ESPRESSO, ASE, COD tools or NWChem plugins, either through ``pip`` for example:: - mkdir -p ~/code/aiida/plugins - cd ~/code/aiida/plugins - git clone https://github.com/aiidateam/aiida-quantumespresso + pip install aiida-quantumespresso -Now all we have to do to install the plugin and have it registered with AiiDA is execute the following ``pip`` command:: +or you can install them for development just like ``aiida_core`` by checking out the repository and using ``pip install -e``, like so:: + git clone https://github.com/aiidateam/aiida-quantumespresso pip install -e aiida-quantumespresso -To verify that the plugin was installed correctly, list the plugin entry points through ``verdi``:: +You can verify that the plugins were properly installed by running the following ``verdi`` command:: verdi calculation plugins -If the Quantum ESPRESSO plugin entry points are not listed, you can try the following:: - - reentry scan - verdi calculation plugins - -If the entry points are still not listed, please contact the developers for support. -Finally, make sure to restart the daemon:: - - verdi daemon restart - Now everything should be working properly and you can use the plugin as you were used to. -You can use the ``CalculationFactory`` exactly in the same way to load calculation classes. +You can use the class factories, such as ``CalculationFactory``, exactly in the same way to load the plugin classes. For example you can still call ``CalculationFactory('quantumespresso.pw')`` to load the ``PwCalculation`` class. -The only thing that will have changed is that you can no longer directly import from the old plugin location. -That means that ``from aiida.orm.calculation.job.quantumespresso.pw import PwCalculation`` will no longer work as those files no longer exist. -Instead you can use the factories or the new import location ``from aiida_quantumespresso.calculation.pw import PwCalculation``. +The only thing that will have changed is that you can no longer use any of the old direct import paths, as those files no longer exist. Updating from older versions -++++++++++++++++++++++++++++++++++++++++++ -To find the update instructions for older versions of AiiDA follow the following links -to the documentation of the corresponding version: +++++++++++++++++++++++++++++ +To find the update instructions for older versions of AiiDA follow the following links to the documentation of the corresponding version: * `0.8.* Django`_ * `0.7.* Django`_ diff --git a/docs/wsgi/__init__.py b/docs/wsgi/__init__.py index e69de29bb2..a7e3fad50c 100644 --- a/docs/wsgi/__init__.py +++ b/docs/wsgi/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### diff --git a/docs/wsgi/app1/__init__.py b/docs/wsgi/app1/__init__.py index e69de29bb2..a7e3fad50c 100644 --- a/docs/wsgi/app1/__init__.py +++ b/docs/wsgi/app1/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### diff --git a/docs/wsgi/app2/__init__.py b/docs/wsgi/app2/__init__.py index e69de29bb2..a7e3fad50c 100644 --- a/docs/wsgi/app2/__init__.py +++ b/docs/wsgi/app2/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +########################################################################### +# Copyright (c), The AiiDA team. All rights reserved. # +# This file is part of the AiiDA code. # +# # +# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.aiida.net # +########################################################################### diff --git a/setup_requirements.py b/setup_requirements.py index 29d7ed3f97..3eff61b514 100644 --- a/setup_requirements.py +++ b/setup_requirements.py @@ -64,6 +64,7 @@ # Requirements for verdi shell (version of ipython non enforced, because # there are people who still prefer version 4 rather than the latest) 'ipython<6.0', + 'scipy<1.0.0' # At this moment the install of 1.0.0 release is broken ] extras_require = { @@ -73,7 +74,7 @@ # E.g. for Ubuntu 14.04: sudo apt-get install libffi-dev libkrb5-dev 'ssh_kerberos': [ 'pyasn1==0.3.7', - 'python-gssapi>=0.6.4', + 'python-gssapi==0.6.4', ], # Requirements for RESTful API 'REST': [ @@ -117,19 +118,19 @@ ], # Requirements for jupyter notebook 'notebook': [ - 'jupyter', + 'jupyter==1.0.0', ], # Requirements for testing 'testing': [ 'mock==2.0.0', 'pgtest==1.1.0', - 'sqlalchemy-diff>=0.1.3' + 'sqlalchemy-diff==0.1.3' ], 'dev_precommit': [ - 'pre-commit', - 'yapf', - 'prospector', - 'pylint' + 'pre-commit==1.3.0', + 'yapf==0.19.0', + 'prospector==0.12.7', + 'pylint==1.7.4' ] }