From b10247f0ddd7d32289095d4dd998bae6b0521a63 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Thu, 17 Feb 2022 23:55:18 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20REFACTOR:=20`orm/imple?= =?UTF-8?q?mentation/sqlalchemy`=20->=20`backends/sqlalchemy/orm`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, this was possible, due to django loading the database connection on install. But now, the full `psql_dos` storage backend implementation can be consolidated in a single module. --- aiida/backends/sqlalchemy/__init__.py | 13 +++++++++++ .../sqlalchemy/backend.py | 6 ++--- .../migrations/utils/migrate_repository.py | 2 +- aiida/backends/sqlalchemy/migrator.py | 2 +- .../sqlalchemy/orm}/__init__.py | 23 +------------------ .../sqlalchemy/orm}/authinfos.py | 6 ++--- .../sqlalchemy/orm}/comments.py | 2 +- .../sqlalchemy/orm}/computers.py | 0 .../sqlalchemy/orm}/convert.py | 2 -- .../sqlalchemy/orm}/entities.py | 2 +- .../sqlalchemy/orm}/extras_mixin.py | 0 .../sqlalchemy/orm}/groups.py | 6 ++--- .../sqlalchemy/orm}/logs.py | 2 +- .../sqlalchemy/orm}/nodes.py | 2 +- .../sqlalchemy/orm}/querybuilder/__init__.py | 2 +- .../sqlalchemy/orm}/querybuilder/joiner.py | 0 .../sqlalchemy/orm}/querybuilder/main.py | 0 .../sqlalchemy/orm}/users.py | 2 -- .../sqlalchemy/orm}/utils.py | 2 +- aiida/backends/sqlalchemy/utils.py | 2 +- aiida/cmdline/commands/cmd_devel.py | 2 +- aiida/manage/configuration/profile.py | 2 +- aiida/orm/implementation/__init__.py | 2 +- .../archive/implementations/sqlite/backend.py | 6 ++--- utils/make_all.py | 5 ++-- 25 files changed, 39 insertions(+), 54 deletions(-) rename aiida/{orm/implementation => backends}/sqlalchemy/backend.py (98%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/__init__.py (63%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/authinfos.py (96%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/comments.py (98%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/computers.py (100%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/convert.py (99%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/entities.py (97%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/extras_mixin.py (100%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/groups.py (98%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/logs.py (98%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/nodes.py (99%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/querybuilder/__init__.py (93%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/querybuilder/joiner.py (100%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/querybuilder/main.py (100%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/users.py (98%) rename aiida/{orm/implementation/sqlalchemy => backends/sqlalchemy/orm}/utils.py (98%) diff --git a/aiida/backends/sqlalchemy/__init__.py b/aiida/backends/sqlalchemy/__init__.py index e03db5e246..eac0048fe9 100644 --- a/aiida/backends/sqlalchemy/__init__.py +++ b/aiida/backends/sqlalchemy/__init__.py @@ -8,3 +8,16 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Module with implementation of the storage backend using SqlAlchemy and the disk-objectstore.""" + +# AUTO-GENERATED + +# yapf: disable +# pylint: disable=wildcard-import + +from .backend import * + +__all__ = ( + 'PsqlDosBackend', +) + +# yapf: enable diff --git a/aiida/orm/implementation/sqlalchemy/backend.py b/aiida/backends/sqlalchemy/backend.py similarity index 98% rename from aiida/orm/implementation/sqlalchemy/backend.py rename to aiida/backends/sqlalchemy/backend.py index d06df46cd4..6415ebb11c 100644 --- a/aiida/orm/implementation/sqlalchemy/backend.py +++ b/aiida/backends/sqlalchemy/backend.py @@ -23,10 +23,10 @@ from aiida.manage.configuration.profile import Profile from aiida.orm import User from aiida.orm.entities import EntityTypes +from aiida.orm.implementation.backends import Backend +from aiida.orm.implementation.entities import BackendEntity -from . import authinfos, comments, computers, convert, groups, logs, nodes, querybuilder, users -from ..backends import Backend -from ..entities import BackendEntity +from .orm import authinfos, comments, computers, convert, groups, logs, nodes, querybuilder, users if TYPE_CHECKING: from aiida.repository.backend import DiskObjectStoreRepositoryBackend diff --git a/aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py b/aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py index 35511fa4ef..ad3acb0a5f 100644 --- a/aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py +++ b/aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py @@ -18,11 +18,11 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, func, select, table, text +from aiida.backends.sqlalchemy.backend import CONTAINER_DEFAULTS from aiida.backends.sqlalchemy.migrations.utils import utils from aiida.cmdline.utils import echo from aiida.common import exceptions from aiida.common.progress_reporter import get_progress_reporter, set_progress_bar_tqdm, set_progress_reporter -from aiida.orm.implementation.sqlalchemy.backend import CONTAINER_DEFAULTS def migrate_repository(connection, profile): diff --git a/aiida/backends/sqlalchemy/migrator.py b/aiida/backends/sqlalchemy/migrator.py index 4812fdf34c..99f08a2ecf 100644 --- a/aiida/backends/sqlalchemy/migrator.py +++ b/aiida/backends/sqlalchemy/migrator.py @@ -168,8 +168,8 @@ def validate_storage(self) -> None: def initialise(self) -> None: """Generate the initial storage schema for this profile, from the ORM models.""" + from aiida.backends.sqlalchemy.backend import CONTAINER_DEFAULTS from aiida.backends.sqlalchemy.models.base import get_orm_metadata - from aiida.orm.implementation.sqlalchemy.backend import CONTAINER_DEFAULTS # setup the database # see: https://alembic.sqlalchemy.org/en/latest/cookbook.html#building-an-up-to-date-database-from-scratch diff --git a/aiida/orm/implementation/sqlalchemy/__init__.py b/aiida/backends/sqlalchemy/orm/__init__.py similarity index 63% rename from aiida/orm/implementation/sqlalchemy/__init__.py rename to aiida/backends/sqlalchemy/orm/__init__.py index 1606ed905e..3d85826a21 100644 --- a/aiida/orm/implementation/sqlalchemy/__init__.py +++ b/aiida/backends/sqlalchemy/orm/__init__.py @@ -7,25 +7,4 @@ # For further information on the license, see the LICENSE.txt file # # For further information please visit http://www.aiida.net # ########################################################################### -"""Implementation of SQLAlchemy backend.""" - -# AUTO-GENERATED - -# yapf: disable -# pylint: disable=wildcard-import - -from .backend import * -from .convert import * -from .groups import * -from .users import * - -__all__ = ( - 'PsqlDosBackend', - 'SqlaGroup', - 'SqlaGroupCollection', - 'SqlaUser', - 'SqlaUserCollection', - 'get_backend_entity', -) - -# yapf: enable +"""Implementation of ORM backend entities.""" diff --git a/aiida/orm/implementation/sqlalchemy/authinfos.py b/aiida/backends/sqlalchemy/orm/authinfos.py similarity index 96% rename from aiida/orm/implementation/sqlalchemy/authinfos.py rename to aiida/backends/sqlalchemy/orm/authinfos.py index 2e8841ca10..94433c3b96 100644 --- a/aiida/orm/implementation/sqlalchemy/authinfos.py +++ b/aiida/backends/sqlalchemy/orm/authinfos.py @@ -11,9 +11,9 @@ from aiida.backends.sqlalchemy.models.authinfo import DbAuthInfo from aiida.common import exceptions from aiida.common.lang import type_check +from aiida.orm.implementation.authinfos import BackendAuthInfo, BackendAuthInfoCollection -from . import entities, utils -from ..authinfos import BackendAuthInfo, BackendAuthInfoCollection +from . import computers, entities, utils class SqlaAuthInfo(entities.SqlaModelEntity[DbAuthInfo], BackendAuthInfo): @@ -28,7 +28,7 @@ def __init__(self, backend, computer, user): :param user: a :class:`aiida.orm.implementation.users.BackendUser` instance :return: an :class:`aiida.orm.implementation.authinfos.BackendAuthInfo` instance """ - from . import computers, users + from . import users super().__init__(backend) type_check(user, users.SqlaUser) type_check(computer, computers.SqlaComputer) diff --git a/aiida/orm/implementation/sqlalchemy/comments.py b/aiida/backends/sqlalchemy/orm/comments.py similarity index 98% rename from aiida/orm/implementation/sqlalchemy/comments.py rename to aiida/backends/sqlalchemy/orm/comments.py index 4bce867f65..bb301bc475 100644 --- a/aiida/orm/implementation/sqlalchemy/comments.py +++ b/aiida/backends/sqlalchemy/orm/comments.py @@ -16,9 +16,9 @@ from aiida.backends.sqlalchemy.models import comment as models from aiida.common import exceptions, lang +from aiida.orm.implementation.comments import BackendComment, BackendCommentCollection from . import entities, users, utils -from ..comments import BackendComment, BackendCommentCollection class SqlaComment(entities.SqlaModelEntity[models.DbComment], BackendComment): diff --git a/aiida/orm/implementation/sqlalchemy/computers.py b/aiida/backends/sqlalchemy/orm/computers.py similarity index 100% rename from aiida/orm/implementation/sqlalchemy/computers.py rename to aiida/backends/sqlalchemy/orm/computers.py diff --git a/aiida/orm/implementation/sqlalchemy/convert.py b/aiida/backends/sqlalchemy/orm/convert.py similarity index 99% rename from aiida/orm/implementation/sqlalchemy/convert.py rename to aiida/backends/sqlalchemy/orm/convert.py index ff60c052a5..c49e86a14d 100644 --- a/aiida/orm/implementation/sqlalchemy/convert.py +++ b/aiida/backends/sqlalchemy/orm/convert.py @@ -20,8 +20,6 @@ from aiida.backends.sqlalchemy.models.node import DbLink, DbNode from aiida.backends.sqlalchemy.models.user import DbUser -__all__ = ('get_backend_entity',) - # pylint: disable=cyclic-import diff --git a/aiida/orm/implementation/sqlalchemy/entities.py b/aiida/backends/sqlalchemy/orm/entities.py similarity index 97% rename from aiida/orm/implementation/sqlalchemy/entities.py rename to aiida/backends/sqlalchemy/orm/entities.py index bb000bc580..6faaee96a5 100644 --- a/aiida/orm/implementation/sqlalchemy/entities.py +++ b/aiida/backends/sqlalchemy/orm/entities.py @@ -38,7 +38,7 @@ def from_dbmodel(cls, dbmodel, backend): :param backend: the corresponding storage backend :return: the AiiDA entity """ - from .backend import PsqlDosBackend # pylint: disable=cyclic-import + from ..backend import PsqlDosBackend # pylint: disable=cyclic-import cls._class_check() type_check(dbmodel, cls.MODEL_CLASS) type_check(backend, PsqlDosBackend) diff --git a/aiida/orm/implementation/sqlalchemy/extras_mixin.py b/aiida/backends/sqlalchemy/orm/extras_mixin.py similarity index 100% rename from aiida/orm/implementation/sqlalchemy/extras_mixin.py rename to aiida/backends/sqlalchemy/orm/extras_mixin.py diff --git a/aiida/orm/implementation/sqlalchemy/groups.py b/aiida/backends/sqlalchemy/orm/groups.py similarity index 98% rename from aiida/orm/implementation/sqlalchemy/groups.py rename to aiida/backends/sqlalchemy/orm/groups.py index d3460ccb0f..aba482c36b 100644 --- a/aiida/orm/implementation/sqlalchemy/groups.py +++ b/aiida/backends/sqlalchemy/orm/groups.py @@ -18,8 +18,6 @@ from . import entities, users, utils from .extras_mixin import ExtrasMixin -__all__ = ('SqlaGroup', 'SqlaGroupCollection') - _LOGGER = logging.getLogger(__name__) @@ -180,7 +178,7 @@ def add_nodes(self, nodes, **kwargs): from sqlalchemy.exc import IntegrityError # pylint: disable=import-error, no-name-in-module from aiida.backends.sqlalchemy.models.base import Base - from aiida.orm.implementation.sqlalchemy.nodes import SqlaNode + from aiida.backends.sqlalchemy.orm.nodes import SqlaNode super().add_nodes(nodes) skip_orm = kwargs.get('skip_orm', False) @@ -236,7 +234,7 @@ def remove_nodes(self, nodes, **kwargs): from sqlalchemy import and_ from aiida.backends.sqlalchemy.models.base import Base - from aiida.orm.implementation.sqlalchemy.nodes import SqlaNode + from aiida.backends.sqlalchemy.orm.nodes import SqlaNode super().remove_nodes(nodes) diff --git a/aiida/orm/implementation/sqlalchemy/logs.py b/aiida/backends/sqlalchemy/orm/logs.py similarity index 98% rename from aiida/orm/implementation/sqlalchemy/logs.py rename to aiida/backends/sqlalchemy/orm/logs.py index 988ad7c474..445c49b9f9 100644 --- a/aiida/orm/implementation/sqlalchemy/logs.py +++ b/aiida/backends/sqlalchemy/orm/logs.py @@ -14,9 +14,9 @@ from aiida.backends.sqlalchemy.models import log as models from aiida.common import exceptions +from aiida.orm.implementation import BackendLog, BackendLogCollection from . import entities, utils -from .. import BackendLog, BackendLogCollection class SqlaLog(entities.SqlaModelEntity[models.DbLog], BackendLog): diff --git a/aiida/orm/implementation/sqlalchemy/nodes.py b/aiida/backends/sqlalchemy/orm/nodes.py similarity index 99% rename from aiida/orm/implementation/sqlalchemy/nodes.py rename to aiida/backends/sqlalchemy/orm/nodes.py index 7513a6126a..99eee21d80 100644 --- a/aiida/orm/implementation/sqlalchemy/nodes.py +++ b/aiida/backends/sqlalchemy/orm/nodes.py @@ -18,11 +18,11 @@ from aiida.backends.sqlalchemy.models import node as models from aiida.common import exceptions from aiida.common.lang import type_check +from aiida.orm.implementation import BackendNode, BackendNodeCollection from aiida.orm.implementation.utils import clean_value, validate_attribute_extra_key from . import entities from . import utils as sqla_utils -from .. import BackendNode, BackendNodeCollection from .computers import SqlaComputer from .extras_mixin import ExtrasMixin from .users import SqlaUser diff --git a/aiida/orm/implementation/sqlalchemy/querybuilder/__init__.py b/aiida/backends/sqlalchemy/orm/querybuilder/__init__.py similarity index 93% rename from aiida/orm/implementation/sqlalchemy/querybuilder/__init__.py rename to aiida/backends/sqlalchemy/orm/querybuilder/__init__.py index 59e9c2163d..c6d0b2d49f 100644 --- a/aiida/orm/implementation/sqlalchemy/querybuilder/__init__.py +++ b/aiida/backends/sqlalchemy/orm/querybuilder/__init__.py @@ -7,6 +7,6 @@ # For further information on the license, see the LICENSE.txt file # # For further information please visit http://www.aiida.net # ########################################################################### -"""Implementation of SQLAlchemy backend.""" +"""Implementation of QueryBuilder backend.""" from .main import SqlaQueryBuilder diff --git a/aiida/orm/implementation/sqlalchemy/querybuilder/joiner.py b/aiida/backends/sqlalchemy/orm/querybuilder/joiner.py similarity index 100% rename from aiida/orm/implementation/sqlalchemy/querybuilder/joiner.py rename to aiida/backends/sqlalchemy/orm/querybuilder/joiner.py diff --git a/aiida/orm/implementation/sqlalchemy/querybuilder/main.py b/aiida/backends/sqlalchemy/orm/querybuilder/main.py similarity index 100% rename from aiida/orm/implementation/sqlalchemy/querybuilder/main.py rename to aiida/backends/sqlalchemy/orm/querybuilder/main.py diff --git a/aiida/orm/implementation/sqlalchemy/users.py b/aiida/backends/sqlalchemy/orm/users.py similarity index 98% rename from aiida/orm/implementation/sqlalchemy/users.py rename to aiida/backends/sqlalchemy/orm/users.py index 02de29a53f..32e672c44b 100644 --- a/aiida/orm/implementation/sqlalchemy/users.py +++ b/aiida/backends/sqlalchemy/orm/users.py @@ -13,8 +13,6 @@ from . import entities, utils -__all__ = ('SqlaUserCollection', 'SqlaUser') - class SqlaUser(entities.SqlaModelEntity[DbUser], BackendUser): """SQLA user""" diff --git a/aiida/orm/implementation/sqlalchemy/utils.py b/aiida/backends/sqlalchemy/orm/utils.py similarity index 98% rename from aiida/orm/implementation/sqlalchemy/utils.py rename to aiida/backends/sqlalchemy/orm/utils.py index 2a4ce7b9e5..aa85656409 100644 --- a/aiida/orm/implementation/sqlalchemy/utils.py +++ b/aiida/backends/sqlalchemy/orm/utils.py @@ -20,7 +20,7 @@ from aiida.common import exceptions if TYPE_CHECKING: - from aiida.orm.implementation.sqlalchemy.backend import PsqlDosBackend + from aiida.backends.sqlalchemy.backend import PsqlDosBackend IMMUTABLE_MODEL_FIELDS = {'id', 'pk', 'uuid', 'node_type'} diff --git a/aiida/backends/sqlalchemy/utils.py b/aiida/backends/sqlalchemy/utils.py index 187f19691b..10d2207f80 100644 --- a/aiida/backends/sqlalchemy/utils.py +++ b/aiida/backends/sqlalchemy/utils.py @@ -74,7 +74,7 @@ def flag_modified(instance, key): """ from sqlalchemy.orm.attributes import flag_modified as flag_modified_sqla - from aiida.orm.implementation.sqlalchemy.utils import ModelWrapper + from aiida.backends.sqlalchemy.orm.utils import ModelWrapper if isinstance(instance, ModelWrapper): instance = instance._model # pylint: disable=protected-access diff --git a/aiida/cmdline/commands/cmd_devel.py b/aiida/cmdline/commands/cmd_devel.py index 1a7d0bd521..29c3d8d2f7 100644 --- a/aiida/cmdline/commands/cmd_devel.py +++ b/aiida/cmdline/commands/cmd_devel.py @@ -45,7 +45,7 @@ def devel_check_load_time(): if manager.profile_storage_loaded: echo.echo_critical('potential `verdi` speed problem: database backend is loaded.') - allowed = ('aiida.backends', 'aiida.cmdline', 'aiida.common', 'aiida.manage', 'aiida.plugins', 'aiida.restapi') + allowed = ('aiida.cmdline', 'aiida.common', 'aiida.manage', 'aiida.plugins', 'aiida.restapi') for loaded in loaded_aiida_modules: if not any(loaded.startswith(mod) for mod in allowed): echo.echo_critical( diff --git a/aiida/manage/configuration/profile.py b/aiida/manage/configuration/profile.py index 75923aa476..36e62928ef 100644 --- a/aiida/manage/configuration/profile.py +++ b/aiida/manage/configuration/profile.py @@ -124,7 +124,7 @@ def set_storage(self, name: str, config: Dict[str, Any]) -> None: def storage_cls(self) -> Type['Backend']: """Return the storage backend class for this profile.""" if self.storage_backend == 'psql_dos': - from aiida.orm.implementation.sqlalchemy.backend import PsqlDosBackend + from aiida.backends.sqlalchemy.backend import PsqlDosBackend return PsqlDosBackend if self.storage_backend == 'archive.sqlite': from aiida.tools.archive.implementations.sqlite.backend import ArchiveReadOnlyBackend diff --git a/aiida/orm/implementation/__init__.py b/aiida/orm/implementation/__init__.py index 99610a2673..588a8a7dae 100644 --- a/aiida/orm/implementation/__init__.py +++ b/aiida/orm/implementation/__init__.py @@ -7,7 +7,7 @@ # For further information on the license, see the LICENSE.txt file # # For further information please visit http://www.aiida.net # ########################################################################### -"""Module with the implementations of the various backend entities for various database backends.""" +"""Module containing the backend entity abstracts for storage backends.""" # AUTO-GENERATED diff --git a/aiida/tools/archive/implementations/sqlite/backend.py b/aiida/tools/archive/implementations/sqlite/backend.py index 33a2664cb5..c8fada42bb 100644 --- a/aiida/tools/archive/implementations/sqlite/backend.py +++ b/aiida/tools/archive/implementations/sqlite/backend.py @@ -26,13 +26,13 @@ # we need to import all models, to ensure they are loaded on the SQLA Metadata from aiida.backends.sqlalchemy.models import authinfo, base, comment, computer, group, log, node, user +from aiida.backends.sqlalchemy.orm import authinfos, comments, computers, entities, groups, logs, nodes, users +from aiida.backends.sqlalchemy.orm.querybuilder import SqlaQueryBuilder +from aiida.backends.sqlalchemy.orm.utils import ModelWrapper from aiida.common.exceptions import UnreachableStorage from aiida.manage import Profile from aiida.orm.entities import EntityTypes from aiida.orm.implementation.backends import Backend as BackendAbstract -from aiida.orm.implementation.sqlalchemy import authinfos, comments, computers, entities, groups, logs, nodes, users -from aiida.orm.implementation.sqlalchemy.querybuilder import SqlaQueryBuilder -from aiida.orm.implementation.sqlalchemy.utils import ModelWrapper from aiida.repository.backend.abstract import AbstractRepositoryBackend from aiida.tools.archive.exceptions import ArchiveClosedError, CorruptArchive, ReadOnlyError diff --git a/utils/make_all.py b/utils/make_all.py index 77004cd64b..404cbd8aed 100644 --- a/utils/make_all.py +++ b/utils/make_all.py @@ -156,10 +156,9 @@ def write_inits(folder_path: str, all_dict: dict, skip_children: Dict[str, List[ 'cmdline/utils': ['echo'], # skipped since this is for testing only not general use 'manage': ['tests'], - # skipped since we don't want to expose the implmentation + # skipped since we don't want to expose the implementation at the top-level + 'backends': ['sqlalchemy'], 'orm': ['implementation'], - # skipped since both implementations share class/function names - 'orm/implementation': ['sqlalchemy', 'sql'], # skip all since the module requires extra requirements 'restapi': ['*'], # keep at aiida.tools.archive level From 8dc3d8a883c2cdf427b7dd9faf070731f4cfa135 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 18 Feb 2022 06:48:51 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20REFACTOR:=20rename=20`?= =?UTF-8?q?sqlalchemy`=20->=20`psql=5Fdos`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This brings it inline with the actual backend name --- .pre-commit-config.yaml | 6 ++-- .../{sqlalchemy => psql_dos}/__init__.py | 0 .../{sqlalchemy => psql_dos}/alembic_cli.py | 2 +- .../{sqlalchemy => psql_dos}/backend.py | 32 ++++++++--------- .../migrations/__init__.py | 0 .../migrations/env.py | 18 +++++----- .../migrations/script.py.mako | 0 .../migrations/utils/__init__.py | 0 .../migrations/utils/calc_state.py | 0 .../migrations/utils/create_dbattribute.py | 0 .../migrations/utils/dblog_update.py | 0 .../migrations/utils/duplicate_uuids.py | 0 .../migrations/utils/integrity.py | 0 .../migrations/utils/legacy_workflows.py | 0 .../migrations/utils/migrate_repository.py | 4 +-- .../migrations/utils/parity.py | 2 +- .../migrations/utils/provenance_redesign.py | 0 .../migrations/utils/reflect.py | 0 .../migrations/utils/utils.py | 0 .../versions/041a79fc615f_dblog_cleaning.py | 2 +- ...c78e6209_drop_computer_transport_params.py | 0 ...ebbeab274d_base_data_plugin_type_string.py | 0 .../versions/0edcdd5a30f0_dbgroup_extras.py | 0 .../118349c10896_default_link_label.py | 0 ...798d4d3_trajectory_symbols_to_attribute.py | 2 +- ...0c971ae0a3_migrate_builtin_calculations.py | 0 .../versions/162b99bca4a2_drop_dbcalcstate.py | 0 ...31_drop_node_columns_nodeversion_public.py | 0 .../1b8ed3425af9_remove_legacy_workflows.py | 2 +- .../versions/1de112340b16_django_parity_1.py | 0 .../versions/1de112340b17_django_parity_2.py | 0 .../versions/1de112340b18_django_parity_3.py | 2 +- .../1feaea71bd5a_migrate_repository.py | 2 +- .../239cea6d2452_provenance_redesign.py | 2 +- ..._data_migration_legacy_job_calculations.py | 0 .../34a831f4286d_entry_point_core_prefix.py | 0 .../35d4ee9a1b0e_code_hidden_attr_to_extra.py | 0 ...b70663_dblog_uuid_uniqueness_constraint.py | 0 ...f3d4882837_make_all_uuid_columns_unique.py | 2 +- .../3d6190594e19_remove_dbcomputer_enabled.py | 0 .../535039300e4a_computer_name_to_label.py | 0 ..._adding_indexes_and_constraints_to_the_.py | 0 .../versions/5a49629f0d45_dblink_indices.py | 0 .../5d4d844852b6_invalidating_node_hash.py | 0 ...4e52864_dbnode_type_to_dbnode_node_type.py | 0 .../61fc0913fae9_remove_node_prefix.py | 0 ...d36de90_add_node_uuid_unique_constraint.py | 2 +- ...5c2ea1439d_move_data_within_node_module.py | 0 .../versions/6c629c886f84_process_type.py | 0 .../versions/70c7d732f1b2_delete_dbpath.py | 0 ...36a82b2cc4_add_node_repository_metadata.py | 0 ..._unique_constraints_for_the_db_dbgroup_.py | 0 .../7b38a9e783e7_seal_unsealed_processes.py | 0 ...8c391c49_calc_job_option_attribute_keys.py | 0 ...b25_add_indexes_to_dbworkflowdata_table.py | 0 .../91b573400be5_prepare_schema_reset.py | 0 .../migrations/versions/__init__.py | 0 .../versions/a514d673c163_drop_dblock.py | 0 .../a603da2cc809_code_sub_class_of_data.py | 0 .../versions/a6048f0ffca8_update_linktypes.py | 0 ...group_name_to_label_type_to_type_string.py | 0 .../bf591f31dd12_dbgroup_type_string.py | 0 ...84bcc35_delete_trajectory_symbols_array.py | 2 +- ...4fdfed416_rename_parameter_data_to_dict.py | 0 .../de2eaf6978b4_simplify_user_model.py | 0 .../versions/django_0001_initial.py | 0 .../versions/django_0002_db_state_change.py | 0 .../versions/django_0003_add_link_type.py | 2 +- ...django_0004_add_daemon_and_uuid_indices.py | 0 .../django_0005_add_cmtime_indices.py | 0 .../versions/django_0006_delete_dbpath.py | 0 .../versions/django_0007_update_linktypes.py | 0 .../django_0008_code_hidden_to_extra.py | 0 ...jango_0009_base_data_plugin_type_string.py | 0 .../versions/django_0010_process_type.py | 0 .../django_0011_delete_kombu_tables.py | 0 .../versions/django_0012_drop_dblock.py | 0 .../versions/django_0013_django_1_8.py | 2 +- ...go_0014_add_node_uuid_unique_constraint.py | 2 +- .../django_0015_invalidating_node_hash.py | 0 .../django_0016_code_sub_class_of_data.py | 0 .../versions/django_0017_drop_dbcalcstate.py | 0 .../versions/django_0018_django_1_11.py | 4 +-- ...jango_0019_migrate_builtin_calculations.py | 0 .../django_0020_provenance_redesign.py | 2 +- ...group_name_to_label_type_to_type_string.py | 2 +- ...0022_dbgroup_type_string_change_content.py | 0 ...ngo_0023_calc_job_option_attribute_keys.py | 0 .../versions/django_0024a_dblog_update.py | 2 +- .../versions/django_0024b_dblog_update.py | 0 ...jango_0025_move_data_within_node_module.py | 0 ...go_0026_trajectory_symbols_to_attribute.py | 4 +-- ...go_0027_delete_trajectory_symbols_array.py | 2 +- .../django_0028_remove_node_prefix.py | 0 ...ango_0029_rename_parameter_data_to_dict.py | 0 ...go_0030_dbnode_type_to_dbnode_node_type.py | 0 .../django_0031_remove_dbcomputer_enabled.py | 0 .../django_0032_remove_legacy_workflows.py | 2 +- ...0033_replace_text_field_with_json_field.py | 0 ...34_drop_node_columns_nodeversion_public.py | 0 .../django_0035_simplify_user_model.py | 0 ...ngo_0036_drop_computer_transport_params.py | 0 ...go_0037_attributes_extras_settings_json.py | 2 +- ..._data_migration_legacy_job_calculations.py | 0 .../versions/django_0039_reset_hash.py | 2 +- ...ata_migration_legacy_process_attributes.py | 0 .../django_0041_seal_unsealed_processes.py | 0 .../django_0042_prepare_schema_reset.py | 0 .../django_0043_default_link_label.py | 0 .../django_0044_dbgroup_type_string.py | 0 .../versions/django_0045_dbgroup_extras.py | 0 ...jango_0046_add_node_repository_metadata.py | 0 .../django_0047_migrate_repository.py | 2 +- .../django_0048_computer_name_to_label.py | 2 +- .../django_0049_entry_point_core_prefix.py | 0 .../versions/django_0050_sqlalchemy_parity.py | 2 +- .../versions/e15ef2630a1b_initial_schema.py | 2 +- ...dbgroup_class_change_type_string_values.py | 0 ...ata_migration_legacy_process_attributes.py | 0 .../versions/e797afa09270_reset_hash.py | 2 +- .../ea2f50e7f615_dblog_create_uuid_column.py | 2 +- .../f9a69de76a9a_delete_kombu_tables.py | 0 .../migrations/versions/main_0001_initial.py | 0 .../{sqlalchemy => psql_dos}/migrator.py | 8 ++--- .../models/__init__.py | 0 .../models/authinfo.py | 0 .../{sqlalchemy => psql_dos}/models/base.py | 2 +- .../models/comment.py | 2 +- .../models/computer.py | 2 +- .../{sqlalchemy => psql_dos}/models/group.py | 0 .../{sqlalchemy => psql_dos}/models/log.py | 2 +- .../{sqlalchemy => psql_dos}/models/node.py | 2 +- .../models/settings.py | 2 +- .../{sqlalchemy => psql_dos}/models/user.py | 2 +- .../{sqlalchemy => psql_dos}/orm/__init__.py | 0 .../{sqlalchemy => psql_dos}/orm/authinfos.py | 2 +- .../{sqlalchemy => psql_dos}/orm/comments.py | 2 +- .../{sqlalchemy => psql_dos}/orm/computers.py | 2 +- .../{sqlalchemy => psql_dos}/orm/convert.py | 14 ++++---- .../{sqlalchemy => psql_dos}/orm/entities.py | 2 +- .../orm/extras_mixin.py | 0 .../{sqlalchemy => psql_dos}/orm/groups.py | 10 +++--- .../{sqlalchemy => psql_dos}/orm/logs.py | 2 +- .../{sqlalchemy => psql_dos}/orm/nodes.py | 4 +-- .../orm/querybuilder/__init__.py | 0 .../orm/querybuilder/joiner.py | 2 +- .../orm/querybuilder/main.py | 36 +++++++++---------- .../{sqlalchemy => psql_dos}/orm/users.py | 2 +- .../{sqlalchemy => psql_dos}/orm/utils.py | 2 +- .../{sqlalchemy => psql_dos}/utils.py | 2 +- aiida/cmdline/commands/cmd_devel.py | 2 +- aiida/manage/configuration/__init__.py | 2 +- aiida/manage/configuration/profile.py | 2 +- .../archive/implementations/sqlite/backend.py | 8 ++--- .../sqlite/migrations/legacy/v04_to_v05.py | 2 +- .../sqlite/migrations/legacy/v05_to_v06.py | 4 +-- .../sqlite/migrations/legacy/v06_to_v07.py | 4 +-- .../sqlite/migrations/legacy/v07_to_v08.py | 2 +- .../sqlite/migrations/legacy/v08_to_v09.py | 2 +- .../sqlite/migrations/v1_db_schema.py | 2 +- docs/source/internals/database.rst | 20 +++++------ docs/source/nitpick-exceptions | 3 ++ .../__init__.py | 0 .../conftest.py | 0 .../migrations/__init__.py | 0 .../migrations/conftest.py | 4 +-- .../migrations/django_branch/__init__.py | 0 .../django_branch/test_0024_dblog_update.py | 2 +- .../django_branch/test_0026_0027_traj_data.py | 6 ++-- .../django_branch/test_0028_0029_node_type.py | 2 +- .../test_0032_remove_legacy_workflows.py | 2 +- ...0033_replace_text_field_with_json_field.py | 2 +- ...st_0037_attributes_extras_settings_json.py | 2 +- ..._data_migration_legacy_job_calculations.py | 4 +-- .../django_branch/test_0039_reset_hash.py | 2 +- ...ata_migration_legacy_process_attributes.py | 2 +- .../test_0041_seal_unsealed_processes.py | 2 +- .../test_0043_default_link_label.py | 2 +- .../test_0044_dbgroup_type_string.py | 2 +- .../django_branch/test_0045_dbgroup_extras.py | 2 +- .../test_0046_add_node_repository_metadata.py | 2 +- .../test_0047_migrate_repository.py | 4 +-- .../test_0048_computer_name_to_label.py | 2 +- .../test_0049_entry_point_core_prefix.py | 2 +- .../django_branch/test_0050_schema_parity.py | 2 +- .../migrations/django_branch/test_legacy.py | 2 +- .../test_legacy/test_v0x_django_0003.yml | 0 .../django_branch/test_migrate_to_head.py | 2 +- .../migrations/sqlalchemy_branch/__init__.py | 0 .../sqlalchemy_branch/test_10_group_update.py | 2 +- .../test_11_v2_repository.py | 4 +-- .../test_12_sqla_django_parity.py | 2 +- .../test_1_provenance_redesign.py | 2 +- .../test_2_group_renaming.py | 2 +- .../test_3_calc_attributes_keys.py | 2 +- .../sqlalchemy_branch/test_4_dblog_update.py | 6 ++-- .../test_5_data_move_with_node.py | 2 +- .../test_6_trajectory_data.py | 6 ++-- .../test_7_node_prefix_removal.py | 2 +- .../test_8_parameter_data_to_dict.py | 2 +- .../test_9_legacy_process.py | 4 +-- .../sqlalchemy_branch/test_migrate_to_head.py | 2 +- .../migrations/test_all_schema.py | 2 +- .../test_django_django_0001_.yml | 0 .../test_django_django_0002_.yml | 0 .../test_django_django_0003_.yml | 0 .../test_django_django_0004_.yml | 0 .../test_django_django_0005_.yml | 0 .../test_django_django_0006_.yml | 0 .../test_django_django_0007_.yml | 0 .../test_django_django_0008_.yml | 0 .../test_django_django_0009_.yml | 0 .../test_django_django_0010_.yml | 0 .../test_django_django_0011_.yml | 0 .../test_django_django_0012_.yml | 0 .../test_django_django_0013_.yml | 0 .../test_django_django_0014_.yml | 0 .../test_django_django_0015_.yml | 0 .../test_django_django_0016_.yml | 0 .../test_django_django_0017_.yml | 0 .../test_django_django_0018_.yml | 0 .../test_django_django_0019_.yml | 0 .../test_django_django_0020_.yml | 0 .../test_django_django_0021_.yml | 0 .../test_django_django_0022_.yml | 0 .../test_django_django_0023_.yml | 0 .../test_django_django_0024_.yml | 0 .../test_django_django_0024a_.yml | 0 .../test_django_django_0025_.yml | 0 .../test_django_django_0026_.yml | 0 .../test_django_django_0027_.yml | 0 .../test_django_django_0028_.yml | 0 .../test_django_django_0029_.yml | 0 .../test_django_django_0030_.yml | 0 .../test_django_django_0031_.yml | 0 .../test_django_django_0032_.yml | 0 .../test_django_django_0033_.yml | 0 .../test_django_django_0034_.yml | 0 .../test_django_django_0035_.yml | 0 .../test_django_django_0036_.yml | 0 .../test_django_django_0037_.yml | 0 .../test_django_django_0038_.yml | 0 .../test_django_django_0039_.yml | 0 .../test_django_django_0040_.yml | 0 .../test_django_django_0041_.yml | 0 .../test_django_django_0042_.yml | 0 .../test_django_django_0043_.yml | 0 .../test_django_django_0044_.yml | 0 .../test_django_django_0045_.yml | 0 .../test_django_django_0046_.yml | 0 .../test_django_django_0047_.yml | 0 .../test_django_django_0048_.yml | 0 .../test_django_django_0049_.yml | 0 .../test_django_django_0050_.yml | 0 .../test_all_schema/test_main_main_0001_.yml | 0 .../test_sqla_0_e15ef2630a1b_.yml | 0 .../test_sqla_10_59edaf8a8b79_.yml | 0 .../test_sqla_11_62fe0d36de90_.yml | 0 .../test_sqla_12_5d4d844852b6_.yml | 0 .../test_sqla_13_a603da2cc809_.yml | 0 .../test_sqla_14_162b99bca4a2_.yml | 0 .../test_sqla_15_140c971ae0a3_.yml | 0 .../test_sqla_16_239cea6d2452_.yml | 0 .../test_sqla_17_b8b23ddefad4_.yml | 0 .../test_sqla_18_e72ad251bcdb_.yml | 0 .../test_sqla_19_7ca08c391c49_.yml | 0 .../test_sqla_1_70c7d732f1b2_.yml | 0 .../test_sqla_20_041a79fc615f_.yml | 0 .../test_sqla_21_ea2f50e7f615_.yml | 0 .../test_sqla_22_375c2db70663_.yml | 0 .../test_sqla_23_6a5c2ea1439d_.yml | 0 .../test_sqla_24_37f3d4882837_.yml | 0 .../test_sqla_25_12536798d4d3_.yml | 0 .../test_sqla_26_ce56d84bcc35_.yml | 0 .../test_sqla_27_61fc0913fae9_.yml | 0 .../test_sqla_28_d254fdfed416_.yml | 0 .../test_sqla_29_5ddd24e52864_.yml | 0 .../test_sqla_2_a6048f0ffca8_.yml | 0 .../test_sqla_30_5a49629f0d45_.yml | 0 .../test_sqla_31_3d6190594e19_.yml | 0 .../test_sqla_32_1b8ed3425af9_.yml | 0 .../test_sqla_33_1830c8430131_.yml | 0 .../test_sqla_34_de2eaf6978b4_.yml | 0 .../test_sqla_35_07fac78e6209_.yml | 0 .../test_sqla_36_26d561acd560_.yml | 0 .../test_sqla_37_e797afa09270_.yml | 0 .../test_sqla_38_e734dd5e50d7_.yml | 0 .../test_sqla_39_7b38a9e783e7_.yml | 0 .../test_sqla_3_89176227b25_.yml | 0 .../test_sqla_40_91b573400be5_.yml | 0 .../test_sqla_41_118349c10896_.yml | 0 .../test_sqla_42_bf591f31dd12_.yml | 0 .../test_sqla_43_0edcdd5a30f0_.yml | 0 .../test_sqla_44_7536a82b2cc4_.yml | 0 .../test_sqla_45_1feaea71bd5a_.yml | 0 .../test_sqla_46_535039300e4a_.yml | 0 .../test_sqla_47_34a831f4286d_.yml | 0 .../test_sqla_48_1de112340b16_.yml | 0 .../test_sqla_49_1de112340b17_.yml | 0 .../test_sqla_4_35d4ee9a1b0e_.yml | 0 .../test_sqla_50_1de112340b18_.yml | 0 .../test_sqla_5_7a6587e16f4c_.yml | 0 .../test_sqla_6_0aebbeab274d_.yml | 0 .../test_sqla_7_6c629c886f84_.yml | 0 .../test_sqla_8_f9a69de76a9a_.yml | 0 .../test_sqla_9_a514d673c163_.yml | 0 .../test_alembic_cli.py | 2 +- .../test_nodes.py | 2 +- .../test_query.py | 0 .../test_schema.py | 4 +-- .../test_session.py | 4 +-- .../test_utils.py | 0 tests/cmdline/commands/test_status.py | 2 +- .../archive/migration/test_v05_to_v06.py | 2 +- utils/make_all.py | 2 +- 315 files changed, 196 insertions(+), 193 deletions(-) rename aiida/backends/{sqlalchemy => psql_dos}/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/alembic_cli.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/backend.py (92%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/env.py (79%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/script.py.mako (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/calc_state.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/create_dbattribute.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/dblog_update.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/duplicate_uuids.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/integrity.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/legacy_workflows.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/migrate_repository.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/parity.py (99%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/provenance_redesign.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/reflect.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/utils/utils.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/041a79fc615f_dblog_cleaning.py (96%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/07fac78e6209_drop_computer_transport_params.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/0edcdd5a30f0_dbgroup_extras.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/118349c10896_default_link_label.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py (96%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/162b99bca4a2_drop_dbcalcstate.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/1de112340b16_django_parity_1.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/1de112340b17_django_parity_2.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/1de112340b18_django_parity_3.py (93%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/1feaea71bd5a_migrate_repository.py (92%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/239cea6d2452_provenance_redesign.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/34a831f4286d_entry_point_core_prefix.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py (93%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/535039300e4a_computer_name_to_label.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/5a49629f0d45_dblink_indices.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/5d4d844852b6_invalidating_node_hash.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/61fc0913fae9_remove_node_prefix.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py (92%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/6c629c886f84_process_type.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/70c7d732f1b2_delete_dbpath.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/91b573400be5_prepare_schema_reset.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/a514d673c163_drop_dblock.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/a603da2cc809_code_sub_class_of_data.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/a6048f0ffca8_update_linktypes.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/bf591f31dd12_dbgroup_type_string.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/de2eaf6978b4_simplify_user_model.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0001_initial.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0002_db_state_change.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0003_add_link_type.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0004_add_daemon_and_uuid_indices.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0005_add_cmtime_indices.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0006_delete_dbpath.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0007_update_linktypes.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0008_code_hidden_to_extra.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0009_base_data_plugin_type_string.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0010_process_type.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0011_delete_kombu_tables.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0012_drop_dblock.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0013_django_1_8.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0014_add_node_uuid_unique_constraint.py (92%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0015_invalidating_node_hash.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0016_code_sub_class_of_data.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0017_drop_dbcalcstate.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0018_django_1_11.py (93%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0019_migrate_builtin_calculations.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0020_provenance_redesign.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0022_dbgroup_type_string_change_content.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0023_calc_job_option_attribute_keys.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0024a_dblog_update.py (96%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0024b_dblog_update.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0025_move_data_within_node_module.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0026_trajectory_symbols_to_attribute.py (91%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0027_delete_trajectory_symbols_array.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0028_remove_node_prefix.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0029_rename_parameter_data_to_dict.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0031_remove_dbcomputer_enabled.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0032_remove_legacy_workflows.py (94%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0033_replace_text_field_with_json_field.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0035_simplify_user_model.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0036_drop_computer_transport_params.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0037_attributes_extras_settings_json.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0038_data_migration_legacy_job_calculations.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0039_reset_hash.py (93%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0040_data_migration_legacy_process_attributes.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0041_seal_unsealed_processes.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0042_prepare_schema_reset.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0043_default_link_label.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0044_dbgroup_type_string.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0045_dbgroup_extras.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0046_add_node_repository_metadata.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0047_migrate_repository.py (92%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0048_computer_name_to_label.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0049_entry_point_core_prefix.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/django_0050_sqlalchemy_parity.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/e15ef2630a1b_initial_schema.py (99%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/e797afa09270_reset_hash.py (94%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/f9a69de76a9a_delete_kombu_tables.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrations/versions/main_0001_initial.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/migrator.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/models/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/models/authinfo.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/models/base.py (95%) rename aiida/backends/{sqlalchemy => psql_dos}/models/comment.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/models/computer.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/models/group.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/models/log.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/models/node.py (99%) rename aiida/backends/{sqlalchemy => psql_dos}/models/settings.py (96%) rename aiida/backends/{sqlalchemy => psql_dos}/models/user.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/authinfos.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/comments.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/computers.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/convert.py (87%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/entities.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/extras_mixin.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/groups.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/logs.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/nodes.py (98%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/querybuilder/__init__.py (100%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/querybuilder/joiner.py (99%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/querybuilder/main.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/users.py (97%) rename aiida/backends/{sqlalchemy => psql_dos}/orm/utils.py (99%) rename aiida/backends/{sqlalchemy => psql_dos}/utils.py (99%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/__init__.py (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/conftest.py (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/__init__.py (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/conftest.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/__init__.py (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0024_dblog_update.py (99%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0026_0027_traj_data.py (95%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0028_0029_node_type.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0032_remove_legacy_workflows.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0033_replace_text_field_with_json_field.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0037_attributes_extras_settings_json.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py (94%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0039_reset_hash.py (96%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0041_seal_unsealed_processes.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0043_default_link_label.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0044_dbgroup_type_string.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0045_dbgroup_extras.py (96%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0046_add_node_repository_metadata.py (96%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0047_migrate_repository.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0048_computer_name_to_label.py (96%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0049_entry_point_core_prefix.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_0050_schema_parity.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_legacy.py (99%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_legacy/test_v0x_django_0003.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/django_branch/test_migrate_to_head.py (93%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/__init__.py (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_10_group_update.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_11_v2_repository.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_1_provenance_redesign.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_2_group_renaming.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_4_dblog_update.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_5_data_move_with_node.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_6_trajectory_data.py (95%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py (96%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_9_legacy_process.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/sqlalchemy_branch/test_migrate_to_head.py (93%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema.py (97%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0001_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0002_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0003_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0004_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0005_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0006_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0007_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0008_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0009_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0010_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0011_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0012_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0013_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0014_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0015_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0016_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0017_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0018_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0019_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0020_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0021_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0022_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0023_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0024_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0024a_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0025_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0026_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0027_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0028_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0029_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0030_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0031_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0032_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0033_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0034_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0035_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0036_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0037_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0038_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0039_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0040_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0041_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0042_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0043_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0044_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0045_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0046_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0047_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0048_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0049_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_django_django_0050_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_main_main_0001_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_3_89176227b25_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_41_118349c10896_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/test_alembic_cli.py (93%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/test_nodes.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/test_query.py (100%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/test_schema.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/test_session.py (98%) rename tests/backends/{aiida_sqlalchemy => psql_dos}/test_utils.py (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 267febdec3..b2ca5b733d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -71,6 +71,9 @@ repos: files: >- (?x)^( aiida/backends/control.py| + aiida/backends/psql_dos/backend.py| + aiida/backends/psql_dos/orm/querybuilder/.*py| + aiida/backends/psql_dos/utils.py| aiida/common/progress_reporter.py| aiida/engine/.*py| aiida/manage/manager.py| @@ -85,10 +88,7 @@ repos: aiida/orm/implementation/logs.py| aiida/orm/implementation/nodes.py| aiida/orm/implementation/users.py| - aiida/orm/implementation/sql/backends.py| - aiida/orm/implementation/sqlalchemy/backend.py| aiida/orm/implementation/querybuilder.py| - aiida/orm/implementation/sqlalchemy/querybuilder/.*py| aiida/orm/entities.py| aiida/orm/authinfos.py| aiida/orm/comments.py| diff --git a/aiida/backends/sqlalchemy/__init__.py b/aiida/backends/psql_dos/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/__init__.py rename to aiida/backends/psql_dos/__init__.py diff --git a/aiida/backends/sqlalchemy/alembic_cli.py b/aiida/backends/psql_dos/alembic_cli.py similarity index 98% rename from aiida/backends/sqlalchemy/alembic_cli.py rename to aiida/backends/psql_dos/alembic_cli.py index 7b9b1edf24..9c7c7bc70e 100755 --- a/aiida/backends/sqlalchemy/alembic_cli.py +++ b/aiida/backends/psql_dos/alembic_cli.py @@ -13,7 +13,7 @@ import click from sqlalchemy.util.compat import nullcontext -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.cmdline import is_verbose from aiida.cmdline.params import options diff --git a/aiida/backends/sqlalchemy/backend.py b/aiida/backends/psql_dos/backend.py similarity index 92% rename from aiida/backends/sqlalchemy/backend.py rename to aiida/backends/psql_dos/backend.py index 6415ebb11c..5a9a9fc379 100644 --- a/aiida/backends/sqlalchemy/backend.py +++ b/aiida/backends/psql_dos/backend.py @@ -17,8 +17,8 @@ from sqlalchemy import table from sqlalchemy.orm import Session, scoped_session, sessionmaker -from aiida.backends.sqlalchemy.migrator import REPOSITORY_UUID_KEY, PsqlDostoreMigrator -from aiida.backends.sqlalchemy.models import base +from aiida.backends.psql_dos.migrator import REPOSITORY_UUID_KEY, PsqlDostoreMigrator +from aiida.backends.psql_dos.models import base from aiida.common.exceptions import ClosedStorage, IntegrityError from aiida.manage.configuration.profile import Profile from aiida.orm import User @@ -100,7 +100,7 @@ def _initialise_session(self): Multi-thread support is currently required by the REST API. Although, in the future, we may want to move the multi-thread handling to higher in the AiiDA stack. """ - from aiida.backends.sqlalchemy.utils import create_sqlalchemy_engine + from aiida.backends.psql_dos.utils import create_sqlalchemy_engine engine = create_sqlalchemy_engine(self._profile.storage_config) self._session_factory = scoped_session(sessionmaker(bind=engine, future=True, expire_on_commit=True)) @@ -125,8 +125,8 @@ def close(self) -> None: self._session_factory = None def _clear(self, recreate_user: bool = True) -> None: - from aiida.backends.sqlalchemy.models.settings import DbSetting - from aiida.backends.sqlalchemy.models.user import DbUser + from aiida.backends.psql_dos.models.settings import DbSetting + from aiida.backends.psql_dos.models.user import DbUser super()._clear(recreate_user) @@ -237,13 +237,13 @@ def _get_mapper_from_entity(entity_type: EntityTypes, with_pk: bool): """ from sqlalchemy import inspect - from aiida.backends.sqlalchemy.models.authinfo import DbAuthInfo - from aiida.backends.sqlalchemy.models.comment import DbComment - from aiida.backends.sqlalchemy.models.computer import DbComputer - from aiida.backends.sqlalchemy.models.group import DbGroup, DbGroupNode - from aiida.backends.sqlalchemy.models.log import DbLog - from aiida.backends.sqlalchemy.models.node import DbLink, DbNode - from aiida.backends.sqlalchemy.models.user import DbUser + from aiida.backends.psql_dos.models.authinfo import DbAuthInfo + from aiida.backends.psql_dos.models.comment import DbComment + from aiida.backends.psql_dos.models.computer import DbComputer + from aiida.backends.psql_dos.models.group import DbGroup, DbGroupNode + from aiida.backends.psql_dos.models.log import DbLog + from aiida.backends.psql_dos.models.node import DbLink, DbNode + from aiida.backends.psql_dos.models.user import DbUser model = { EntityTypes.AUTHINFO: DbAuthInfo, EntityTypes.COMMENT: DbComment, @@ -297,8 +297,8 @@ def bulk_update(self, entity_type: EntityTypes, rows: List[dict]) -> None: # py def delete_nodes_and_connections(self, pks_to_delete: Sequence[int]) -> None: # pylint: disable=no-self-use # pylint: disable=no-value-for-parameter - from aiida.backends.sqlalchemy.models.group import DbGroupNode - from aiida.backends.sqlalchemy.models.node import DbLink, DbNode + from aiida.backends.psql_dos.models.group import DbGroupNode + from aiida.backends.psql_dos.models.node import DbLink, DbNode if not self.in_transaction: raise AssertionError('Cannot delete nodes and links outside a transaction') @@ -326,7 +326,7 @@ def get_backend_entity(self, model: base.Base) -> BackendEntity: def set_global_variable( self, key: str, value: Union[None, str, int, float], description: Optional[str] = None, overwrite=True ) -> None: - from aiida.backends.sqlalchemy.models.settings import DbSetting + from aiida.backends.psql_dos.models.settings import DbSetting session = self.get_session() with (nullcontext() if self.in_transaction else self.transaction()): @@ -339,7 +339,7 @@ def set_global_variable( session.add(DbSetting(key=key, val=value, description=description or '')) def get_global_variable(self, key: str) -> Union[None, str, int, float]: - from aiida.backends.sqlalchemy.models.settings import DbSetting + from aiida.backends.psql_dos.models.settings import DbSetting session = self.get_session() with (nullcontext() if self.in_transaction else self.transaction()): diff --git a/aiida/backends/sqlalchemy/migrations/__init__.py b/aiida/backends/psql_dos/migrations/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/__init__.py rename to aiida/backends/psql_dos/migrations/__init__.py diff --git a/aiida/backends/sqlalchemy/migrations/env.py b/aiida/backends/psql_dos/migrations/env.py similarity index 79% rename from aiida/backends/sqlalchemy/migrations/env.py rename to aiida/backends/psql_dos/migrations/env.py index b15509162f..9d379fbcfc 100644 --- a/aiida/backends/sqlalchemy/migrations/env.py +++ b/aiida/backends/psql_dos/migrations/env.py @@ -18,15 +18,15 @@ def run_migrations_online(): """ # pylint: disable=unused-import - from aiida.backends.sqlalchemy.models.authinfo import DbAuthInfo - from aiida.backends.sqlalchemy.models.base import Base - from aiida.backends.sqlalchemy.models.comment import DbComment - from aiida.backends.sqlalchemy.models.computer import DbComputer - from aiida.backends.sqlalchemy.models.group import DbGroup - from aiida.backends.sqlalchemy.models.log import DbLog - from aiida.backends.sqlalchemy.models.node import DbLink, DbNode - from aiida.backends.sqlalchemy.models.settings import DbSetting - from aiida.backends.sqlalchemy.models.user import DbUser + from aiida.backends.psql_dos.models.authinfo import DbAuthInfo + from aiida.backends.psql_dos.models.base import Base + from aiida.backends.psql_dos.models.comment import DbComment + from aiida.backends.psql_dos.models.computer import DbComputer + from aiida.backends.psql_dos.models.group import DbGroup + from aiida.backends.psql_dos.models.log import DbLog + from aiida.backends.psql_dos.models.node import DbLink, DbNode + from aiida.backends.psql_dos.models.settings import DbSetting + from aiida.backends.psql_dos.models.user import DbUser from aiida.common.exceptions import DbContentError config = context.config # pylint: disable=no-member diff --git a/aiida/backends/sqlalchemy/migrations/script.py.mako b/aiida/backends/psql_dos/migrations/script.py.mako similarity index 100% rename from aiida/backends/sqlalchemy/migrations/script.py.mako rename to aiida/backends/psql_dos/migrations/script.py.mako diff --git a/aiida/backends/sqlalchemy/migrations/utils/__init__.py b/aiida/backends/psql_dos/migrations/utils/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/__init__.py rename to aiida/backends/psql_dos/migrations/utils/__init__.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/calc_state.py b/aiida/backends/psql_dos/migrations/utils/calc_state.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/calc_state.py rename to aiida/backends/psql_dos/migrations/utils/calc_state.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/create_dbattribute.py b/aiida/backends/psql_dos/migrations/utils/create_dbattribute.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/create_dbattribute.py rename to aiida/backends/psql_dos/migrations/utils/create_dbattribute.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/dblog_update.py b/aiida/backends/psql_dos/migrations/utils/dblog_update.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/dblog_update.py rename to aiida/backends/psql_dos/migrations/utils/dblog_update.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/duplicate_uuids.py b/aiida/backends/psql_dos/migrations/utils/duplicate_uuids.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/duplicate_uuids.py rename to aiida/backends/psql_dos/migrations/utils/duplicate_uuids.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/integrity.py b/aiida/backends/psql_dos/migrations/utils/integrity.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/integrity.py rename to aiida/backends/psql_dos/migrations/utils/integrity.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/legacy_workflows.py b/aiida/backends/psql_dos/migrations/utils/legacy_workflows.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/legacy_workflows.py rename to aiida/backends/psql_dos/migrations/utils/legacy_workflows.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py b/aiida/backends/psql_dos/migrations/utils/migrate_repository.py similarity index 97% rename from aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py rename to aiida/backends/psql_dos/migrations/utils/migrate_repository.py index ad3acb0a5f..6b68fdf815 100644 --- a/aiida/backends/sqlalchemy/migrations/utils/migrate_repository.py +++ b/aiida/backends/psql_dos/migrations/utils/migrate_repository.py @@ -18,8 +18,8 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, func, select, table, text -from aiida.backends.sqlalchemy.backend import CONTAINER_DEFAULTS -from aiida.backends.sqlalchemy.migrations.utils import utils +from aiida.backends.psql_dos.backend import CONTAINER_DEFAULTS +from aiida.backends.psql_dos.migrations.utils import utils from aiida.cmdline.utils import echo from aiida.common import exceptions from aiida.common.progress_reporter import get_progress_reporter, set_progress_bar_tqdm, set_progress_reporter diff --git a/aiida/backends/sqlalchemy/migrations/utils/parity.py b/aiida/backends/psql_dos/migrations/utils/parity.py similarity index 99% rename from aiida/backends/sqlalchemy/migrations/utils/parity.py rename to aiida/backends/psql_dos/migrations/utils/parity.py index 32dfab061f..d5de67085c 100644 --- a/aiida/backends/sqlalchemy/migrations/utils/parity.py +++ b/aiida/backends/psql_dos/migrations/utils/parity.py @@ -10,7 +10,7 @@ """Utilities for synchronizing the django and sqlalchemy schema.""" import alembic -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations def synchronize_schemas(alembic_op: alembic.op) -> None: diff --git a/aiida/backends/sqlalchemy/migrations/utils/provenance_redesign.py b/aiida/backends/psql_dos/migrations/utils/provenance_redesign.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/provenance_redesign.py rename to aiida/backends/psql_dos/migrations/utils/provenance_redesign.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/reflect.py b/aiida/backends/psql_dos/migrations/utils/reflect.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/reflect.py rename to aiida/backends/psql_dos/migrations/utils/reflect.py diff --git a/aiida/backends/sqlalchemy/migrations/utils/utils.py b/aiida/backends/psql_dos/migrations/utils/utils.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/utils/utils.py rename to aiida/backends/psql_dos/migrations/utils/utils.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/041a79fc615f_dblog_cleaning.py b/aiida/backends/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py similarity index 96% rename from aiida/backends/sqlalchemy/migrations/versions/041a79fc615f_dblog_cleaning.py rename to aiida/backends/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py index 01a80b5769..8776caf74f 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/041a79fc615f_dblog_cleaning.py +++ b/aiida/backends/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py @@ -23,7 +23,7 @@ import sqlalchemy as sa from sqlalchemy.sql import text -from aiida.backends.sqlalchemy.migrations.utils.dblog_update import export_and_clean_workflow_logs +from aiida.backends.psql_dos.migrations.utils.dblog_update import export_and_clean_workflow_logs # revision identifiers, used by Alembic. revision = '041a79fc615f' diff --git a/aiida/backends/sqlalchemy/migrations/versions/07fac78e6209_drop_computer_transport_params.py b/aiida/backends/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/07fac78e6209_drop_computer_transport_params.py rename to aiida/backends/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py b/aiida/backends/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py rename to aiida/backends/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/0edcdd5a30f0_dbgroup_extras.py b/aiida/backends/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/0edcdd5a30f0_dbgroup_extras.py rename to aiida/backends/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/118349c10896_default_link_label.py b/aiida/backends/psql_dos/migrations/versions/118349c10896_default_link_label.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/118349c10896_default_link_label.py rename to aiida/backends/psql_dos/migrations/versions/118349c10896_default_link_label.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py b/aiida/backends/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py similarity index 96% rename from aiida/backends/sqlalchemy/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py rename to aiida/backends/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py index 2addb2a4c3..4e6f9f69a0 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py +++ b/aiida/backends/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py @@ -27,7 +27,7 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, func, select, table -from aiida.backends.sqlalchemy.migrations.utils.utils import load_numpy_array_from_repository +from aiida.backends.psql_dos.migrations.utils.utils import load_numpy_array_from_repository # revision identifiers, used by Alembic. revision = '12536798d4d3' diff --git a/aiida/backends/sqlalchemy/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py b/aiida/backends/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py rename to aiida/backends/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/162b99bca4a2_drop_dbcalcstate.py b/aiida/backends/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/162b99bca4a2_drop_dbcalcstate.py rename to aiida/backends/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py b/aiida/backends/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py rename to aiida/backends/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py b/aiida/backends/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py similarity index 95% rename from aiida/backends/sqlalchemy/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py rename to aiida/backends/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py index 23b9363e3a..97a7766aa4 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py +++ b/aiida/backends/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py @@ -19,7 +19,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils.legacy_workflows import export_workflow_data +from aiida.backends.psql_dos.migrations.utils.legacy_workflows import export_workflow_data # revision identifiers, used by Alembic. revision = '1b8ed3425af9' diff --git a/aiida/backends/sqlalchemy/migrations/versions/1de112340b16_django_parity_1.py b/aiida/backends/psql_dos/migrations/versions/1de112340b16_django_parity_1.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/1de112340b16_django_parity_1.py rename to aiida/backends/psql_dos/migrations/versions/1de112340b16_django_parity_1.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/1de112340b17_django_parity_2.py b/aiida/backends/psql_dos/migrations/versions/1de112340b17_django_parity_2.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/1de112340b17_django_parity_2.py rename to aiida/backends/psql_dos/migrations/versions/1de112340b17_django_parity_2.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/1de112340b18_django_parity_3.py b/aiida/backends/psql_dos/migrations/versions/1de112340b18_django_parity_3.py similarity index 93% rename from aiida/backends/sqlalchemy/migrations/versions/1de112340b18_django_parity_3.py rename to aiida/backends/psql_dos/migrations/versions/1de112340b18_django_parity_3.py index 4b661b5db5..c71596c8e5 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/1de112340b18_django_parity_3.py +++ b/aiida/backends/psql_dos/migrations/versions/1de112340b18_django_parity_3.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils.parity import synchronize_schemas +from aiida.backends.psql_dos.migrations.utils.parity import synchronize_schemas revision = '1de112340b18' down_revision = '1de112340b17' diff --git a/aiida/backends/sqlalchemy/migrations/versions/1feaea71bd5a_migrate_repository.py b/aiida/backends/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py similarity index 92% rename from aiida/backends/sqlalchemy/migrations/versions/1feaea71bd5a_migrate_repository.py rename to aiida/backends/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py index d0121864d6..44b3d07109 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/1feaea71bd5a_migrate_repository.py +++ b/aiida/backends/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py @@ -26,7 +26,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils.migrate_repository import migrate_repository + from aiida.backends.psql_dos.migrations.utils.migrate_repository import migrate_repository migrate_repository(op.get_bind(), op.get_context().opts['aiida_profile']) diff --git a/aiida/backends/sqlalchemy/migrations/versions/239cea6d2452_provenance_redesign.py b/aiida/backends/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py similarity index 98% rename from aiida/backends/sqlalchemy/migrations/versions/239cea6d2452_provenance_redesign.py rename to aiida/backends/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py index 48b2c0db9a..c7101dbdef 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/239cea6d2452_provenance_redesign.py +++ b/aiida/backends/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py @@ -26,7 +26,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils import provenance_redesign + from aiida.backends.psql_dos.migrations.utils import provenance_redesign # Migrate calculation nodes by inferring the process type from the type string provenance_redesign.migrate_infer_calculation_entry_point(op) diff --git a/aiida/backends/sqlalchemy/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py b/aiida/backends/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py rename to aiida/backends/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/34a831f4286d_entry_point_core_prefix.py b/aiida/backends/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/34a831f4286d_entry_point_core_prefix.py rename to aiida/backends/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py b/aiida/backends/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py rename to aiida/backends/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py b/aiida/backends/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py rename to aiida/backends/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py b/aiida/backends/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py similarity index 93% rename from aiida/backends/sqlalchemy/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py rename to aiida/backends/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py index 9a9a4a56af..b6a47295bf 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py +++ b/aiida/backends/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py @@ -33,7 +33,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils.duplicate_uuids import verify_uuid_uniqueness + from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness for table in tables: verify_uuid_uniqueness(table, op.get_bind()) op.create_unique_constraint(f'{table}_uuid_key', table, ['uuid']) diff --git a/aiida/backends/sqlalchemy/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py b/aiida/backends/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py rename to aiida/backends/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/535039300e4a_computer_name_to_label.py b/aiida/backends/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/535039300e4a_computer_name_to_label.py rename to aiida/backends/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py b/aiida/backends/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py rename to aiida/backends/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/5a49629f0d45_dblink_indices.py b/aiida/backends/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/5a49629f0d45_dblink_indices.py rename to aiida/backends/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/5d4d844852b6_invalidating_node_hash.py b/aiida/backends/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/5d4d844852b6_invalidating_node_hash.py rename to aiida/backends/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py b/aiida/backends/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py rename to aiida/backends/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/61fc0913fae9_remove_node_prefix.py b/aiida/backends/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/61fc0913fae9_remove_node_prefix.py rename to aiida/backends/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py b/aiida/backends/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py similarity index 92% rename from aiida/backends/sqlalchemy/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py rename to aiida/backends/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py index 74b97a67a8..f52d39ce3c 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py +++ b/aiida/backends/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py @@ -26,7 +26,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils.duplicate_uuids import verify_uuid_uniqueness + from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness verify_uuid_uniqueness('db_dbnode', op.get_bind()) op.create_unique_constraint('db_dbnode_uuid_key', 'db_dbnode', ['uuid']) diff --git a/aiida/backends/sqlalchemy/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py b/aiida/backends/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py rename to aiida/backends/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/6c629c886f84_process_type.py b/aiida/backends/psql_dos/migrations/versions/6c629c886f84_process_type.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/6c629c886f84_process_type.py rename to aiida/backends/psql_dos/migrations/versions/6c629c886f84_process_type.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/70c7d732f1b2_delete_dbpath.py b/aiida/backends/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/70c7d732f1b2_delete_dbpath.py rename to aiida/backends/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py b/aiida/backends/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py rename to aiida/backends/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py b/aiida/backends/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py rename to aiida/backends/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py b/aiida/backends/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py rename to aiida/backends/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py b/aiida/backends/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py rename to aiida/backends/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py b/aiida/backends/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py rename to aiida/backends/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/91b573400be5_prepare_schema_reset.py b/aiida/backends/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/91b573400be5_prepare_schema_reset.py rename to aiida/backends/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/__init__.py b/aiida/backends/psql_dos/migrations/versions/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/__init__.py rename to aiida/backends/psql_dos/migrations/versions/__init__.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/a514d673c163_drop_dblock.py b/aiida/backends/psql_dos/migrations/versions/a514d673c163_drop_dblock.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/a514d673c163_drop_dblock.py rename to aiida/backends/psql_dos/migrations/versions/a514d673c163_drop_dblock.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/a603da2cc809_code_sub_class_of_data.py b/aiida/backends/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/a603da2cc809_code_sub_class_of_data.py rename to aiida/backends/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py b/aiida/backends/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/a6048f0ffca8_update_linktypes.py rename to aiida/backends/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py b/aiida/backends/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py rename to aiida/backends/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/bf591f31dd12_dbgroup_type_string.py b/aiida/backends/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/bf591f31dd12_dbgroup_type_string.py rename to aiida/backends/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py b/aiida/backends/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py similarity index 97% rename from aiida/backends/sqlalchemy/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py rename to aiida/backends/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py index ef676c95c1..41d6328ca5 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py +++ b/aiida/backends/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py @@ -22,7 +22,7 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, select, table, text -from aiida.backends.sqlalchemy.migrations.utils import utils +from aiida.backends.psql_dos.migrations.utils import utils # revision identifiers, used by Alembic. revision = 'ce56d84bcc35' diff --git a/aiida/backends/sqlalchemy/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py b/aiida/backends/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py rename to aiida/backends/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/de2eaf6978b4_simplify_user_model.py b/aiida/backends/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/de2eaf6978b4_simplify_user_model.py rename to aiida/backends/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0001_initial.py b/aiida/backends/psql_dos/migrations/versions/django_0001_initial.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0001_initial.py rename to aiida/backends/psql_dos/migrations/versions/django_0001_initial.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0002_db_state_change.py b/aiida/backends/psql_dos/migrations/versions/django_0002_db_state_change.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0002_db_state_change.py rename to aiida/backends/psql_dos/migrations/versions/django_0002_db_state_change.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0003_add_link_type.py b/aiida/backends/psql_dos/migrations/versions/django_0003_add_link_type.py similarity index 95% rename from aiida/backends/sqlalchemy/migrations/versions/django_0003_add_link_type.py rename to aiida/backends/psql_dos/migrations/versions/django_0003_add_link_type.py index a659e4f308..7875a5c365 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0003_add_link_type.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0003_add_link_type.py @@ -17,7 +17,7 @@ from alembic import op import sqlalchemy as sa -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0003' down_revision = 'django_0002' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0004_add_daemon_and_uuid_indices.py b/aiida/backends/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0004_add_daemon_and_uuid_indices.py rename to aiida/backends/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0005_add_cmtime_indices.py b/aiida/backends/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0005_add_cmtime_indices.py rename to aiida/backends/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0006_delete_dbpath.py b/aiida/backends/psql_dos/migrations/versions/django_0006_delete_dbpath.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0006_delete_dbpath.py rename to aiida/backends/psql_dos/migrations/versions/django_0006_delete_dbpath.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0007_update_linktypes.py b/aiida/backends/psql_dos/migrations/versions/django_0007_update_linktypes.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0007_update_linktypes.py rename to aiida/backends/psql_dos/migrations/versions/django_0007_update_linktypes.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0008_code_hidden_to_extra.py b/aiida/backends/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0008_code_hidden_to_extra.py rename to aiida/backends/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0009_base_data_plugin_type_string.py b/aiida/backends/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0009_base_data_plugin_type_string.py rename to aiida/backends/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0010_process_type.py b/aiida/backends/psql_dos/migrations/versions/django_0010_process_type.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0010_process_type.py rename to aiida/backends/psql_dos/migrations/versions/django_0010_process_type.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0011_delete_kombu_tables.py b/aiida/backends/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0011_delete_kombu_tables.py rename to aiida/backends/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0012_drop_dblock.py b/aiida/backends/psql_dos/migrations/versions/django_0012_drop_dblock.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0012_drop_dblock.py rename to aiida/backends/psql_dos/migrations/versions/django_0012_drop_dblock.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0013_django_1_8.py b/aiida/backends/psql_dos/migrations/versions/django_0013_django_1_8.py similarity index 95% rename from aiida/backends/sqlalchemy/migrations/versions/django_0013_django_1_8.py rename to aiida/backends/psql_dos/migrations/versions/django_0013_django_1_8.py index 76245e3e2f..07bd97f4a1 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0013_django_1_8.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0013_django_1_8.py @@ -17,7 +17,7 @@ from alembic import op import sqlalchemy as sa -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0013' down_revision = 'django_0012' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0014_add_node_uuid_unique_constraint.py b/aiida/backends/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py similarity index 92% rename from aiida/backends/sqlalchemy/migrations/versions/django_0014_add_node_uuid_unique_constraint.py rename to aiida/backends/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py index 5255845333..883eba7da0 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0014_add_node_uuid_unique_constraint.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py @@ -24,7 +24,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils.duplicate_uuids import verify_uuid_uniqueness + from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness verify_uuid_uniqueness('db_dbnode', op.get_bind()) op.create_unique_constraint('db_dbnode_uuid_62e0bf98_uniq', 'db_dbnode', ['uuid']) op.drop_index('db_dbnode_uuid_62e0bf98', table_name='db_dbnode') diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0015_invalidating_node_hash.py b/aiida/backends/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0015_invalidating_node_hash.py rename to aiida/backends/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0016_code_sub_class_of_data.py b/aiida/backends/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0016_code_sub_class_of_data.py rename to aiida/backends/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0017_drop_dbcalcstate.py b/aiida/backends/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0017_drop_dbcalcstate.py rename to aiida/backends/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0018_django_1_11.py b/aiida/backends/psql_dos/migrations/versions/django_0018_django_1_11.py similarity index 93% rename from aiida/backends/sqlalchemy/migrations/versions/django_0018_django_1_11.py rename to aiida/backends/psql_dos/migrations/versions/django_0018_django_1_11.py index d2701e54d5..0440f5adbd 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0018_django_1_11.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0018_django_1_11.py @@ -18,8 +18,8 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations -from aiida.backends.sqlalchemy.migrations.utils.duplicate_uuids import verify_uuid_uniqueness +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness revision = 'django_0018' down_revision = 'django_0017' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0019_migrate_builtin_calculations.py b/aiida/backends/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0019_migrate_builtin_calculations.py rename to aiida/backends/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0020_provenance_redesign.py b/aiida/backends/psql_dos/migrations/versions/django_0020_provenance_redesign.py similarity index 98% rename from aiida/backends/sqlalchemy/migrations/versions/django_0020_provenance_redesign.py rename to aiida/backends/psql_dos/migrations/versions/django_0020_provenance_redesign.py index 12b152b0fe..d5fe97e552 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0020_provenance_redesign.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0020_provenance_redesign.py @@ -32,7 +32,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils import provenance_redesign + from aiida.backends.psql_dos.migrations.utils import provenance_redesign # Migrate calculation nodes by inferring the process type from the type string provenance_redesign.migrate_infer_calculation_entry_point(op) diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py b/aiida/backends/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py similarity index 97% rename from aiida/backends/sqlalchemy/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py rename to aiida/backends/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py index 8d9cb67a92..660be56f16 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0021' down_revision = 'django_0020' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0022_dbgroup_type_string_change_content.py b/aiida/backends/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0022_dbgroup_type_string_change_content.py rename to aiida/backends/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0023_calc_job_option_attribute_keys.py b/aiida/backends/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0023_calc_job_option_attribute_keys.py rename to aiida/backends/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0024a_dblog_update.py b/aiida/backends/psql_dos/migrations/versions/django_0024a_dblog_update.py similarity index 96% rename from aiida/backends/sqlalchemy/migrations/versions/django_0024a_dblog_update.py rename to aiida/backends/psql_dos/migrations/versions/django_0024a_dblog_update.py index 14b5fac79f..9dfc92886b 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0024a_dblog_update.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0024a_dblog_update.py @@ -23,7 +23,7 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql -from aiida.backends.sqlalchemy.migrations.utils.dblog_update import export_and_clean_workflow_logs, set_new_uuid +from aiida.backends.psql_dos.migrations.utils.dblog_update import export_and_clean_workflow_logs, set_new_uuid revision = 'django_0024a' down_revision = 'django_0023' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0024b_dblog_update.py b/aiida/backends/psql_dos/migrations/versions/django_0024b_dblog_update.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0024b_dblog_update.py rename to aiida/backends/psql_dos/migrations/versions/django_0024b_dblog_update.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0025_move_data_within_node_module.py b/aiida/backends/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0025_move_data_within_node_module.py rename to aiida/backends/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0026_trajectory_symbols_to_attribute.py b/aiida/backends/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py similarity index 91% rename from aiida/backends/sqlalchemy/migrations/versions/django_0026_trajectory_symbols_to_attribute.py rename to aiida/backends/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py index 23aa368862..cfd17f2c30 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0026_trajectory_symbols_to_attribute.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py @@ -20,8 +20,8 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql -from aiida.backends.sqlalchemy.migrations.utils.create_dbattribute import create_rows -from aiida.backends.sqlalchemy.migrations.utils.utils import load_numpy_array_from_repository +from aiida.backends.psql_dos.migrations.utils.create_dbattribute import create_rows +from aiida.backends.psql_dos.migrations.utils.utils import load_numpy_array_from_repository revision = 'django_0026' down_revision = 'django_0025' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0027_delete_trajectory_symbols_array.py b/aiida/backends/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py similarity index 97% rename from aiida/backends/sqlalchemy/migrations/versions/django_0027_delete_trajectory_symbols_array.py rename to aiida/backends/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py index bcc76bd773..1b8d06654c 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0027_delete_trajectory_symbols_array.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py @@ -21,7 +21,7 @@ from sqlalchemy.dialects import postgresql from sqlalchemy.sql.expression import delete -from aiida.backends.sqlalchemy.migrations.utils import utils +from aiida.backends.psql_dos.migrations.utils import utils revision = 'django_0027' down_revision = 'django_0026' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0028_remove_node_prefix.py b/aiida/backends/psql_dos/migrations/versions/django_0028_remove_node_prefix.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0028_remove_node_prefix.py rename to aiida/backends/psql_dos/migrations/versions/django_0028_remove_node_prefix.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0029_rename_parameter_data_to_dict.py b/aiida/backends/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0029_rename_parameter_data_to_dict.py rename to aiida/backends/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py b/aiida/backends/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py rename to aiida/backends/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0031_remove_dbcomputer_enabled.py b/aiida/backends/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0031_remove_dbcomputer_enabled.py rename to aiida/backends/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0032_remove_legacy_workflows.py b/aiida/backends/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py similarity index 94% rename from aiida/backends/sqlalchemy/migrations/versions/django_0032_remove_legacy_workflows.py rename to aiida/backends/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py index bcde831f7c..5a087be287 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0032_remove_legacy_workflows.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils.legacy_workflows import export_workflow_data +from aiida.backends.psql_dos.migrations.utils.legacy_workflows import export_workflow_data revision = 'django_0032' down_revision = 'django_0031' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0033_replace_text_field_with_json_field.py b/aiida/backends/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0033_replace_text_field_with_json_field.py rename to aiida/backends/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py b/aiida/backends/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py rename to aiida/backends/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0035_simplify_user_model.py b/aiida/backends/psql_dos/migrations/versions/django_0035_simplify_user_model.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0035_simplify_user_model.py rename to aiida/backends/psql_dos/migrations/versions/django_0035_simplify_user_model.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0036_drop_computer_transport_params.py b/aiida/backends/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0036_drop_computer_transport_params.py rename to aiida/backends/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0037_attributes_extras_settings_json.py b/aiida/backends/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py similarity index 98% rename from aiida/backends/sqlalchemy/migrations/versions/django_0037_attributes_extras_settings_json.py rename to aiida/backends/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py index 945d18efe3..7546ce00a0 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0037_attributes_extras_settings_json.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py @@ -22,7 +22,7 @@ from sqlalchemy.dialects import postgresql from sqlalchemy.sql import column, table -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations from aiida.cmdline.utils import echo from aiida.common.progress_reporter import get_progress_reporter from aiida.common.timezone import datetime_to_isoformat diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0038_data_migration_legacy_job_calculations.py b/aiida/backends/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0038_data_migration_legacy_job_calculations.py rename to aiida/backends/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0039_reset_hash.py b/aiida/backends/psql_dos/migrations/versions/django_0039_reset_hash.py similarity index 93% rename from aiida/backends/sqlalchemy/migrations/versions/django_0039_reset_hash.py rename to aiida/backends/psql_dos/migrations/versions/django_0039_reset_hash.py index 12a80f703f..a649688555 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0039_reset_hash.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0039_reset_hash.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils.integrity import drop_hashes +from aiida.backends.psql_dos.migrations.utils.integrity import drop_hashes revision = 'django_0039' down_revision = 'django_0038' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0040_data_migration_legacy_process_attributes.py b/aiida/backends/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0040_data_migration_legacy_process_attributes.py rename to aiida/backends/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0041_seal_unsealed_processes.py b/aiida/backends/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0041_seal_unsealed_processes.py rename to aiida/backends/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0042_prepare_schema_reset.py b/aiida/backends/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0042_prepare_schema_reset.py rename to aiida/backends/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0043_default_link_label.py b/aiida/backends/psql_dos/migrations/versions/django_0043_default_link_label.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0043_default_link_label.py rename to aiida/backends/psql_dos/migrations/versions/django_0043_default_link_label.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0044_dbgroup_type_string.py b/aiida/backends/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0044_dbgroup_type_string.py rename to aiida/backends/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0045_dbgroup_extras.py b/aiida/backends/psql_dos/migrations/versions/django_0045_dbgroup_extras.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0045_dbgroup_extras.py rename to aiida/backends/psql_dos/migrations/versions/django_0045_dbgroup_extras.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0046_add_node_repository_metadata.py b/aiida/backends/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0046_add_node_repository_metadata.py rename to aiida/backends/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0047_migrate_repository.py b/aiida/backends/psql_dos/migrations/versions/django_0047_migrate_repository.py similarity index 92% rename from aiida/backends/sqlalchemy/migrations/versions/django_0047_migrate_repository.py rename to aiida/backends/psql_dos/migrations/versions/django_0047_migrate_repository.py index 9ae077fe7f..82af262cdc 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0047_migrate_repository.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0047_migrate_repository.py @@ -24,7 +24,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.sqlalchemy.migrations.utils.migrate_repository import migrate_repository + from aiida.backends.psql_dos.migrations.utils.migrate_repository import migrate_repository migrate_repository(op.get_bind(), op.get_context().opts['aiida_profile']) diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0048_computer_name_to_label.py b/aiida/backends/psql_dos/migrations/versions/django_0048_computer_name_to_label.py similarity index 95% rename from aiida/backends/sqlalchemy/migrations/versions/django_0048_computer_name_to_label.py rename to aiida/backends/psql_dos/migrations/versions/django_0048_computer_name_to_label.py index 311502f945..e038eb65b4 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0048_computer_name_to_label.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0048_computer_name_to_label.py @@ -16,7 +16,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils import ReflectMigrations +from aiida.backends.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0048' down_revision = 'django_0047' diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0049_entry_point_core_prefix.py b/aiida/backends/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/django_0049_entry_point_core_prefix.py rename to aiida/backends/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/django_0050_sqlalchemy_parity.py b/aiida/backends/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py similarity index 95% rename from aiida/backends/sqlalchemy/migrations/versions/django_0050_sqlalchemy_parity.py rename to aiida/backends/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py index e090306887..acaab70cda 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/django_0050_sqlalchemy_parity.py +++ b/aiida/backends/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py @@ -25,7 +25,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils.parity import synchronize_schemas +from aiida.backends.psql_dos.migrations.utils.parity import synchronize_schemas revision = 'django_0050' down_revision = 'django_0049' diff --git a/aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py b/aiida/backends/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py similarity index 99% rename from aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py rename to aiida/backends/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py index 5e877fa5a9..7d6e401d0f 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/e15ef2630a1b_initial_schema.py +++ b/aiida/backends/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py @@ -20,7 +20,7 @@ from sqlalchemy.dialects import postgresql from sqlalchemy.orm.session import Session -from aiida.backends.sqlalchemy.utils import install_tc +from aiida.backends.psql_dos.utils import install_tc # revision identifiers, used by Alembic. revision = 'e15ef2630a1b' diff --git a/aiida/backends/sqlalchemy/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py b/aiida/backends/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py rename to aiida/backends/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py b/aiida/backends/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py rename to aiida/backends/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/e797afa09270_reset_hash.py b/aiida/backends/psql_dos/migrations/versions/e797afa09270_reset_hash.py similarity index 94% rename from aiida/backends/sqlalchemy/migrations/versions/e797afa09270_reset_hash.py rename to aiida/backends/psql_dos/migrations/versions/e797afa09270_reset_hash.py index c8c2fed58a..99b632b56f 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/e797afa09270_reset_hash.py +++ b/aiida/backends/psql_dos/migrations/versions/e797afa09270_reset_hash.py @@ -19,7 +19,7 @@ """ from alembic import op -from aiida.backends.sqlalchemy.migrations.utils.integrity import drop_hashes +from aiida.backends.psql_dos.migrations.utils.integrity import drop_hashes # revision identifiers, used by Alembic. revision = 'e797afa09270' diff --git a/aiida/backends/sqlalchemy/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py b/aiida/backends/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py similarity index 95% rename from aiida/backends/sqlalchemy/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py rename to aiida/backends/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py index a7aed64a55..f4d3d210eb 100644 --- a/aiida/backends/sqlalchemy/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py +++ b/aiida/backends/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py @@ -29,7 +29,7 @@ def upgrade(): """ Add an UUID column an populate it with unique UUIDs """ - from aiida.backends.sqlalchemy.migrations.utils.dblog_update import set_new_uuid + from aiida.backends.psql_dos.migrations.utils.dblog_update import set_new_uuid from aiida.common.utils import get_new_uuid connection = op.get_bind() diff --git a/aiida/backends/sqlalchemy/migrations/versions/f9a69de76a9a_delete_kombu_tables.py b/aiida/backends/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/f9a69de76a9a_delete_kombu_tables.py rename to aiida/backends/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py diff --git a/aiida/backends/sqlalchemy/migrations/versions/main_0001_initial.py b/aiida/backends/psql_dos/migrations/versions/main_0001_initial.py similarity index 100% rename from aiida/backends/sqlalchemy/migrations/versions/main_0001_initial.py rename to aiida/backends/psql_dos/migrations/versions/main_0001_initial.py diff --git a/aiida/backends/sqlalchemy/migrator.py b/aiida/backends/psql_dos/migrator.py similarity index 98% rename from aiida/backends/sqlalchemy/migrator.py rename to aiida/backends/psql_dos/migrator.py index 99f08a2ecf..69c2d8e24e 100644 --- a/aiida/backends/sqlalchemy/migrator.py +++ b/aiida/backends/psql_dos/migrator.py @@ -31,8 +31,8 @@ from sqlalchemy.future.engine import Connection from sqlalchemy.orm import Session -from aiida.backends.sqlalchemy.models.settings import DbSetting -from aiida.backends.sqlalchemy.utils import create_sqlalchemy_engine +from aiida.backends.psql_dos.models.settings import DbSetting +from aiida.backends.psql_dos.utils import create_sqlalchemy_engine from aiida.common import exceptions from aiida.manage.configuration.profile import Profile @@ -168,8 +168,8 @@ def validate_storage(self) -> None: def initialise(self) -> None: """Generate the initial storage schema for this profile, from the ORM models.""" - from aiida.backends.sqlalchemy.backend import CONTAINER_DEFAULTS - from aiida.backends.sqlalchemy.models.base import get_orm_metadata + from aiida.backends.psql_dos.backend import CONTAINER_DEFAULTS + from aiida.backends.psql_dos.models.base import get_orm_metadata # setup the database # see: https://alembic.sqlalchemy.org/en/latest/cookbook.html#building-an-up-to-date-database-from-scratch diff --git a/aiida/backends/sqlalchemy/models/__init__.py b/aiida/backends/psql_dos/models/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/models/__init__.py rename to aiida/backends/psql_dos/models/__init__.py diff --git a/aiida/backends/sqlalchemy/models/authinfo.py b/aiida/backends/psql_dos/models/authinfo.py similarity index 100% rename from aiida/backends/sqlalchemy/models/authinfo.py rename to aiida/backends/psql_dos/models/authinfo.py diff --git a/aiida/backends/sqlalchemy/models/base.py b/aiida/backends/psql_dos/models/base.py similarity index 95% rename from aiida/backends/sqlalchemy/models/base.py rename to aiida/backends/psql_dos/models/base.py index 1c342e765f..f442ebc4c8 100644 --- a/aiida/backends/sqlalchemy/models/base.py +++ b/aiida/backends/psql_dos/models/base.py @@ -35,7 +35,7 @@ class Model: def get_orm_metadata() -> MetaData: """Return the populated metadata object.""" # we must load all models, to populate the ORM metadata - from aiida.backends.sqlalchemy.models import ( # pylint: disable=unused-import + from aiida.backends.psql_dos.models import ( # pylint: disable=unused-import authinfo, comment, computer, diff --git a/aiida/backends/sqlalchemy/models/comment.py b/aiida/backends/psql_dos/models/comment.py similarity index 98% rename from aiida/backends/sqlalchemy/models/comment.py rename to aiida/backends/psql_dos/models/comment.py index 7d320889ee..c81f717b13 100644 --- a/aiida/backends/sqlalchemy/models/comment.py +++ b/aiida/backends/psql_dos/models/comment.py @@ -14,7 +14,7 @@ from sqlalchemy.orm import relationship from sqlalchemy.types import DateTime, Integer, Text -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/aiida/backends/sqlalchemy/models/computer.py b/aiida/backends/psql_dos/models/computer.py similarity index 98% rename from aiida/backends/sqlalchemy/models/computer.py rename to aiida/backends/psql_dos/models/computer.py index 90b2dc7da4..b1fd64b5b7 100644 --- a/aiida/backends/sqlalchemy/models/computer.py +++ b/aiida/backends/psql_dos/models/computer.py @@ -14,7 +14,7 @@ from sqlalchemy.sql.schema import Index from sqlalchemy.types import Integer, String, Text -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base from aiida.common.utils import get_new_uuid diff --git a/aiida/backends/sqlalchemy/models/group.py b/aiida/backends/psql_dos/models/group.py similarity index 100% rename from aiida/backends/sqlalchemy/models/group.py rename to aiida/backends/psql_dos/models/group.py diff --git a/aiida/backends/sqlalchemy/models/log.py b/aiida/backends/psql_dos/models/log.py similarity index 98% rename from aiida/backends/sqlalchemy/models/log.py rename to aiida/backends/psql_dos/models/log.py index cc37782c0b..ec2d4f668e 100644 --- a/aiida/backends/sqlalchemy/models/log.py +++ b/aiida/backends/psql_dos/models/log.py @@ -15,7 +15,7 @@ from sqlalchemy.sql.schema import ForeignKey, Index from sqlalchemy.types import DateTime, Integer, String, Text -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/aiida/backends/sqlalchemy/models/node.py b/aiida/backends/psql_dos/models/node.py similarity index 99% rename from aiida/backends/sqlalchemy/models/node.py rename to aiida/backends/psql_dos/models/node.py index 5afe6817ab..8257877342 100644 --- a/aiida/backends/sqlalchemy/models/node.py +++ b/aiida/backends/psql_dos/models/node.py @@ -15,7 +15,7 @@ from sqlalchemy.sql.schema import ForeignKey, Index from sqlalchemy.types import DateTime, Integer, String, Text -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/aiida/backends/sqlalchemy/models/settings.py b/aiida/backends/psql_dos/models/settings.py similarity index 96% rename from aiida/backends/sqlalchemy/models/settings.py rename to aiida/backends/psql_dos/models/settings.py index 3675b20e21..9dc1034099 100644 --- a/aiida/backends/sqlalchemy/models/settings.py +++ b/aiida/backends/psql_dos/models/settings.py @@ -14,7 +14,7 @@ from sqlalchemy.sql.schema import Index from sqlalchemy.types import DateTime, Integer, String, Text -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone diff --git a/aiida/backends/sqlalchemy/models/user.py b/aiida/backends/psql_dos/models/user.py similarity index 97% rename from aiida/backends/sqlalchemy/models/user.py rename to aiida/backends/psql_dos/models/user.py index a3ff6c6e94..7323ffe02e 100644 --- a/aiida/backends/sqlalchemy/models/user.py +++ b/aiida/backends/psql_dos/models/user.py @@ -14,7 +14,7 @@ from sqlalchemy.sql.schema import Index from sqlalchemy.types import Integer, String -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base class DbUser(Base): diff --git a/aiida/backends/sqlalchemy/orm/__init__.py b/aiida/backends/psql_dos/orm/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/orm/__init__.py rename to aiida/backends/psql_dos/orm/__init__.py diff --git a/aiida/backends/sqlalchemy/orm/authinfos.py b/aiida/backends/psql_dos/orm/authinfos.py similarity index 98% rename from aiida/backends/sqlalchemy/orm/authinfos.py rename to aiida/backends/psql_dos/orm/authinfos.py index 94433c3b96..481172c6bf 100644 --- a/aiida/backends/sqlalchemy/orm/authinfos.py +++ b/aiida/backends/psql_dos/orm/authinfos.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Module for the SqlAlchemy backend implementation of the `AuthInfo` ORM class.""" -from aiida.backends.sqlalchemy.models.authinfo import DbAuthInfo +from aiida.backends.psql_dos.models.authinfo import DbAuthInfo from aiida.common import exceptions from aiida.common.lang import type_check from aiida.orm.implementation.authinfos import BackendAuthInfo, BackendAuthInfoCollection diff --git a/aiida/backends/sqlalchemy/orm/comments.py b/aiida/backends/psql_dos/orm/comments.py similarity index 98% rename from aiida/backends/sqlalchemy/orm/comments.py rename to aiida/backends/psql_dos/orm/comments.py index bb301bc475..621e4cb519 100644 --- a/aiida/backends/sqlalchemy/orm/comments.py +++ b/aiida/backends/psql_dos/orm/comments.py @@ -14,7 +14,7 @@ from sqlalchemy.orm.exc import NoResultFound -from aiida.backends.sqlalchemy.models import comment as models +from aiida.backends.psql_dos.models import comment as models from aiida.common import exceptions, lang from aiida.orm.implementation.comments import BackendComment, BackendCommentCollection diff --git a/aiida/backends/sqlalchemy/orm/computers.py b/aiida/backends/psql_dos/orm/computers.py similarity index 98% rename from aiida/backends/sqlalchemy/orm/computers.py rename to aiida/backends/psql_dos/orm/computers.py index 8f0af6c220..8dc8f0ca50 100644 --- a/aiida/backends/sqlalchemy/orm/computers.py +++ b/aiida/backends/psql_dos/orm/computers.py @@ -15,7 +15,7 @@ from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.session import make_transient -from aiida.backends.sqlalchemy.models.computer import DbComputer +from aiida.backends.psql_dos.models.computer import DbComputer from aiida.common import exceptions from aiida.orm.implementation.computers import BackendComputer, BackendComputerCollection diff --git a/aiida/backends/sqlalchemy/orm/convert.py b/aiida/backends/psql_dos/orm/convert.py similarity index 87% rename from aiida/backends/sqlalchemy/orm/convert.py rename to aiida/backends/psql_dos/orm/convert.py index c49e86a14d..3b1dfa8417 100644 --- a/aiida/backends/sqlalchemy/orm/convert.py +++ b/aiida/backends/psql_dos/orm/convert.py @@ -12,13 +12,13 @@ """ from functools import singledispatch -from aiida.backends.sqlalchemy.models.authinfo import DbAuthInfo -from aiida.backends.sqlalchemy.models.comment import DbComment -from aiida.backends.sqlalchemy.models.computer import DbComputer -from aiida.backends.sqlalchemy.models.group import DbGroup -from aiida.backends.sqlalchemy.models.log import DbLog -from aiida.backends.sqlalchemy.models.node import DbLink, DbNode -from aiida.backends.sqlalchemy.models.user import DbUser +from aiida.backends.psql_dos.models.authinfo import DbAuthInfo +from aiida.backends.psql_dos.models.comment import DbComment +from aiida.backends.psql_dos.models.computer import DbComputer +from aiida.backends.psql_dos.models.group import DbGroup +from aiida.backends.psql_dos.models.log import DbLog +from aiida.backends.psql_dos.models.node import DbLink, DbNode +from aiida.backends.psql_dos.models.user import DbUser # pylint: disable=cyclic-import diff --git a/aiida/backends/sqlalchemy/orm/entities.py b/aiida/backends/psql_dos/orm/entities.py similarity index 98% rename from aiida/backends/sqlalchemy/orm/entities.py rename to aiida/backends/psql_dos/orm/entities.py index 6faaee96a5..0a09fb075e 100644 --- a/aiida/backends/sqlalchemy/orm/entities.py +++ b/aiida/backends/psql_dos/orm/entities.py @@ -10,7 +10,7 @@ """Classes and methods for Django specific backend entities""" from typing import Generic, Set, TypeVar -from aiida.backends.sqlalchemy.models.base import Base +from aiida.backends.psql_dos.models.base import Base from aiida.common.lang import type_check from . import utils diff --git a/aiida/backends/sqlalchemy/orm/extras_mixin.py b/aiida/backends/psql_dos/orm/extras_mixin.py similarity index 100% rename from aiida/backends/sqlalchemy/orm/extras_mixin.py rename to aiida/backends/psql_dos/orm/extras_mixin.py diff --git a/aiida/backends/sqlalchemy/orm/groups.py b/aiida/backends/psql_dos/orm/groups.py similarity index 97% rename from aiida/backends/sqlalchemy/orm/groups.py rename to aiida/backends/psql_dos/orm/groups.py index aba482c36b..9ce4448a4b 100644 --- a/aiida/backends/sqlalchemy/orm/groups.py +++ b/aiida/backends/psql_dos/orm/groups.py @@ -10,7 +10,7 @@ """SQLA groups""" import logging -from aiida.backends.sqlalchemy.models.group import DbGroup +from aiida.backends.psql_dos.models.group import DbGroup from aiida.common.exceptions import UniquenessError from aiida.common.lang import type_check from aiida.orm.implementation.groups import BackendGroup, BackendGroupCollection @@ -177,8 +177,8 @@ def add_nodes(self, nodes, **kwargs): from sqlalchemy.dialects.postgresql import insert # pylint: disable=import-error, no-name-in-module from sqlalchemy.exc import IntegrityError # pylint: disable=import-error, no-name-in-module - from aiida.backends.sqlalchemy.models.base import Base - from aiida.backends.sqlalchemy.orm.nodes import SqlaNode + from aiida.backends.psql_dos.models.base import Base + from aiida.backends.psql_dos.orm.nodes import SqlaNode super().add_nodes(nodes) skip_orm = kwargs.get('skip_orm', False) @@ -233,8 +233,8 @@ def remove_nodes(self, nodes, **kwargs): """ from sqlalchemy import and_ - from aiida.backends.sqlalchemy.models.base import Base - from aiida.backends.sqlalchemy.orm.nodes import SqlaNode + from aiida.backends.psql_dos.models.base import Base + from aiida.backends.psql_dos.orm.nodes import SqlaNode super().remove_nodes(nodes) diff --git a/aiida/backends/sqlalchemy/orm/logs.py b/aiida/backends/psql_dos/orm/logs.py similarity index 98% rename from aiida/backends/sqlalchemy/orm/logs.py rename to aiida/backends/psql_dos/orm/logs.py index 445c49b9f9..f7fa2f55e4 100644 --- a/aiida/backends/sqlalchemy/orm/logs.py +++ b/aiida/backends/psql_dos/orm/logs.py @@ -12,7 +12,7 @@ from sqlalchemy.orm.exc import NoResultFound -from aiida.backends.sqlalchemy.models import log as models +from aiida.backends.psql_dos.models import log as models from aiida.common import exceptions from aiida.orm.implementation import BackendLog, BackendLogCollection diff --git a/aiida/backends/sqlalchemy/orm/nodes.py b/aiida/backends/psql_dos/orm/nodes.py similarity index 98% rename from aiida/backends/sqlalchemy/orm/nodes.py rename to aiida/backends/psql_dos/orm/nodes.py index 99eee21d80..b0edd5d6ac 100644 --- a/aiida/backends/sqlalchemy/orm/nodes.py +++ b/aiida/backends/psql_dos/orm/nodes.py @@ -15,7 +15,7 @@ from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.exc import NoResultFound -from aiida.backends.sqlalchemy.models import node as models +from aiida.backends.psql_dos.models import node as models from aiida.common import exceptions from aiida.common.lang import type_check from aiida.orm.implementation import BackendNode, BackendNodeCollection @@ -195,7 +195,7 @@ def add_incoming(self, source, link_type, link_label): def _add_link(self, source, link_type, link_label): """Add a single link""" - from aiida.backends.sqlalchemy.models.node import DbLink + from aiida.backends.psql_dos.models.node import DbLink session = self.backend.get_session() diff --git a/aiida/backends/sqlalchemy/orm/querybuilder/__init__.py b/aiida/backends/psql_dos/orm/querybuilder/__init__.py similarity index 100% rename from aiida/backends/sqlalchemy/orm/querybuilder/__init__.py rename to aiida/backends/psql_dos/orm/querybuilder/__init__.py diff --git a/aiida/backends/sqlalchemy/orm/querybuilder/joiner.py b/aiida/backends/psql_dos/orm/querybuilder/joiner.py similarity index 99% rename from aiida/backends/sqlalchemy/orm/querybuilder/joiner.py rename to aiida/backends/psql_dos/orm/querybuilder/joiner.py index 449610d0e9..54adc819a3 100644 --- a/aiida/backends/sqlalchemy/orm/querybuilder/joiner.py +++ b/aiida/backends/psql_dos/orm/querybuilder/joiner.py @@ -19,7 +19,7 @@ from sqlalchemy.sql.schema import Table from sqlalchemy.types import Integer -from aiida.backends.sqlalchemy.models.base import Model +from aiida.backends.psql_dos.models.base import Model from aiida.common.links import LinkType diff --git a/aiida/backends/sqlalchemy/orm/querybuilder/main.py b/aiida/backends/psql_dos/orm/querybuilder/main.py similarity index 97% rename from aiida/backends/sqlalchemy/orm/querybuilder/main.py rename to aiida/backends/psql_dos/orm/querybuilder/main.py index a6dd7a4ede..31b097c3da 100644 --- a/aiida/backends/sqlalchemy/orm/querybuilder/main.py +++ b/aiida/backends/psql_dos/orm/querybuilder/main.py @@ -128,48 +128,48 @@ def set_field_mappings(self): @property def Node(self): - import aiida.backends.sqlalchemy.models.node - return aiida.backends.sqlalchemy.models.node.DbNode + import aiida.backends.psql_dos.models.node + return aiida.backends.psql_dos.models.node.DbNode @property def Link(self): - import aiida.backends.sqlalchemy.models.node - return aiida.backends.sqlalchemy.models.node.DbLink + import aiida.backends.psql_dos.models.node + return aiida.backends.psql_dos.models.node.DbLink @property def Computer(self): - import aiida.backends.sqlalchemy.models.computer - return aiida.backends.sqlalchemy.models.computer.DbComputer + import aiida.backends.psql_dos.models.computer + return aiida.backends.psql_dos.models.computer.DbComputer @property def User(self): - import aiida.backends.sqlalchemy.models.user - return aiida.backends.sqlalchemy.models.user.DbUser + import aiida.backends.psql_dos.models.user + return aiida.backends.psql_dos.models.user.DbUser @property def Group(self): - import aiida.backends.sqlalchemy.models.group - return aiida.backends.sqlalchemy.models.group.DbGroup + import aiida.backends.psql_dos.models.group + return aiida.backends.psql_dos.models.group.DbGroup @property def AuthInfo(self): - import aiida.backends.sqlalchemy.models.authinfo - return aiida.backends.sqlalchemy.models.authinfo.DbAuthInfo + import aiida.backends.psql_dos.models.authinfo + return aiida.backends.psql_dos.models.authinfo.DbAuthInfo @property def Comment(self): - import aiida.backends.sqlalchemy.models.comment - return aiida.backends.sqlalchemy.models.comment.DbComment + import aiida.backends.psql_dos.models.comment + return aiida.backends.psql_dos.models.comment.DbComment @property def Log(self): - import aiida.backends.sqlalchemy.models.log - return aiida.backends.sqlalchemy.models.log.DbLog + import aiida.backends.psql_dos.models.log + return aiida.backends.psql_dos.models.log.DbLog @property def table_groups_nodes(self): - import aiida.backends.sqlalchemy.models.group - return aiida.backends.sqlalchemy.models.group.table_groups_nodes + import aiida.backends.psql_dos.models.group + return aiida.backends.psql_dos.models.group.table_groups_nodes def get_session(self) -> Session: """ diff --git a/aiida/backends/sqlalchemy/orm/users.py b/aiida/backends/psql_dos/orm/users.py similarity index 97% rename from aiida/backends/sqlalchemy/orm/users.py rename to aiida/backends/psql_dos/orm/users.py index 32e672c44b..84115a15e5 100644 --- a/aiida/backends/sqlalchemy/orm/users.py +++ b/aiida/backends/psql_dos/orm/users.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """SQLA user""" -from aiida.backends.sqlalchemy.models.user import DbUser +from aiida.backends.psql_dos.models.user import DbUser from aiida.orm.implementation.users import BackendUser, BackendUserCollection from . import entities, utils diff --git a/aiida/backends/sqlalchemy/orm/utils.py b/aiida/backends/psql_dos/orm/utils.py similarity index 99% rename from aiida/backends/sqlalchemy/orm/utils.py rename to aiida/backends/psql_dos/orm/utils.py index aa85656409..91c09d02c3 100644 --- a/aiida/backends/sqlalchemy/orm/utils.py +++ b/aiida/backends/psql_dos/orm/utils.py @@ -20,7 +20,7 @@ from aiida.common import exceptions if TYPE_CHECKING: - from aiida.backends.sqlalchemy.backend import PsqlDosBackend + from aiida.backends.psql_dos.backend import PsqlDosBackend IMMUTABLE_MODEL_FIELDS = {'id', 'pk', 'uuid', 'node_type'} diff --git a/aiida/backends/sqlalchemy/utils.py b/aiida/backends/psql_dos/utils.py similarity index 99% rename from aiida/backends/sqlalchemy/utils.py rename to aiida/backends/psql_dos/utils.py index 10d2207f80..34af3b66ae 100644 --- a/aiida/backends/sqlalchemy/utils.py +++ b/aiida/backends/psql_dos/utils.py @@ -74,7 +74,7 @@ def flag_modified(instance, key): """ from sqlalchemy.orm.attributes import flag_modified as flag_modified_sqla - from aiida.backends.sqlalchemy.orm.utils import ModelWrapper + from aiida.backends.psql_dos.orm.utils import ModelWrapper if isinstance(instance, ModelWrapper): instance = instance._model # pylint: disable=protected-access diff --git a/aiida/cmdline/commands/cmd_devel.py b/aiida/cmdline/commands/cmd_devel.py index 29c3d8d2f7..4f81548dc2 100644 --- a/aiida/cmdline/commands/cmd_devel.py +++ b/aiida/cmdline/commands/cmd_devel.py @@ -102,7 +102,7 @@ def devel_run_sql(sql): """Run a raw SQL command on the profile database (only available for 'psql_dos' storage).""" from sqlalchemy import text - from aiida.backends.sqlalchemy.utils import create_sqlalchemy_engine + from aiida.backends.psql_dos.utils import create_sqlalchemy_engine assert get_profile().storage_backend == 'psql_dos' with create_sqlalchemy_engine(get_profile().storage_config).connect() as connection: result = connection.execute(text(sql)).fetchall() diff --git a/aiida/manage/configuration/__init__.py b/aiida/manage/configuration/__init__.py index 7309d4695b..095c3546d6 100644 --- a/aiida/manage/configuration/__init__.py +++ b/aiida/manage/configuration/__init__.py @@ -248,7 +248,7 @@ def load_documentation_profile(): """ import tempfile - from aiida.backends.sqlalchemy.models.base import get_orm_metadata + from aiida.backends.psql_dos.models.base import get_orm_metadata from .config import Config diff --git a/aiida/manage/configuration/profile.py b/aiida/manage/configuration/profile.py index 36e62928ef..2d56e232a4 100644 --- a/aiida/manage/configuration/profile.py +++ b/aiida/manage/configuration/profile.py @@ -124,7 +124,7 @@ def set_storage(self, name: str, config: Dict[str, Any]) -> None: def storage_cls(self) -> Type['Backend']: """Return the storage backend class for this profile.""" if self.storage_backend == 'psql_dos': - from aiida.backends.sqlalchemy.backend import PsqlDosBackend + from aiida.backends.psql_dos.backend import PsqlDosBackend return PsqlDosBackend if self.storage_backend == 'archive.sqlite': from aiida.tools.archive.implementations.sqlite.backend import ArchiveReadOnlyBackend diff --git a/aiida/tools/archive/implementations/sqlite/backend.py b/aiida/tools/archive/implementations/sqlite/backend.py index c8fada42bb..4663c826f2 100644 --- a/aiida/tools/archive/implementations/sqlite/backend.py +++ b/aiida/tools/archive/implementations/sqlite/backend.py @@ -25,10 +25,10 @@ from sqlalchemy.sql.schema import Table # we need to import all models, to ensure they are loaded on the SQLA Metadata -from aiida.backends.sqlalchemy.models import authinfo, base, comment, computer, group, log, node, user -from aiida.backends.sqlalchemy.orm import authinfos, comments, computers, entities, groups, logs, nodes, users -from aiida.backends.sqlalchemy.orm.querybuilder import SqlaQueryBuilder -from aiida.backends.sqlalchemy.orm.utils import ModelWrapper +from aiida.backends.psql_dos.models import authinfo, base, comment, computer, group, log, node, user +from aiida.backends.psql_dos.orm import authinfos, comments, computers, entities, groups, logs, nodes, users +from aiida.backends.psql_dos.orm.querybuilder import SqlaQueryBuilder +from aiida.backends.psql_dos.orm.utils import ModelWrapper from aiida.common.exceptions import UnreachableStorage from aiida.manage import Profile from aiida.orm.entities import EntityTypes diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py index bd70cec9da..721bc12087 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py @@ -19,7 +19,7 @@ And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.sqlalchemy.migrations.versions._.py` + `aiida.backends.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py index aa065f180b..275211d9f0 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py @@ -19,7 +19,7 @@ And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.sqlalchemy.migrations.versions._.py` + `aiida.backends.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ @@ -98,7 +98,7 @@ def migration_migrate_legacy_job_calculation_data(data): `process_status`. These are inferred from the old `state` attribute, which is then discarded as its values have been deprecated. """ - from aiida.backends.sqlalchemy.migrations.utils.calc_state import STATE_MAPPING + from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING calc_job_node_type = 'process.calculation.calcjob.CalcJobNode.' node_data = data['export_data'].get('Node', {}) diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py index 4479b9f4ea..962f6f6969 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py @@ -19,7 +19,7 @@ And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.sqlalchemy.migrations.versions._.py` + `aiida.backends.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ @@ -52,7 +52,7 @@ def data_migration_legacy_process_attributes(data): the ProcessNode is in an active state, i.e. `process_state` is one of ('created', 'running', 'waiting'). A log-file, listing all illegal ProcessNodes, will be produced in the current directory. """ - from aiida.backends.sqlalchemy.migrations.utils.integrity import write_database_integrity_violation + from aiida.backends.psql_dos.migrations.utils.integrity import write_database_integrity_violation from aiida.tools.archive.exceptions import CorruptArchive attrs_to_remove = ['_sealed', '_finished', '_failed', '_aborted', '_do_abort'] diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py index 4fea760391..2f07fcae23 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py @@ -19,7 +19,7 @@ And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.sqlalchemy.migrations.versions._.py` + `aiida.backends.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py index 7da9bbe8ea..639a1c5aa4 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py @@ -19,7 +19,7 @@ And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.sqlalchemy.migrations.versions._.py` + `aiida.backends.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ diff --git a/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py b/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py index 8fb14e3c28..2c17a59cce 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py @@ -10,7 +10,7 @@ """This is the sqlite DB schema, coresponding to the 34a831f4286d main DB revision. For normal operation of the archive, -we auto-generate the schema from the models in ``aiida.backends.sqlalchemy.models``. +we auto-generate the schema from the models in ``aiida.backends.psql_dos.models``. However, when migrating an archive from the old format, we require a fixed revision of the schema. The only difference between the PostGreSQL schema and SQLite one, diff --git a/docs/source/internals/database.rst b/docs/source/internals/database.rst index f7a884e97a..9cdbfa893d 100644 --- a/docs/source/internals/database.rst +++ b/docs/source/internals/database.rst @@ -96,25 +96,25 @@ The following section provides a complete schema for each of the tables of the S ``*`` indicates columns with a unique constraint, ``→`` indicate foreign keys, and ``?`` indicate value types that are nullable. -.. sqla-model:: ~aiida.backends.sqlalchemy.models.node.DbNode +.. sqla-model:: ~aiida.backends.psql_dos.models.node.DbNode -.. sqla-model:: ~aiida.backends.sqlalchemy.models.node.DbLink +.. sqla-model:: ~aiida.backends.psql_dos.models.node.DbLink -.. sqla-model:: ~aiida.backends.sqlalchemy.models.group.DbGroup +.. sqla-model:: ~aiida.backends.psql_dos.models.group.DbGroup -.. sqla-model:: ~aiida.backends.sqlalchemy.models.group.DbGroupNode +.. sqla-model:: ~aiida.backends.psql_dos.models.group.DbGroupNode -.. sqla-model:: ~aiida.backends.sqlalchemy.models.user.DbUser +.. sqla-model:: ~aiida.backends.psql_dos.models.user.DbUser -.. sqla-model:: ~aiida.backends.sqlalchemy.models.computer.DbComputer +.. sqla-model:: ~aiida.backends.psql_dos.models.computer.DbComputer -.. sqla-model:: ~aiida.backends.sqlalchemy.models.authinfo.DbAuthInfo +.. sqla-model:: ~aiida.backends.psql_dos.models.authinfo.DbAuthInfo -.. sqla-model:: ~aiida.backends.sqlalchemy.models.comment.DbComment +.. sqla-model:: ~aiida.backends.psql_dos.models.comment.DbComment -.. sqla-model:: ~aiida.backends.sqlalchemy.models.log.DbLog +.. sqla-model:: ~aiida.backends.psql_dos.models.log.DbLog -.. sqla-model:: ~aiida.backends.sqlalchemy.models.settings.DbSetting +.. sqla-model:: ~aiida.backends.psql_dos.models.settings.DbSetting Sequence tables diff --git a/docs/source/nitpick-exceptions b/docs/source/nitpick-exceptions index 3fe7361cf8..bc87aa31aa 100644 --- a/docs/source/nitpick-exceptions +++ b/docs/source/nitpick-exceptions @@ -50,6 +50,8 @@ py:class IO py:class QueryBuilder py:class SelfType py:class Profile +py:class PsqlDosBackend +py:class str | list[str] ### AiiDA @@ -201,6 +203,7 @@ py:class uuid.UUID py:class psycopg2.extensions.cursor py:class alembic.config.Config +py:class alembic.op py:class alembic.runtime.migration.MigrationContext py:class pgsu.PGSU diff --git a/tests/backends/aiida_sqlalchemy/__init__.py b/tests/backends/psql_dos/__init__.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/__init__.py rename to tests/backends/psql_dos/__init__.py diff --git a/tests/backends/aiida_sqlalchemy/conftest.py b/tests/backends/psql_dos/conftest.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/conftest.py rename to tests/backends/psql_dos/conftest.py diff --git a/tests/backends/aiida_sqlalchemy/migrations/__init__.py b/tests/backends/psql_dos/migrations/__init__.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/__init__.py rename to tests/backends/psql_dos/migrations/__init__.py diff --git a/tests/backends/aiida_sqlalchemy/migrations/conftest.py b/tests/backends/psql_dos/migrations/conftest.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/conftest.py rename to tests/backends/psql_dos/migrations/conftest.py index 4890bd2d2f..2ed08ca228 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/conftest.py +++ b/tests/backends/psql_dos/migrations/conftest.py @@ -15,8 +15,8 @@ import pytest from sqlalchemy import text -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator -from aiida.backends.sqlalchemy.utils import create_sqlalchemy_engine +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.utils import create_sqlalchemy_engine from aiida.manage.configuration import Profile diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/__init__.py b/tests/backends/psql_dos/migrations/django_branch/__init__.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/__init__.py rename to tests/backends/psql_dos/migrations/django_branch/__init__.py diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0024_dblog_update.py b/tests/backends/psql_dos/migrations/django_branch/test_0024_dblog_update.py similarity index 99% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0024_dblog_update.py rename to tests/backends/psql_dos/migrations/django_branch/test_0024_dblog_update.py index 1d007ef2fe..89d4167c9a 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0024_dblog_update.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0024_dblog_update.py @@ -10,7 +10,7 @@ """Test the update to the ``DbLog`` table.""" import json -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0026_0027_traj_data.py b/tests/backends/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py similarity index 95% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0026_0027_traj_data.py rename to tests/backends/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py index df64fb33a5..2a8e6c5eee 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0026_0027_traj_data.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py @@ -11,9 +11,9 @@ import numpy import pytest -from aiida.backends.sqlalchemy.migrations.utils import utils -from aiida.backends.sqlalchemy.migrations.utils.create_dbattribute import create_rows -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrations.utils import utils +from aiida.backends.psql_dos.migrations.utils.create_dbattribute import create_rows +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0028_0029_node_type.py b/tests/backends/psql_dos/migrations/django_branch/test_0028_0029_node_type.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0028_0029_node_type.py rename to tests/backends/psql_dos/migrations/django_branch/test_0028_0029_node_type.py index cedd36474c..65bc00e831 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0028_0029_node_type.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0028_0029_node_type.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test alterations to `db_dbnode.type`values.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0032_remove_legacy_workflows.py b/tests/backends/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0032_remove_legacy_workflows.py rename to tests/backends/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py index aefee23b34..8093c480d6 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0032_remove_legacy_workflows.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test removing legacy workflows.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0033_replace_text_field_with_json_field.py b/tests/backends/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0033_replace_text_field_with_json_field.py rename to tests/backends/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py index d3fd301177..c6397d180a 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0033_replace_text_field_with_json_field.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration adding the `repository_metadata` column to the `Node` model.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import json, timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0037_attributes_extras_settings_json.py b/tests/backends/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0037_attributes_extras_settings_json.py rename to tests/backends/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py index f507951f11..f44189aa5c 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0037_attributes_extras_settings_json.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py @@ -10,7 +10,7 @@ """Tests for the migrations of the attributes, extras and settings from EAV to JSONB.""" from sqlalchemy import select -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py b/tests/backends/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py similarity index 94% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py rename to tests/backends/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py index 56f73c6671..2c446b91c1 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py @@ -12,8 +12,8 @@ from uuid import uuid4 -from aiida.backends.sqlalchemy.migrations.utils.calc_state import STATE_MAPPING, StateMapping -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING, StateMapping +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0039_reset_hash.py b/tests/backends/psql_dos/migrations/django_branch/test_0039_reset_hash.py similarity index 96% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0039_reset_hash.py rename to tests/backends/psql_dos/migrations/django_branch/test_0039_reset_hash.py index 822a9eba49..5e47a53d21 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0039_reset_hash.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0039_reset_hash.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test the node hash reset.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py b/tests/backends/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py rename to tests/backends/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py index 0d9609e2f4..9f7a247aa3 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py @@ -10,7 +10,7 @@ """Tests the database migration of legacy process attributes.""" from uuid import uuid4 -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0041_seal_unsealed_processes.py b/tests/backends/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0041_seal_unsealed_processes.py rename to tests/backends/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py index 642f2129ce..4d955548a7 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0041_seal_unsealed_processes.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py @@ -10,7 +10,7 @@ """Test sealing of unsealed processes.""" from uuid import uuid4 -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0043_default_link_label.py b/tests/backends/psql_dos/migrations/django_branch/test_0043_default_link_label.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0043_default_link_label.py rename to tests/backends/psql_dos/migrations/django_branch/test_0043_default_link_label.py index cc11314466..729404cfec 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0043_default_link_label.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0043_default_link_label.py @@ -10,7 +10,7 @@ """Test update of link labels.""" from uuid import uuid4 -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0044_dbgroup_type_string.py b/tests/backends/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0044_dbgroup_type_string.py rename to tests/backends/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py index 5b12bf8a32..16f1bbaf70 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0044_dbgroup_type_string.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py @@ -10,7 +10,7 @@ """Test migration of `type_string` after the `Group` class became pluginnable.""" from uuid import uuid4 -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0045_dbgroup_extras.py b/tests/backends/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py similarity index 96% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0045_dbgroup_extras.py rename to tests/backends/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py index 6d4c953e3c..4408988708 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0045_dbgroup_extras.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py @@ -10,7 +10,7 @@ """Test migration to add the `extras` JSONB column to the `DbGroup` model.""" from uuid import uuid4 -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0046_add_node_repository_metadata.py b/tests/backends/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py similarity index 96% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0046_add_node_repository_metadata.py rename to tests/backends/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py index b04b6245fa..a07592a523 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0046_add_node_repository_metadata.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration adding the `repository_metadata` column to the `Node` model.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0047_migrate_repository.py b/tests/backends/psql_dos/migrations/django_branch/test_0047_migrate_repository.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0047_migrate_repository.py rename to tests/backends/psql_dos/migrations/django_branch/test_0047_migrate_repository.py index da992d11a3..e3d49296ce 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0047_migrate_repository.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0047_migrate_repository.py @@ -12,8 +12,8 @@ import os from uuid import uuid4 -from aiida.backends.sqlalchemy.migrations.utils import utils -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrations.utils import utils +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone REPOSITORY_UUID_KEY = 'repository|uuid' diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0048_computer_name_to_label.py b/tests/backends/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py similarity index 96% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0048_computer_name_to_label.py rename to tests/backends/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py index 73d333bc85..2b8c8432f2 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0048_computer_name_to_label.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test the renaming of `name` to `label` for `db_dbcomputer`.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0049_entry_point_core_prefix.py b/tests/backends/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0049_entry_point_core_prefix.py rename to tests/backends/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py index da92af4c10..eeac51a81a 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0049_entry_point_core_prefix.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration that updates node types after `core.` prefix was added to entry point names.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0050_schema_parity.py b/tests/backends/psql_dos/migrations/django_branch/test_0050_schema_parity.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0050_schema_parity.py rename to tests/backends/psql_dos/migrations/django_branch/test_0050_schema_parity.py index e563b0f8e7..0f518fd6c9 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_0050_schema_parity.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_0050_schema_parity.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration that renames all index/constraint names, to have parity between django/sqlalchemy.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_legacy.py b/tests/backends/psql_dos/migrations/django_branch/test_legacy.py similarity index 99% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_legacy.py rename to tests/backends/psql_dos/migrations/django_branch/test_legacy.py index 782d8b174a..33bb995285 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_legacy.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_legacy.py @@ -20,7 +20,7 @@ """ import sqlalchemy as sa -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_v0x_django_0003(perform_migrations: PsqlDostoreMigrator, reflect_schema, data_regression): # pylint: disable=too-many-locals diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_legacy/test_v0x_django_0003.yml b/tests/backends/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_legacy/test_v0x_django_0003.yml rename to tests/backends/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_migrate_to_head.py b/tests/backends/psql_dos/migrations/django_branch/test_migrate_to_head.py similarity index 93% rename from tests/backends/aiida_sqlalchemy/migrations/django_branch/test_migrate_to_head.py rename to tests/backends/psql_dos/migrations/django_branch/test_migrate_to_head.py index 65f08c0e73..e96fab9663 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/django_branch/test_migrate_to_head.py +++ b/tests/backends/psql_dos/migrations/django_branch/test_migrate_to_head.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migrating from the base of the django branch, to the main head.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_migrate(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/__init__.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/__init__.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/__init__.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/__init__.py diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_10_group_update.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_10_group_update.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py index e5643b71f1..98baba91b4 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_10_group_update.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for group migrations: 118349c10896 -> 0edcdd5a30f0""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_group_typestring(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_11_v2_repository.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_11_v2_repository.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py index a7e7cb9be1..814859e95b 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_11_v2_repository.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py @@ -11,8 +11,8 @@ import hashlib import os -from aiida.backends.sqlalchemy.migrations.utils import utils -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrations.utils import utils +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py index 40d4c25fb9..389c5ade85 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py @@ -9,7 +9,7 @@ ########################################################################### """Tests for migrations to bring parity between SQLAlchemy and Django.""" # pylint: disable=invalid-name,too-many-locals,too-many-statements -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_non_nullable(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_1_provenance_redesign.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_1_provenance_redesign.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py index 6ddecd12fe..7fb7b7a97f 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_1_provenance_redesign.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for the provenance redesign: 140c971ae0a3 -> 239cea6d2452""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_provenance_redesign(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_2_group_renaming.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_2_group_renaming.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py index b10c08ea2e..e5e7b07a98 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_2_group_renaming.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test renaming of type strings: b8b23ddefad4 -> e72ad251bcdb""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_group_renaming(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py index 460584906d..83a6de948c 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests migration of the keys of certain attribute for ProcessNodes and CalcJobNodes: e72ad251bcdb -> 7ca08c391c49""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator KEY_RESOURCES_OLD = 'jobresource_params' KEY_RESOURCES_NEW = 'resources' diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_4_dblog_update.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_4_dblog_update.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py index c3d45bc6ad..0e10b3834a 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_4_dblog_update.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py @@ -13,8 +13,8 @@ import pytest from sqlalchemy import column -from aiida.backends.sqlalchemy.migrations.utils import dblog_update -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrations.utils import dblog_update +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator # The values that will be exported for the log records that will be deleted values_to_export = ('id', 'time', 'loggername', 'levelname', 'objpk', 'objname', 'message', 'metadata') @@ -28,7 +28,7 @@ class TestDbLogMigrationRecordCleaning: @pytest.fixture(autouse=True) def setup_db(self, perform_migrations: PsqlDostoreMigrator): # pylint: disable=too-many-locals,too-many-statements """Setup the database schema.""" - from aiida.backends.sqlalchemy.migrations.utils.utils import dumps_json + from aiida.backends.psql_dos.migrations.utils.utils import dumps_json self.migrator = perform_migrations diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_5_data_move_with_node.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_5_data_move_with_node.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py index 52086a591a..1e72c764ba 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_5_data_move_with_node.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests 041a79fc615f -> 6a5c2ea1439d""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_data_move_with_node(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_6_trajectory_data.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py similarity index 95% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_6_trajectory_data.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py index a51c912132..fe97ae105e 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_6_trajectory_data.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py @@ -11,9 +11,9 @@ import numpy as np import pytest -from aiida.backends.sqlalchemy.migrations.utils import utils -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator -from aiida.backends.sqlalchemy.utils import flag_modified +from aiida.backends.psql_dos.migrations.utils import utils +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.utils import flag_modified def set_node_array(node, repo_path, name, array): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py index c9424e47b9..75f7f28948 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests ce56d84bcc35 -> 61fc0913fae9""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_node_prefix_removal(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py similarity index 96% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py index 482865a312..123bb2ef4e 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests 61fc0913fae9 -> d254fdfed416""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_parameter_data_to_dict(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_9_legacy_process.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_9_legacy_process.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py index 64c33118a3..fb9b2283c4 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_9_legacy_process.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for legacy process migrations: 07fac78e6209 -> 118349c10896""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_legacy_jobcalcstate_data(perform_migrations: PsqlDostoreMigrator): @@ -16,7 +16,7 @@ def test_legacy_jobcalcstate_data(perform_migrations: PsqlDostoreMigrator): Verify that the `process_state`, `process_status` and `exit_status` are set correctly. """ - from aiida.backends.sqlalchemy.migrations.utils.calc_state import STATE_MAPPING + from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING # starting revision perform_migrations.migrate_up('sqlalchemy@07fac78e6209') diff --git a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_migrate_to_head.py b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py similarity index 93% rename from tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_migrate_to_head.py rename to tests/backends/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py index f35ec554e8..27eab2acbe 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/sqlalchemy_branch/test_migrate_to_head.py +++ b/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migrating from the base of the sqlalchemy branch, to the main head.""" -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator def test_migrate(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema.py b/tests/backends/psql_dos/migrations/test_all_schema.py similarity index 97% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema.py rename to tests/backends/psql_dos/migrations/test_all_schema.py index db0234c3d3..615e4bce63 100644 --- a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema.py +++ b/tests/backends/psql_dos/migrations/test_all_schema.py @@ -10,7 +10,7 @@ """Basic tests for all migrations""" import pytest -from aiida.backends.sqlalchemy.migrator import PsqlDostoreMigrator +from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator @pytest.mark.parametrize('version', list(v for v in PsqlDostoreMigrator.get_schema_versions() if v.startswith('main'))) diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0001_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0001_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0002_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0002_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0003_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0003_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0004_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0004_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0005_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0005_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0006_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0006_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0007_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0007_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0008_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0008_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0009_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0009_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0010_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0010_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0011_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0011_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0012_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0012_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0013_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0013_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0014_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0014_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0015_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0015_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0016_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0016_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0017_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0017_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0018_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0018_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0019_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0019_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0020_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0020_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0021_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0021_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0022_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0022_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0023_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0023_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0024_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0024_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0024a_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0024a_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0025_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0025_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0026_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0026_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0027_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0027_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0028_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0028_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0029_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0029_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0030_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0030_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0031_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0031_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0032_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0032_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0033_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0033_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0034_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0034_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0035_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0035_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0036_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0036_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0037_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0037_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0038_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0038_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0039_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0039_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0040_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0040_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0041_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0041_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0042_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0042_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0043_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0043_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0044_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0044_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0045_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0045_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0046_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0046_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0047_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0047_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0048_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0048_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0049_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0049_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0050_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_django_django_0050_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_main_main_0001_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_main_main_0001_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_3_89176227b25_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_3_89176227b25_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_41_118349c10896_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_41_118349c10896_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml diff --git a/tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml b/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml similarity index 100% rename from tests/backends/aiida_sqlalchemy/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml rename to tests/backends/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml diff --git a/tests/backends/aiida_sqlalchemy/test_alembic_cli.py b/tests/backends/psql_dos/test_alembic_cli.py similarity index 93% rename from tests/backends/aiida_sqlalchemy/test_alembic_cli.py rename to tests/backends/psql_dos/test_alembic_cli.py index 1585817981..2254734a10 100644 --- a/tests/backends/aiida_sqlalchemy/test_alembic_cli.py +++ b/tests/backends/psql_dos/test_alembic_cli.py @@ -10,7 +10,7 @@ """Basic tests for the alembic_cli module.""" from click.testing import CliRunner -from aiida.backends.sqlalchemy.alembic_cli import alembic_cli +from aiida.backends.psql_dos.alembic_cli import alembic_cli def test_history(): diff --git a/tests/backends/aiida_sqlalchemy/test_nodes.py b/tests/backends/psql_dos/test_nodes.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/test_nodes.py rename to tests/backends/psql_dos/test_nodes.py index 67855a66ed..c25a7801ee 100644 --- a/tests/backends/aiida_sqlalchemy/test_nodes.py +++ b/tests/backends/psql_dos/test_nodes.py @@ -73,7 +73,7 @@ def test_multiple_node_creation(self): (and subsequently committed) when a user is in the session. It tests the fix for the issue #234 """ - from aiida.backends.sqlalchemy.models.node import DbNode + from aiida.backends.psql_dos.models.node import DbNode from aiida.common.utils import get_new_uuid # Get the automatic user diff --git a/tests/backends/aiida_sqlalchemy/test_query.py b/tests/backends/psql_dos/test_query.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/test_query.py rename to tests/backends/psql_dos/test_query.py diff --git a/tests/backends/aiida_sqlalchemy/test_schema.py b/tests/backends/psql_dos/test_schema.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/test_schema.py rename to tests/backends/psql_dos/test_schema.py index 17ecce6bff..426a5cea41 100644 --- a/tests/backends/aiida_sqlalchemy/test_schema.py +++ b/tests/backends/psql_dos/test_schema.py @@ -13,8 +13,8 @@ from sqlalchemy import exc as sa_exc -from aiida.backends.sqlalchemy.models.node import DbNode -from aiida.backends.sqlalchemy.models.user import DbUser +from aiida.backends.psql_dos.models.node import DbNode +from aiida.backends.psql_dos.models.user import DbUser from aiida.backends.testbase import AiidaTestCase from aiida.common.links import LinkType from aiida.common.utils import get_new_uuid diff --git a/tests/backends/aiida_sqlalchemy/test_session.py b/tests/backends/psql_dos/test_session.py similarity index 98% rename from tests/backends/aiida_sqlalchemy/test_session.py rename to tests/backends/psql_dos/test_session.py index a870574034..35d537f93c 100644 --- a/tests/backends/aiida_sqlalchemy/test_session.py +++ b/tests/backends/psql_dos/test_session.py @@ -12,7 +12,7 @@ import pytest from sqlalchemy.orm import sessionmaker -from aiida.backends.sqlalchemy.utils import create_scoped_session_factory +from aiida.backends.psql_dos.utils import create_scoped_session_factory class TestSessionSqla: @@ -142,7 +142,7 @@ def test_node_access_with_sessions(self): Tests for bug #1372 """ - import aiida.backends.sqlalchemy as sa + import aiida.backends.psql_dos as sa from aiida.common import timezone session = sessionmaker(bind=self.backend.get_session().bind, future=True) diff --git a/tests/backends/aiida_sqlalchemy/test_utils.py b/tests/backends/psql_dos/test_utils.py similarity index 100% rename from tests/backends/aiida_sqlalchemy/test_utils.py rename to tests/backends/psql_dos/test_utils.py diff --git a/tests/cmdline/commands/test_status.py b/tests/cmdline/commands/test_status.py index f1ba4868df..33cd62b50c 100644 --- a/tests/cmdline/commands/test_status.py +++ b/tests/cmdline/commands/test_status.py @@ -11,7 +11,7 @@ import pytest from aiida import __version__, get_profile -from aiida.backends.sqlalchemy import migrator +from aiida.backends.psql_dos import migrator from aiida.cmdline.commands import cmd_status from aiida.cmdline.utils.echo import ExitCode diff --git a/tests/tools/archive/migration/test_v05_to_v06.py b/tests/tools/archive/migration/test_v05_to_v06.py index 411b57dcca..ce74f0f1c5 100644 --- a/tests/tools/archive/migration/test_v05_to_v06.py +++ b/tests/tools/archive/migration/test_v05_to_v06.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test archive file migration from export version 0.5 to 0.6""" -from aiida.backends.sqlalchemy.migrations.utils.calc_state import STATE_MAPPING +from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING from aiida.tools.archive.implementations.sqlite.migrations.legacy import migrate_v5_to_v6 from aiida.tools.archive.implementations.sqlite.migrations.utils import verify_metadata_version from tests.utils.archives import get_archive_file, read_json_files diff --git a/utils/make_all.py b/utils/make_all.py index 404cbd8aed..1c4b71b15a 100644 --- a/utils/make_all.py +++ b/utils/make_all.py @@ -157,7 +157,7 @@ def write_inits(folder_path: str, all_dict: dict, skip_children: Dict[str, List[ # skipped since this is for testing only not general use 'manage': ['tests'], # skipped since we don't want to expose the implementation at the top-level - 'backends': ['sqlalchemy'], + 'backends': ['psql_dos'], 'orm': ['implementation'], # skip all since the module requires extra requirements 'restapi': ['*'], From e58f51f1f29b37f75f1b0c57c9d1ded7a9518752 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 18 Feb 2022 11:53:42 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20REFACTOR:=20`aiida.bac?= =?UTF-8?q?kends`=20->=20`aiida.storage`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 8 ++--- CHANGELOG.md | 2 +- aiida/cmdline/commands/cmd_devel.py | 2 +- aiida/cmdline/commands/cmd_storage.py | 4 +-- aiida/common/utils.py | 2 -- aiida/manage/configuration/__init__.py | 2 +- aiida/manage/configuration/profile.py | 2 +- aiida/manage/tests/main.py | 2 +- aiida/repository/backend/disk_object_store.py | 2 +- aiida/{backends => storage}/__init__.py | 0 aiida/{backends => storage}/control.py | 0 .../psql_dos/__init__.py | 0 .../psql_dos/alembic_cli.py | 2 +- .../{backends => storage}/psql_dos/backend.py | 32 ++++++++--------- .../psql_dos/migrations/__init__.py | 0 .../psql_dos/migrations/env.py | 18 +++++----- .../psql_dos/migrations/script.py.mako | 0 .../psql_dos/migrations/utils/__init__.py | 0 .../psql_dos/migrations/utils/calc_state.py | 0 .../migrations/utils/create_dbattribute.py | 0 .../psql_dos/migrations/utils/dblog_update.py | 0 .../migrations/utils/duplicate_uuids.py | 0 .../psql_dos/migrations/utils/integrity.py | 0 .../migrations/utils/legacy_workflows.py | 0 .../migrations/utils/migrate_repository.py | 4 +-- .../psql_dos/migrations/utils/parity.py | 4 +-- .../migrations/utils/provenance_redesign.py | 0 .../psql_dos/migrations/utils/reflect.py | 0 .../psql_dos/migrations/utils/utils.py | 0 .../versions/041a79fc615f_dblog_cleaning.py | 2 +- ...c78e6209_drop_computer_transport_params.py | 0 ...ebbeab274d_base_data_plugin_type_string.py | 0 .../versions/0edcdd5a30f0_dbgroup_extras.py | 0 .../118349c10896_default_link_label.py | 0 ...798d4d3_trajectory_symbols_to_attribute.py | 2 +- ...0c971ae0a3_migrate_builtin_calculations.py | 0 .../versions/162b99bca4a2_drop_dbcalcstate.py | 0 ...31_drop_node_columns_nodeversion_public.py | 0 .../1b8ed3425af9_remove_legacy_workflows.py | 2 +- .../versions/1de112340b16_django_parity_1.py | 0 .../versions/1de112340b17_django_parity_2.py | 0 .../versions/1de112340b18_django_parity_3.py | 2 +- .../1feaea71bd5a_migrate_repository.py | 2 +- .../239cea6d2452_provenance_redesign.py | 2 +- ..._data_migration_legacy_job_calculations.py | 0 .../34a831f4286d_entry_point_core_prefix.py | 0 .../35d4ee9a1b0e_code_hidden_attr_to_extra.py | 0 ...b70663_dblog_uuid_uniqueness_constraint.py | 0 ...f3d4882837_make_all_uuid_columns_unique.py | 2 +- .../3d6190594e19_remove_dbcomputer_enabled.py | 0 .../535039300e4a_computer_name_to_label.py | 0 ..._adding_indexes_and_constraints_to_the_.py | 0 .../versions/5a49629f0d45_dblink_indices.py | 0 .../5d4d844852b6_invalidating_node_hash.py | 0 ...4e52864_dbnode_type_to_dbnode_node_type.py | 0 .../61fc0913fae9_remove_node_prefix.py | 0 ...d36de90_add_node_uuid_unique_constraint.py | 2 +- ...5c2ea1439d_move_data_within_node_module.py | 0 .../versions/6c629c886f84_process_type.py | 0 .../versions/70c7d732f1b2_delete_dbpath.py | 0 ...36a82b2cc4_add_node_repository_metadata.py | 0 ..._unique_constraints_for_the_db_dbgroup_.py | 0 .../7b38a9e783e7_seal_unsealed_processes.py | 0 ...8c391c49_calc_job_option_attribute_keys.py | 0 ...b25_add_indexes_to_dbworkflowdata_table.py | 0 .../91b573400be5_prepare_schema_reset.py | 0 .../psql_dos/migrations/versions/__init__.py | 0 .../versions/a514d673c163_drop_dblock.py | 0 .../a603da2cc809_code_sub_class_of_data.py | 0 .../versions/a6048f0ffca8_update_linktypes.py | 0 ...group_name_to_label_type_to_type_string.py | 0 .../bf591f31dd12_dbgroup_type_string.py | 0 ...84bcc35_delete_trajectory_symbols_array.py | 2 +- ...4fdfed416_rename_parameter_data_to_dict.py | 0 .../de2eaf6978b4_simplify_user_model.py | 0 .../versions/django_0001_initial.py | 0 .../versions/django_0002_db_state_change.py | 0 .../versions/django_0003_add_link_type.py | 2 +- ...django_0004_add_daemon_and_uuid_indices.py | 0 .../django_0005_add_cmtime_indices.py | 0 .../versions/django_0006_delete_dbpath.py | 0 .../versions/django_0007_update_linktypes.py | 0 .../django_0008_code_hidden_to_extra.py | 0 ...jango_0009_base_data_plugin_type_string.py | 0 .../versions/django_0010_process_type.py | 0 .../django_0011_delete_kombu_tables.py | 0 .../versions/django_0012_drop_dblock.py | 0 .../versions/django_0013_django_1_8.py | 2 +- ...go_0014_add_node_uuid_unique_constraint.py | 2 +- .../django_0015_invalidating_node_hash.py | 0 .../django_0016_code_sub_class_of_data.py | 0 .../versions/django_0017_drop_dbcalcstate.py | 0 .../versions/django_0018_django_1_11.py | 4 +-- ...jango_0019_migrate_builtin_calculations.py | 0 .../django_0020_provenance_redesign.py | 2 +- ...group_name_to_label_type_to_type_string.py | 2 +- ...0022_dbgroup_type_string_change_content.py | 0 ...ngo_0023_calc_job_option_attribute_keys.py | 0 .../versions/django_0024a_dblog_update.py | 2 +- .../versions/django_0024b_dblog_update.py | 0 ...jango_0025_move_data_within_node_module.py | 0 ...go_0026_trajectory_symbols_to_attribute.py | 4 +-- ...go_0027_delete_trajectory_symbols_array.py | 2 +- .../django_0028_remove_node_prefix.py | 0 ...ango_0029_rename_parameter_data_to_dict.py | 0 ...go_0030_dbnode_type_to_dbnode_node_type.py | 0 .../django_0031_remove_dbcomputer_enabled.py | 0 .../django_0032_remove_legacy_workflows.py | 2 +- ...0033_replace_text_field_with_json_field.py | 0 ...34_drop_node_columns_nodeversion_public.py | 0 .../django_0035_simplify_user_model.py | 0 ...ngo_0036_drop_computer_transport_params.py | 0 ...go_0037_attributes_extras_settings_json.py | 2 +- ..._data_migration_legacy_job_calculations.py | 0 .../versions/django_0039_reset_hash.py | 2 +- ...ata_migration_legacy_process_attributes.py | 0 .../django_0041_seal_unsealed_processes.py | 0 .../django_0042_prepare_schema_reset.py | 0 .../django_0043_default_link_label.py | 0 .../django_0044_dbgroup_type_string.py | 0 .../versions/django_0045_dbgroup_extras.py | 0 ...jango_0046_add_node_repository_metadata.py | 0 .../django_0047_migrate_repository.py | 2 +- .../django_0048_computer_name_to_label.py | 2 +- .../django_0049_entry_point_core_prefix.py | 0 .../versions/django_0050_sqlalchemy_parity.py | 2 +- .../versions/e15ef2630a1b_initial_schema.py | 2 +- ...dbgroup_class_change_type_string_values.py | 0 ...ata_migration_legacy_process_attributes.py | 0 .../versions/e797afa09270_reset_hash.py | 2 +- .../ea2f50e7f615_dblog_create_uuid_column.py | 2 +- .../f9a69de76a9a_delete_kombu_tables.py | 0 .../migrations/versions/main_0001_initial.py | 0 .../psql_dos/migrator.py | 8 ++--- .../psql_dos/models/__init__.py | 0 .../psql_dos/models/authinfo.py | 0 .../psql_dos/models/base.py | 2 +- .../psql_dos/models/comment.py | 2 +- .../psql_dos/models/computer.py | 2 +- .../psql_dos/models/group.py | 0 .../psql_dos/models/log.py | 2 +- .../psql_dos/models/node.py | 2 +- .../psql_dos/models/settings.py | 2 +- .../psql_dos/models/user.py | 2 +- .../psql_dos/orm/__init__.py | 0 .../psql_dos/orm/authinfos.py | 2 +- .../psql_dos/orm/comments.py | 2 +- .../psql_dos/orm/computers.py | 2 +- .../psql_dos/orm/convert.py | 14 ++++---- .../psql_dos/orm/entities.py | 2 +- .../psql_dos/orm/extras_mixin.py | 0 .../psql_dos/orm/groups.py | 10 +++--- .../psql_dos/orm/logs.py | 2 +- .../psql_dos/orm/nodes.py | 4 +-- .../psql_dos/orm/querybuilder/__init__.py | 0 .../psql_dos/orm/querybuilder/joiner.py | 2 +- .../psql_dos/orm/querybuilder/main.py | 36 +++++++++---------- .../psql_dos/orm/users.py | 2 +- .../psql_dos/orm/utils.py | 2 +- aiida/{backends => storage}/psql_dos/utils.py | 2 +- aiida/{backends => storage}/testbase.py | 0 .../archive/implementations/sqlite/backend.py | 10 +++--- .../sqlite/migrations/legacy/v04_to_v05.py | 4 +-- .../sqlite/migrations/legacy/v05_to_v06.py | 6 ++-- .../sqlite/migrations/legacy/v06_to_v07.py | 6 ++-- .../sqlite/migrations/legacy/v07_to_v08.py | 4 +-- .../sqlite/migrations/legacy/v08_to_v09.py | 4 +-- .../sqlite/migrations/v1_db_schema.py | 2 +- docs/source/internals/database.rst | 20 +++++------ tests/cmdline/commands/test_calcjob.py | 2 +- tests/cmdline/commands/test_computer.py | 2 +- tests/cmdline/commands/test_data.py | 2 +- tests/cmdline/commands/test_group.py | 2 +- tests/cmdline/commands/test_help.py | 2 +- tests/cmdline/commands/test_node.py | 2 +- tests/cmdline/commands/test_process.py | 2 +- tests/cmdline/commands/test_profile.py | 2 +- tests/cmdline/commands/test_run.py | 2 +- tests/cmdline/commands/test_setup.py | 2 +- tests/cmdline/commands/test_status.py | 2 +- tests/cmdline/commands/test_storage.py | 2 +- tests/cmdline/commands/test_user.py | 2 +- .../cmdline/params/types/test_calculation.py | 2 +- tests/cmdline/params/types/test_data.py | 2 +- tests/cmdline/params/types/test_identifier.py | 2 +- tests/cmdline/params/types/test_node.py | 2 +- tests/cmdline/params/types/test_path.py | 2 +- tests/cmdline/params/types/test_plugin.py | 2 +- tests/common/test_hashing.py | 2 +- tests/common/test_links.py | 2 +- tests/engine/daemon/test_client.py | 2 +- .../processes/calcjobs/test_calc_job.py | 2 +- .../engine/processes/workchains/test_utils.py | 2 +- tests/engine/test_calcfunctions.py | 2 +- tests/engine/test_class_loader.py | 2 +- tests/engine/test_futures.py | 2 +- tests/engine/test_launch.py | 2 +- tests/engine/test_manager.py | 2 +- tests/engine/test_persistence.py | 2 +- tests/engine/test_ports.py | 2 +- tests/engine/test_process.py | 2 +- tests/engine/test_process_function.py | 2 +- tests/engine/test_process_spec.py | 2 +- tests/engine/test_rmq.py | 2 +- tests/engine/test_run.py | 2 +- tests/engine/test_transport.py | 2 +- tests/engine/test_utils.py | 2 +- tests/engine/test_work_chain.py | 2 +- tests/engine/test_workfunctions.py | 2 +- tests/manage/configuration/test_options.py | 2 +- tests/manage/configuration/test_profile.py | 2 +- tests/orm/implementation/test_comments.py | 2 +- tests/orm/implementation/test_logs.py | 2 +- tests/orm/implementation/test_nodes.py | 2 +- tests/orm/implementation/test_utils.py | 2 +- tests/orm/nodes/data/test_kpoints.py | 2 +- tests/orm/nodes/data/test_orbital.py | 2 +- tests/orm/nodes/data/test_trajectory.py | 2 +- tests/orm/nodes/data/test_upf.py | 2 +- tests/orm/nodes/test_calcjob.py | 2 +- tests/orm/test_authinfos.py | 2 +- tests/orm/test_comments.py | 2 +- tests/orm/test_computers.py | 2 +- tests/orm/test_entities.py | 2 +- tests/orm/test_groups.py | 2 +- tests/orm/test_logs.py | 2 +- tests/orm/test_mixins.py | 2 +- tests/orm/utils/test_loaders.py | 2 +- tests/orm/utils/test_node.py | 2 +- tests/parsers/test_parser.py | 2 +- tests/plugins/test_utils.py | 2 +- tests/restapi/test_routes.py | 2 +- tests/{backends => storage}/__init__.py | 0 .../psql_dos/__init__.py | 0 .../psql_dos/conftest.py | 0 .../psql_dos/migrations/__init__.py | 0 .../psql_dos/migrations/conftest.py | 4 +-- .../migrations/django_branch/__init__.py | 0 .../django_branch/test_0024_dblog_update.py | 2 +- .../django_branch/test_0026_0027_traj_data.py | 6 ++-- .../django_branch/test_0028_0029_node_type.py | 2 +- .../test_0032_remove_legacy_workflows.py | 2 +- ...0033_replace_text_field_with_json_field.py | 2 +- ...st_0037_attributes_extras_settings_json.py | 2 +- ..._data_migration_legacy_job_calculations.py | 4 +-- .../django_branch/test_0039_reset_hash.py | 2 +- ...ata_migration_legacy_process_attributes.py | 2 +- .../test_0041_seal_unsealed_processes.py | 2 +- .../test_0043_default_link_label.py | 2 +- .../test_0044_dbgroup_type_string.py | 2 +- .../django_branch/test_0045_dbgroup_extras.py | 2 +- .../test_0046_add_node_repository_metadata.py | 2 +- .../test_0047_migrate_repository.py | 4 +-- .../test_0048_computer_name_to_label.py | 2 +- .../test_0049_entry_point_core_prefix.py | 2 +- .../django_branch/test_0050_schema_parity.py | 2 +- .../migrations/django_branch/test_legacy.py | 2 +- .../test_legacy/test_v0x_django_0003.yml | 0 .../django_branch/test_migrate_to_head.py | 2 +- .../migrations/sqlalchemy_branch/__init__.py | 0 .../sqlalchemy_branch/test_10_group_update.py | 2 +- .../test_11_v2_repository.py | 4 +-- .../test_12_sqla_django_parity.py | 2 +- .../test_1_provenance_redesign.py | 2 +- .../test_2_group_renaming.py | 2 +- .../test_3_calc_attributes_keys.py | 2 +- .../sqlalchemy_branch/test_4_dblog_update.py | 6 ++-- .../test_5_data_move_with_node.py | 2 +- .../test_6_trajectory_data.py | 6 ++-- .../test_7_node_prefix_removal.py | 2 +- .../test_8_parameter_data_to_dict.py | 2 +- .../test_9_legacy_process.py | 4 +-- .../sqlalchemy_branch/test_migrate_to_head.py | 2 +- .../psql_dos/migrations/test_all_schema.py | 2 +- .../test_django_django_0001_.yml | 0 .../test_django_django_0002_.yml | 0 .../test_django_django_0003_.yml | 0 .../test_django_django_0004_.yml | 0 .../test_django_django_0005_.yml | 0 .../test_django_django_0006_.yml | 0 .../test_django_django_0007_.yml | 0 .../test_django_django_0008_.yml | 0 .../test_django_django_0009_.yml | 0 .../test_django_django_0010_.yml | 0 .../test_django_django_0011_.yml | 0 .../test_django_django_0012_.yml | 0 .../test_django_django_0013_.yml | 0 .../test_django_django_0014_.yml | 0 .../test_django_django_0015_.yml | 0 .../test_django_django_0016_.yml | 0 .../test_django_django_0017_.yml | 0 .../test_django_django_0018_.yml | 0 .../test_django_django_0019_.yml | 0 .../test_django_django_0020_.yml | 0 .../test_django_django_0021_.yml | 0 .../test_django_django_0022_.yml | 0 .../test_django_django_0023_.yml | 0 .../test_django_django_0024_.yml | 0 .../test_django_django_0024a_.yml | 0 .../test_django_django_0025_.yml | 0 .../test_django_django_0026_.yml | 0 .../test_django_django_0027_.yml | 0 .../test_django_django_0028_.yml | 0 .../test_django_django_0029_.yml | 0 .../test_django_django_0030_.yml | 0 .../test_django_django_0031_.yml | 0 .../test_django_django_0032_.yml | 0 .../test_django_django_0033_.yml | 0 .../test_django_django_0034_.yml | 0 .../test_django_django_0035_.yml | 0 .../test_django_django_0036_.yml | 0 .../test_django_django_0037_.yml | 0 .../test_django_django_0038_.yml | 0 .../test_django_django_0039_.yml | 0 .../test_django_django_0040_.yml | 0 .../test_django_django_0041_.yml | 0 .../test_django_django_0042_.yml | 0 .../test_django_django_0043_.yml | 0 .../test_django_django_0044_.yml | 0 .../test_django_django_0045_.yml | 0 .../test_django_django_0046_.yml | 0 .../test_django_django_0047_.yml | 0 .../test_django_django_0048_.yml | 0 .../test_django_django_0049_.yml | 0 .../test_django_django_0050_.yml | 0 .../test_all_schema/test_main_main_0001_.yml | 0 .../test_sqla_0_e15ef2630a1b_.yml | 0 .../test_sqla_10_59edaf8a8b79_.yml | 0 .../test_sqla_11_62fe0d36de90_.yml | 0 .../test_sqla_12_5d4d844852b6_.yml | 0 .../test_sqla_13_a603da2cc809_.yml | 0 .../test_sqla_14_162b99bca4a2_.yml | 0 .../test_sqla_15_140c971ae0a3_.yml | 0 .../test_sqla_16_239cea6d2452_.yml | 0 .../test_sqla_17_b8b23ddefad4_.yml | 0 .../test_sqla_18_e72ad251bcdb_.yml | 0 .../test_sqla_19_7ca08c391c49_.yml | 0 .../test_sqla_1_70c7d732f1b2_.yml | 0 .../test_sqla_20_041a79fc615f_.yml | 0 .../test_sqla_21_ea2f50e7f615_.yml | 0 .../test_sqla_22_375c2db70663_.yml | 0 .../test_sqla_23_6a5c2ea1439d_.yml | 0 .../test_sqla_24_37f3d4882837_.yml | 0 .../test_sqla_25_12536798d4d3_.yml | 0 .../test_sqla_26_ce56d84bcc35_.yml | 0 .../test_sqla_27_61fc0913fae9_.yml | 0 .../test_sqla_28_d254fdfed416_.yml | 0 .../test_sqla_29_5ddd24e52864_.yml | 0 .../test_sqla_2_a6048f0ffca8_.yml | 0 .../test_sqla_30_5a49629f0d45_.yml | 0 .../test_sqla_31_3d6190594e19_.yml | 0 .../test_sqla_32_1b8ed3425af9_.yml | 0 .../test_sqla_33_1830c8430131_.yml | 0 .../test_sqla_34_de2eaf6978b4_.yml | 0 .../test_sqla_35_07fac78e6209_.yml | 0 .../test_sqla_36_26d561acd560_.yml | 0 .../test_sqla_37_e797afa09270_.yml | 0 .../test_sqla_38_e734dd5e50d7_.yml | 0 .../test_sqla_39_7b38a9e783e7_.yml | 0 .../test_sqla_3_89176227b25_.yml | 0 .../test_sqla_40_91b573400be5_.yml | 0 .../test_sqla_41_118349c10896_.yml | 0 .../test_sqla_42_bf591f31dd12_.yml | 0 .../test_sqla_43_0edcdd5a30f0_.yml | 0 .../test_sqla_44_7536a82b2cc4_.yml | 0 .../test_sqla_45_1feaea71bd5a_.yml | 0 .../test_sqla_46_535039300e4a_.yml | 0 .../test_sqla_47_34a831f4286d_.yml | 0 .../test_sqla_48_1de112340b16_.yml | 0 .../test_sqla_49_1de112340b17_.yml | 0 .../test_sqla_4_35d4ee9a1b0e_.yml | 0 .../test_sqla_50_1de112340b18_.yml | 0 .../test_sqla_5_7a6587e16f4c_.yml | 0 .../test_sqla_6_0aebbeab274d_.yml | 0 .../test_sqla_7_6c629c886f84_.yml | 0 .../test_sqla_8_f9a69de76a9a_.yml | 0 .../test_sqla_9_a514d673c163_.yml | 0 .../psql_dos/test_alembic_cli.py | 2 +- .../psql_dos/test_nodes.py | 4 +-- .../psql_dos/test_query.py | 2 +- .../psql_dos/test_schema.py | 6 ++-- .../psql_dos/test_session.py | 4 +-- .../psql_dos/test_utils.py | 0 tests/{backends => storage}/test_control.py | 8 ++--- tests/test_calculation_node.py | 2 +- tests/test_dataclasses.py | 2 +- tests/test_dbimporters.py | 2 +- tests/test_generic.py | 2 +- tests/test_nodes.py | 2 +- .../archive/migration/test_v05_to_v06.py | 2 +- tests/tools/data/orbital/test_orbitals.py | 4 +-- tests/tools/dbimporters/test_icsd.py | 2 +- .../dbimporters/test_materialsproject.py | 2 +- tests/tools/graph/test_age.py | 2 +- tests/tools/graph/test_graph_traversers.py | 2 +- tests/tools/visualization/test_graph.py | 2 +- utils/make_all.py | 2 +- 397 files changed, 287 insertions(+), 289 deletions(-) rename aiida/{backends => storage}/__init__.py (100%) rename aiida/{backends => storage}/control.py (100%) rename aiida/{backends => storage}/psql_dos/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/alembic_cli.py (98%) rename aiida/{backends => storage}/psql_dos/backend.py (92%) rename aiida/{backends => storage}/psql_dos/migrations/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/env.py (79%) rename aiida/{backends => storage}/psql_dos/migrations/script.py.mako (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/calc_state.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/create_dbattribute.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/dblog_update.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/duplicate_uuids.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/integrity.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/legacy_workflows.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/migrate_repository.py (97%) rename aiida/{backends => storage}/psql_dos/migrations/utils/parity.py (98%) rename aiida/{backends => storage}/psql_dos/migrations/utils/provenance_redesign.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/reflect.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/utils/utils.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py (96%) rename aiida/{backends => storage}/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/118349c10896_default_link_label.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py (96%) rename aiida/{backends => storage}/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py (95%) rename aiida/{backends => storage}/psql_dos/migrations/versions/1de112340b16_django_parity_1.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/1de112340b17_django_parity_2.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/1de112340b18_django_parity_3.py (93%) rename aiida/{backends => storage}/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py (93%) rename aiida/{backends => storage}/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py (98%) rename aiida/{backends => storage}/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py (94%) rename aiida/{backends => storage}/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py (93%) rename aiida/{backends => storage}/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/6c629c886f84_process_type.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/a514d673c163_drop_dblock.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py (97%) rename aiida/{backends => storage}/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0001_initial.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0002_db_state_change.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0003_add_link_type.py (96%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0006_delete_dbpath.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0007_update_linktypes.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0010_process_type.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0012_drop_dblock.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0013_django_1_8.py (95%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py (93%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0018_django_1_11.py (93%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0020_provenance_redesign.py (98%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py (97%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0024a_dblog_update.py (96%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0024b_dblog_update.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py (91%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py (97%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0028_remove_node_prefix.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py (94%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0035_simplify_user_model.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py (99%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0039_reset_hash.py (94%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0043_default_link_label.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0045_dbgroup_extras.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0047_migrate_repository.py (92%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0048_computer_name_to_label.py (95%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py (95%) rename aiida/{backends => storage}/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py (99%) rename aiida/{backends => storage}/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/e797afa09270_reset_hash.py (95%) rename aiida/{backends => storage}/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py (95%) rename aiida/{backends => storage}/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py (100%) rename aiida/{backends => storage}/psql_dos/migrations/versions/main_0001_initial.py (100%) rename aiida/{backends => storage}/psql_dos/migrator.py (98%) rename aiida/{backends => storage}/psql_dos/models/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/models/authinfo.py (100%) rename aiida/{backends => storage}/psql_dos/models/base.py (96%) rename aiida/{backends => storage}/psql_dos/models/comment.py (98%) rename aiida/{backends => storage}/psql_dos/models/computer.py (98%) rename aiida/{backends => storage}/psql_dos/models/group.py (100%) rename aiida/{backends => storage}/psql_dos/models/log.py (98%) rename aiida/{backends => storage}/psql_dos/models/node.py (99%) rename aiida/{backends => storage}/psql_dos/models/settings.py (96%) rename aiida/{backends => storage}/psql_dos/models/user.py (97%) rename aiida/{backends => storage}/psql_dos/orm/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/orm/authinfos.py (98%) rename aiida/{backends => storage}/psql_dos/orm/comments.py (99%) rename aiida/{backends => storage}/psql_dos/orm/computers.py (98%) rename aiida/{backends => storage}/psql_dos/orm/convert.py (88%) rename aiida/{backends => storage}/psql_dos/orm/entities.py (98%) rename aiida/{backends => storage}/psql_dos/orm/extras_mixin.py (100%) rename aiida/{backends => storage}/psql_dos/orm/groups.py (97%) rename aiida/{backends => storage}/psql_dos/orm/logs.py (98%) rename aiida/{backends => storage}/psql_dos/orm/nodes.py (98%) rename aiida/{backends => storage}/psql_dos/orm/querybuilder/__init__.py (100%) rename aiida/{backends => storage}/psql_dos/orm/querybuilder/joiner.py (99%) rename aiida/{backends => storage}/psql_dos/orm/querybuilder/main.py (97%) rename aiida/{backends => storage}/psql_dos/orm/users.py (97%) rename aiida/{backends => storage}/psql_dos/orm/utils.py (99%) rename aiida/{backends => storage}/psql_dos/utils.py (99%) rename aiida/{backends => storage}/testbase.py (100%) rename tests/{backends => storage}/__init__.py (100%) rename tests/{backends => storage}/psql_dos/__init__.py (100%) rename tests/{backends => storage}/psql_dos/conftest.py (100%) rename tests/{backends => storage}/psql_dos/migrations/__init__.py (100%) rename tests/{backends => storage}/psql_dos/migrations/conftest.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/__init__.py (100%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0024_dblog_update.py (99%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py (95%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0028_0029_node_type.py (97%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py (94%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0039_reset_hash.py (97%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0043_default_link_label.py (97%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py (97%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py (96%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py (96%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0047_migrate_repository.py (97%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py (96%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py (98%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_0050_schema_parity.py (97%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_legacy.py (99%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/django_branch/test_migrate_to_head.py (94%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/__init__.py (100%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py (97%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py (95%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py (97%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py (96%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py (98%) rename tests/{backends => storage}/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py (94%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema.py (97%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml (100%) rename tests/{backends => storage}/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml (100%) rename tests/{backends => storage}/psql_dos/test_alembic_cli.py (93%) rename tests/{backends => storage}/psql_dos/test_nodes.py (97%) rename tests/{backends => storage}/psql_dos/test_query.py (97%) rename tests/{backends => storage}/psql_dos/test_schema.py (98%) rename tests/{backends => storage}/psql_dos/test_session.py (98%) rename tests/{backends => storage}/psql_dos/test_utils.py (100%) rename tests/{backends => storage}/test_control.py (95%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2ca5b733d..3cad7ac827 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,10 +70,6 @@ repos: pass_filenames: true files: >- (?x)^( - aiida/backends/control.py| - aiida/backends/psql_dos/backend.py| - aiida/backends/psql_dos/orm/querybuilder/.*py| - aiida/backends/psql_dos/utils.py| aiida/common/progress_reporter.py| aiida/engine/.*py| aiida/manage/manager.py| @@ -103,6 +99,10 @@ repos: aiida/plugins/entry_point.py| aiida/plugins/factories.py| aiida/repository/.*py| + aiida/storage/control.py| + aiida/storage/psql_dos/backend.py| + aiida/storage/psql_dos/orm/querybuilder/.*py| + aiida/storage/psql_dos/utils.py| aiida/tools/graph/graph_traversers.py| aiida/tools/groups/paths.py| aiida/tools/archive/.*py| diff --git a/CHANGELOG.md b/CHANGELOG.md index b5dc47e78c..a11ec1bb15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -702,7 +702,7 @@ Changes between 1.0 alpha/beta releases are not included - for those see the cha - AiiDA now enforces UTF-8 encoding for text output in its files and databases. [[#2107]](https://github.com/aiidateam/aiida-core/pull/2107) #### Backwards-incompatible changes (only a sub-set) -- Remove `aiida.tests` and obsolete `aiida.backends.tests.test_parsers` entry point group [[#2778]](https://github.com/aiidateam/aiida-core/pull/2778) +- Remove `aiida.tests` and obsolete `aiida.storage.tests.test_parsers` entry point group [[#2778]](https://github.com/aiidateam/aiida-core/pull/2778) - Implement new link types [[#2220]](https://github.com/aiidateam/aiida-core/pull/2220) - Rename the type strings of `Groups` and change the attributes `name` and `type` to `label` and `type_string` [[#2329]](https://github.com/aiidateam/aiida-core/pull/2329) - Make various protected `Node` methods public [[#2544]](https://github.com/aiidateam/aiida-core/pull/2544) diff --git a/aiida/cmdline/commands/cmd_devel.py b/aiida/cmdline/commands/cmd_devel.py index 4f81548dc2..fdf62f8a10 100644 --- a/aiida/cmdline/commands/cmd_devel.py +++ b/aiida/cmdline/commands/cmd_devel.py @@ -102,7 +102,7 @@ def devel_run_sql(sql): """Run a raw SQL command on the profile database (only available for 'psql_dos' storage).""" from sqlalchemy import text - from aiida.backends.psql_dos.utils import create_sqlalchemy_engine + from aiida.storage.psql_dos.utils import create_sqlalchemy_engine assert get_profile().storage_backend == 'psql_dos' with create_sqlalchemy_engine(get_profile().storage_config).connect() as connection: result = connection.execute(text(sql)).fetchall() diff --git a/aiida/cmdline/commands/cmd_storage.py b/aiida/cmdline/commands/cmd_storage.py index a609a66525..574c58fb99 100644 --- a/aiida/cmdline/commands/cmd_storage.py +++ b/aiida/cmdline/commands/cmd_storage.py @@ -92,9 +92,9 @@ def storage_integrity(): @click.option('--statistics', is_flag=True, help='Provides more in-detail statistically relevant data.') def storage_info(statistics): """Summarise the contents of the storage.""" - from aiida.backends.control import get_repository_info from aiida.cmdline.utils.common import get_database_summary from aiida.orm import QueryBuilder + from aiida.storage.control import get_repository_info with spinner(): data = { @@ -119,7 +119,7 @@ def storage_info(statistics): ) def storage_maintain(full, dry_run): """Performs maintenance tasks on the repository.""" - from aiida.backends.control import repository_maintain + from aiida.storage.control import repository_maintain if full: echo.echo_warning( diff --git a/aiida/common/utils.py b/aiida/common/utils.py index f730c7e66e..2e4b2fec96 100644 --- a/aiida/common/utils.py +++ b/aiida/common/utils.py @@ -24,8 +24,6 @@ def get_new_uuid(): """ Return a new UUID (typically to be used for new nodes). - It uses the UUID version specified in - aiida.backends.settings.AIIDANODES_UUID_VERSION """ import uuid return str(uuid.uuid4()) diff --git a/aiida/manage/configuration/__init__.py b/aiida/manage/configuration/__init__.py index 095c3546d6..496ab67bf2 100644 --- a/aiida/manage/configuration/__init__.py +++ b/aiida/manage/configuration/__init__.py @@ -248,7 +248,7 @@ def load_documentation_profile(): """ import tempfile - from aiida.backends.psql_dos.models.base import get_orm_metadata + from aiida.storage.psql_dos.models.base import get_orm_metadata from .config import Config diff --git a/aiida/manage/configuration/profile.py b/aiida/manage/configuration/profile.py index 2d56e232a4..d4698b7d18 100644 --- a/aiida/manage/configuration/profile.py +++ b/aiida/manage/configuration/profile.py @@ -124,7 +124,7 @@ def set_storage(self, name: str, config: Dict[str, Any]) -> None: def storage_cls(self) -> Type['Backend']: """Return the storage backend class for this profile.""" if self.storage_backend == 'psql_dos': - from aiida.backends.psql_dos.backend import PsqlDosBackend + from aiida.storage.psql_dos.backend import PsqlDosBackend return PsqlDosBackend if self.storage_backend == 'archive.sqlite': from aiida.tools.archive.implementations.sqlite.backend import ArchiveReadOnlyBackend diff --git a/aiida/manage/tests/main.py b/aiida/manage/tests/main.py index 42e4795ae6..3d8857e427 100644 --- a/aiida/manage/tests/main.py +++ b/aiida/manage/tests/main.py @@ -147,7 +147,7 @@ def __init__(self, profile_name): :param profile_name: Name of the profile to be loaded """ from aiida import load_profile - from aiida.backends.testbase import check_if_tests_can_run + from aiida.storage.testbase import check_if_tests_can_run self._profile = None try: diff --git a/aiida/repository/backend/disk_object_store.py b/aiida/repository/backend/disk_object_store.py index a59a7c768b..ee0d9c3b60 100644 --- a/aiida/repository/backend/disk_object_store.py +++ b/aiida/repository/backend/disk_object_store.py @@ -156,7 +156,7 @@ def maintain( # type: ignore[override] # pylint: disable=arguments-differ,too-ma :param do_vacuum:flag for forcing the vacuuming of the internal database when cleaning the repository. :return:a dictionary with information on the operations performed. """ - from aiida.backends.control import MAINTAIN_LOGGER + from aiida.storage.control import MAINTAIN_LOGGER logger = MAINTAIN_LOGGER.getChild('disk_object_store') diff --git a/aiida/backends/__init__.py b/aiida/storage/__init__.py similarity index 100% rename from aiida/backends/__init__.py rename to aiida/storage/__init__.py diff --git a/aiida/backends/control.py b/aiida/storage/control.py similarity index 100% rename from aiida/backends/control.py rename to aiida/storage/control.py diff --git a/aiida/backends/psql_dos/__init__.py b/aiida/storage/psql_dos/__init__.py similarity index 100% rename from aiida/backends/psql_dos/__init__.py rename to aiida/storage/psql_dos/__init__.py diff --git a/aiida/backends/psql_dos/alembic_cli.py b/aiida/storage/psql_dos/alembic_cli.py similarity index 98% rename from aiida/backends/psql_dos/alembic_cli.py rename to aiida/storage/psql_dos/alembic_cli.py index 9c7c7bc70e..1f03b2231c 100755 --- a/aiida/backends/psql_dos/alembic_cli.py +++ b/aiida/storage/psql_dos/alembic_cli.py @@ -13,9 +13,9 @@ import click from sqlalchemy.util.compat import nullcontext -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.cmdline import is_verbose from aiida.cmdline.params import options +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator class AlembicRunner: diff --git a/aiida/backends/psql_dos/backend.py b/aiida/storage/psql_dos/backend.py similarity index 92% rename from aiida/backends/psql_dos/backend.py rename to aiida/storage/psql_dos/backend.py index 5a9a9fc379..862bd6103b 100644 --- a/aiida/backends/psql_dos/backend.py +++ b/aiida/storage/psql_dos/backend.py @@ -17,14 +17,14 @@ from sqlalchemy import table from sqlalchemy.orm import Session, scoped_session, sessionmaker -from aiida.backends.psql_dos.migrator import REPOSITORY_UUID_KEY, PsqlDostoreMigrator -from aiida.backends.psql_dos.models import base from aiida.common.exceptions import ClosedStorage, IntegrityError from aiida.manage.configuration.profile import Profile from aiida.orm import User from aiida.orm.entities import EntityTypes from aiida.orm.implementation.backends import Backend from aiida.orm.implementation.entities import BackendEntity +from aiida.storage.psql_dos.migrator import REPOSITORY_UUID_KEY, PsqlDostoreMigrator +from aiida.storage.psql_dos.models import base from .orm import authinfos, comments, computers, convert, groups, logs, nodes, querybuilder, users @@ -100,7 +100,7 @@ def _initialise_session(self): Multi-thread support is currently required by the REST API. Although, in the future, we may want to move the multi-thread handling to higher in the AiiDA stack. """ - from aiida.backends.psql_dos.utils import create_sqlalchemy_engine + from aiida.storage.psql_dos.utils import create_sqlalchemy_engine engine = create_sqlalchemy_engine(self._profile.storage_config) self._session_factory = scoped_session(sessionmaker(bind=engine, future=True, expire_on_commit=True)) @@ -125,8 +125,8 @@ def close(self) -> None: self._session_factory = None def _clear(self, recreate_user: bool = True) -> None: - from aiida.backends.psql_dos.models.settings import DbSetting - from aiida.backends.psql_dos.models.user import DbUser + from aiida.storage.psql_dos.models.settings import DbSetting + from aiida.storage.psql_dos.models.user import DbUser super()._clear(recreate_user) @@ -237,13 +237,13 @@ def _get_mapper_from_entity(entity_type: EntityTypes, with_pk: bool): """ from sqlalchemy import inspect - from aiida.backends.psql_dos.models.authinfo import DbAuthInfo - from aiida.backends.psql_dos.models.comment import DbComment - from aiida.backends.psql_dos.models.computer import DbComputer - from aiida.backends.psql_dos.models.group import DbGroup, DbGroupNode - from aiida.backends.psql_dos.models.log import DbLog - from aiida.backends.psql_dos.models.node import DbLink, DbNode - from aiida.backends.psql_dos.models.user import DbUser + from aiida.storage.psql_dos.models.authinfo import DbAuthInfo + from aiida.storage.psql_dos.models.comment import DbComment + from aiida.storage.psql_dos.models.computer import DbComputer + from aiida.storage.psql_dos.models.group import DbGroup, DbGroupNode + from aiida.storage.psql_dos.models.log import DbLog + from aiida.storage.psql_dos.models.node import DbLink, DbNode + from aiida.storage.psql_dos.models.user import DbUser model = { EntityTypes.AUTHINFO: DbAuthInfo, EntityTypes.COMMENT: DbComment, @@ -297,8 +297,8 @@ def bulk_update(self, entity_type: EntityTypes, rows: List[dict]) -> None: # py def delete_nodes_and_connections(self, pks_to_delete: Sequence[int]) -> None: # pylint: disable=no-self-use # pylint: disable=no-value-for-parameter - from aiida.backends.psql_dos.models.group import DbGroupNode - from aiida.backends.psql_dos.models.node import DbLink, DbNode + from aiida.storage.psql_dos.models.group import DbGroupNode + from aiida.storage.psql_dos.models.node import DbLink, DbNode if not self.in_transaction: raise AssertionError('Cannot delete nodes and links outside a transaction') @@ -326,7 +326,7 @@ def get_backend_entity(self, model: base.Base) -> BackendEntity: def set_global_variable( self, key: str, value: Union[None, str, int, float], description: Optional[str] = None, overwrite=True ) -> None: - from aiida.backends.psql_dos.models.settings import DbSetting + from aiida.storage.psql_dos.models.settings import DbSetting session = self.get_session() with (nullcontext() if self.in_transaction else self.transaction()): @@ -339,7 +339,7 @@ def set_global_variable( session.add(DbSetting(key=key, val=value, description=description or '')) def get_global_variable(self, key: str) -> Union[None, str, int, float]: - from aiida.backends.psql_dos.models.settings import DbSetting + from aiida.storage.psql_dos.models.settings import DbSetting session = self.get_session() with (nullcontext() if self.in_transaction else self.transaction()): diff --git a/aiida/backends/psql_dos/migrations/__init__.py b/aiida/storage/psql_dos/migrations/__init__.py similarity index 100% rename from aiida/backends/psql_dos/migrations/__init__.py rename to aiida/storage/psql_dos/migrations/__init__.py diff --git a/aiida/backends/psql_dos/migrations/env.py b/aiida/storage/psql_dos/migrations/env.py similarity index 79% rename from aiida/backends/psql_dos/migrations/env.py rename to aiida/storage/psql_dos/migrations/env.py index 9d379fbcfc..613d237c34 100644 --- a/aiida/backends/psql_dos/migrations/env.py +++ b/aiida/storage/psql_dos/migrations/env.py @@ -18,16 +18,16 @@ def run_migrations_online(): """ # pylint: disable=unused-import - from aiida.backends.psql_dos.models.authinfo import DbAuthInfo - from aiida.backends.psql_dos.models.base import Base - from aiida.backends.psql_dos.models.comment import DbComment - from aiida.backends.psql_dos.models.computer import DbComputer - from aiida.backends.psql_dos.models.group import DbGroup - from aiida.backends.psql_dos.models.log import DbLog - from aiida.backends.psql_dos.models.node import DbLink, DbNode - from aiida.backends.psql_dos.models.settings import DbSetting - from aiida.backends.psql_dos.models.user import DbUser from aiida.common.exceptions import DbContentError + from aiida.storage.psql_dos.models.authinfo import DbAuthInfo + from aiida.storage.psql_dos.models.base import Base + from aiida.storage.psql_dos.models.comment import DbComment + from aiida.storage.psql_dos.models.computer import DbComputer + from aiida.storage.psql_dos.models.group import DbGroup + from aiida.storage.psql_dos.models.log import DbLog + from aiida.storage.psql_dos.models.node import DbLink, DbNode + from aiida.storage.psql_dos.models.settings import DbSetting + from aiida.storage.psql_dos.models.user import DbUser config = context.config # pylint: disable=no-member connection = config.attributes.get('connection', None) diff --git a/aiida/backends/psql_dos/migrations/script.py.mako b/aiida/storage/psql_dos/migrations/script.py.mako similarity index 100% rename from aiida/backends/psql_dos/migrations/script.py.mako rename to aiida/storage/psql_dos/migrations/script.py.mako diff --git a/aiida/backends/psql_dos/migrations/utils/__init__.py b/aiida/storage/psql_dos/migrations/utils/__init__.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/__init__.py rename to aiida/storage/psql_dos/migrations/utils/__init__.py diff --git a/aiida/backends/psql_dos/migrations/utils/calc_state.py b/aiida/storage/psql_dos/migrations/utils/calc_state.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/calc_state.py rename to aiida/storage/psql_dos/migrations/utils/calc_state.py diff --git a/aiida/backends/psql_dos/migrations/utils/create_dbattribute.py b/aiida/storage/psql_dos/migrations/utils/create_dbattribute.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/create_dbattribute.py rename to aiida/storage/psql_dos/migrations/utils/create_dbattribute.py diff --git a/aiida/backends/psql_dos/migrations/utils/dblog_update.py b/aiida/storage/psql_dos/migrations/utils/dblog_update.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/dblog_update.py rename to aiida/storage/psql_dos/migrations/utils/dblog_update.py diff --git a/aiida/backends/psql_dos/migrations/utils/duplicate_uuids.py b/aiida/storage/psql_dos/migrations/utils/duplicate_uuids.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/duplicate_uuids.py rename to aiida/storage/psql_dos/migrations/utils/duplicate_uuids.py diff --git a/aiida/backends/psql_dos/migrations/utils/integrity.py b/aiida/storage/psql_dos/migrations/utils/integrity.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/integrity.py rename to aiida/storage/psql_dos/migrations/utils/integrity.py diff --git a/aiida/backends/psql_dos/migrations/utils/legacy_workflows.py b/aiida/storage/psql_dos/migrations/utils/legacy_workflows.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/legacy_workflows.py rename to aiida/storage/psql_dos/migrations/utils/legacy_workflows.py diff --git a/aiida/backends/psql_dos/migrations/utils/migrate_repository.py b/aiida/storage/psql_dos/migrations/utils/migrate_repository.py similarity index 97% rename from aiida/backends/psql_dos/migrations/utils/migrate_repository.py rename to aiida/storage/psql_dos/migrations/utils/migrate_repository.py index 6b68fdf815..3502c829b2 100644 --- a/aiida/backends/psql_dos/migrations/utils/migrate_repository.py +++ b/aiida/storage/psql_dos/migrations/utils/migrate_repository.py @@ -18,11 +18,11 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, func, select, table, text -from aiida.backends.psql_dos.backend import CONTAINER_DEFAULTS -from aiida.backends.psql_dos.migrations.utils import utils from aiida.cmdline.utils import echo from aiida.common import exceptions from aiida.common.progress_reporter import get_progress_reporter, set_progress_bar_tqdm, set_progress_reporter +from aiida.storage.psql_dos.backend import CONTAINER_DEFAULTS +from aiida.storage.psql_dos.migrations.utils import utils def migrate_repository(connection, profile): diff --git a/aiida/backends/psql_dos/migrations/utils/parity.py b/aiida/storage/psql_dos/migrations/utils/parity.py similarity index 98% rename from aiida/backends/psql_dos/migrations/utils/parity.py rename to aiida/storage/psql_dos/migrations/utils/parity.py index d5de67085c..eb675df934 100644 --- a/aiida/backends/psql_dos/migrations/utils/parity.py +++ b/aiida/storage/psql_dos/migrations/utils/parity.py @@ -10,7 +10,7 @@ """Utilities for synchronizing the django and sqlalchemy schema.""" import alembic -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations def synchronize_schemas(alembic_op: alembic.op) -> None: @@ -20,7 +20,7 @@ def synchronize_schemas(alembic_op: alembic.op) -> None: 2. Remove and recreate all unique constraints, with standard names. 3. Remove and recreate all foreign key constraints, with standard names and other rules. - Schema naming conventions are defined ``aiida/backends/sqlalchemy/models/base.py::naming_convention``. + Schema naming conventions are defined ``aiida/storage/sqlalchemy/models/base.py::naming_convention``. Note we assume here that (a) all primary keys are already correct, and (b) there are no check constraints. """ diff --git a/aiida/backends/psql_dos/migrations/utils/provenance_redesign.py b/aiida/storage/psql_dos/migrations/utils/provenance_redesign.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/provenance_redesign.py rename to aiida/storage/psql_dos/migrations/utils/provenance_redesign.py diff --git a/aiida/backends/psql_dos/migrations/utils/reflect.py b/aiida/storage/psql_dos/migrations/utils/reflect.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/reflect.py rename to aiida/storage/psql_dos/migrations/utils/reflect.py diff --git a/aiida/backends/psql_dos/migrations/utils/utils.py b/aiida/storage/psql_dos/migrations/utils/utils.py similarity index 100% rename from aiida/backends/psql_dos/migrations/utils/utils.py rename to aiida/storage/psql_dos/migrations/utils/utils.py diff --git a/aiida/backends/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py b/aiida/storage/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py similarity index 96% rename from aiida/backends/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py rename to aiida/storage/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py index 8776caf74f..eb79b84051 100644 --- a/aiida/backends/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py +++ b/aiida/storage/psql_dos/migrations/versions/041a79fc615f_dblog_cleaning.py @@ -23,7 +23,7 @@ import sqlalchemy as sa from sqlalchemy.sql import text -from aiida.backends.psql_dos.migrations.utils.dblog_update import export_and_clean_workflow_logs +from aiida.storage.psql_dos.migrations.utils.dblog_update import export_and_clean_workflow_logs # revision identifiers, used by Alembic. revision = '041a79fc615f' diff --git a/aiida/backends/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py b/aiida/storage/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py rename to aiida/storage/psql_dos/migrations/versions/07fac78e6209_drop_computer_transport_params.py diff --git a/aiida/backends/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py b/aiida/storage/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py rename to aiida/storage/psql_dos/migrations/versions/0aebbeab274d_base_data_plugin_type_string.py diff --git a/aiida/backends/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py b/aiida/storage/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py rename to aiida/storage/psql_dos/migrations/versions/0edcdd5a30f0_dbgroup_extras.py diff --git a/aiida/backends/psql_dos/migrations/versions/118349c10896_default_link_label.py b/aiida/storage/psql_dos/migrations/versions/118349c10896_default_link_label.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/118349c10896_default_link_label.py rename to aiida/storage/psql_dos/migrations/versions/118349c10896_default_link_label.py diff --git a/aiida/backends/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py b/aiida/storage/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py similarity index 96% rename from aiida/backends/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py rename to aiida/storage/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py index 4e6f9f69a0..89da258599 100644 --- a/aiida/backends/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py +++ b/aiida/storage/psql_dos/migrations/versions/12536798d4d3_trajectory_symbols_to_attribute.py @@ -27,7 +27,7 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, func, select, table -from aiida.backends.psql_dos.migrations.utils.utils import load_numpy_array_from_repository +from aiida.storage.psql_dos.migrations.utils.utils import load_numpy_array_from_repository # revision identifiers, used by Alembic. revision = '12536798d4d3' diff --git a/aiida/backends/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py b/aiida/storage/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py rename to aiida/storage/psql_dos/migrations/versions/140c971ae0a3_migrate_builtin_calculations.py diff --git a/aiida/backends/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py b/aiida/storage/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py rename to aiida/storage/psql_dos/migrations/versions/162b99bca4a2_drop_dbcalcstate.py diff --git a/aiida/backends/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py b/aiida/storage/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py rename to aiida/storage/psql_dos/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py diff --git a/aiida/backends/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py b/aiida/storage/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py similarity index 95% rename from aiida/backends/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py rename to aiida/storage/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py index 97a7766aa4..78373d0ceb 100644 --- a/aiida/backends/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py +++ b/aiida/storage/psql_dos/migrations/versions/1b8ed3425af9_remove_legacy_workflows.py @@ -19,7 +19,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils.legacy_workflows import export_workflow_data +from aiida.storage.psql_dos.migrations.utils.legacy_workflows import export_workflow_data # revision identifiers, used by Alembic. revision = '1b8ed3425af9' diff --git a/aiida/backends/psql_dos/migrations/versions/1de112340b16_django_parity_1.py b/aiida/storage/psql_dos/migrations/versions/1de112340b16_django_parity_1.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/1de112340b16_django_parity_1.py rename to aiida/storage/psql_dos/migrations/versions/1de112340b16_django_parity_1.py diff --git a/aiida/backends/psql_dos/migrations/versions/1de112340b17_django_parity_2.py b/aiida/storage/psql_dos/migrations/versions/1de112340b17_django_parity_2.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/1de112340b17_django_parity_2.py rename to aiida/storage/psql_dos/migrations/versions/1de112340b17_django_parity_2.py diff --git a/aiida/backends/psql_dos/migrations/versions/1de112340b18_django_parity_3.py b/aiida/storage/psql_dos/migrations/versions/1de112340b18_django_parity_3.py similarity index 93% rename from aiida/backends/psql_dos/migrations/versions/1de112340b18_django_parity_3.py rename to aiida/storage/psql_dos/migrations/versions/1de112340b18_django_parity_3.py index c71596c8e5..6092d93f33 100644 --- a/aiida/backends/psql_dos/migrations/versions/1de112340b18_django_parity_3.py +++ b/aiida/storage/psql_dos/migrations/versions/1de112340b18_django_parity_3.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils.parity import synchronize_schemas +from aiida.storage.psql_dos.migrations.utils.parity import synchronize_schemas revision = '1de112340b18' down_revision = '1de112340b17' diff --git a/aiida/backends/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py b/aiida/storage/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py similarity index 93% rename from aiida/backends/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py rename to aiida/storage/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py index 44b3d07109..eef661285b 100644 --- a/aiida/backends/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py +++ b/aiida/storage/psql_dos/migrations/versions/1feaea71bd5a_migrate_repository.py @@ -26,7 +26,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils.migrate_repository import migrate_repository + from aiida.storage.psql_dos.migrations.utils.migrate_repository import migrate_repository migrate_repository(op.get_bind(), op.get_context().opts['aiida_profile']) diff --git a/aiida/backends/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py b/aiida/storage/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py similarity index 98% rename from aiida/backends/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py rename to aiida/storage/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py index c7101dbdef..dfad67f98e 100644 --- a/aiida/backends/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py +++ b/aiida/storage/psql_dos/migrations/versions/239cea6d2452_provenance_redesign.py @@ -26,7 +26,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils import provenance_redesign + from aiida.storage.psql_dos.migrations.utils import provenance_redesign # Migrate calculation nodes by inferring the process type from the type string provenance_redesign.migrate_infer_calculation_entry_point(op) diff --git a/aiida/backends/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py b/aiida/storage/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py rename to aiida/storage/psql_dos/migrations/versions/26d561acd560_data_migration_legacy_job_calculations.py diff --git a/aiida/backends/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py b/aiida/storage/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py rename to aiida/storage/psql_dos/migrations/versions/34a831f4286d_entry_point_core_prefix.py diff --git a/aiida/backends/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py b/aiida/storage/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py rename to aiida/storage/psql_dos/migrations/versions/35d4ee9a1b0e_code_hidden_attr_to_extra.py diff --git a/aiida/backends/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py b/aiida/storage/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py rename to aiida/storage/psql_dos/migrations/versions/375c2db70663_dblog_uuid_uniqueness_constraint.py diff --git a/aiida/backends/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py b/aiida/storage/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py similarity index 94% rename from aiida/backends/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py rename to aiida/storage/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py index b6a47295bf..1dcc78428f 100644 --- a/aiida/backends/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py +++ b/aiida/storage/psql_dos/migrations/versions/37f3d4882837_make_all_uuid_columns_unique.py @@ -33,7 +33,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness + from aiida.storage.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness for table in tables: verify_uuid_uniqueness(table, op.get_bind()) op.create_unique_constraint(f'{table}_uuid_key', table, ['uuid']) diff --git a/aiida/backends/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py b/aiida/storage/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py rename to aiida/storage/psql_dos/migrations/versions/3d6190594e19_remove_dbcomputer_enabled.py diff --git a/aiida/backends/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py b/aiida/storage/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py rename to aiida/storage/psql_dos/migrations/versions/535039300e4a_computer_name_to_label.py diff --git a/aiida/backends/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py b/aiida/storage/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py rename to aiida/storage/psql_dos/migrations/versions/59edaf8a8b79_adding_indexes_and_constraints_to_the_.py diff --git a/aiida/backends/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py b/aiida/storage/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py rename to aiida/storage/psql_dos/migrations/versions/5a49629f0d45_dblink_indices.py diff --git a/aiida/backends/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py b/aiida/storage/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py rename to aiida/storage/psql_dos/migrations/versions/5d4d844852b6_invalidating_node_hash.py diff --git a/aiida/backends/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py b/aiida/storage/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py rename to aiida/storage/psql_dos/migrations/versions/5ddd24e52864_dbnode_type_to_dbnode_node_type.py diff --git a/aiida/backends/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py b/aiida/storage/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py rename to aiida/storage/psql_dos/migrations/versions/61fc0913fae9_remove_node_prefix.py diff --git a/aiida/backends/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py b/aiida/storage/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py similarity index 93% rename from aiida/backends/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py rename to aiida/storage/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py index f52d39ce3c..3acc666e6b 100644 --- a/aiida/backends/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py +++ b/aiida/storage/psql_dos/migrations/versions/62fe0d36de90_add_node_uuid_unique_constraint.py @@ -26,7 +26,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness + from aiida.storage.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness verify_uuid_uniqueness('db_dbnode', op.get_bind()) op.create_unique_constraint('db_dbnode_uuid_key', 'db_dbnode', ['uuid']) diff --git a/aiida/backends/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py b/aiida/storage/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py rename to aiida/storage/psql_dos/migrations/versions/6a5c2ea1439d_move_data_within_node_module.py diff --git a/aiida/backends/psql_dos/migrations/versions/6c629c886f84_process_type.py b/aiida/storage/psql_dos/migrations/versions/6c629c886f84_process_type.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/6c629c886f84_process_type.py rename to aiida/storage/psql_dos/migrations/versions/6c629c886f84_process_type.py diff --git a/aiida/backends/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py b/aiida/storage/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py rename to aiida/storage/psql_dos/migrations/versions/70c7d732f1b2_delete_dbpath.py diff --git a/aiida/backends/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py b/aiida/storage/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py rename to aiida/storage/psql_dos/migrations/versions/7536a82b2cc4_add_node_repository_metadata.py diff --git a/aiida/backends/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py b/aiida/storage/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py rename to aiida/storage/psql_dos/migrations/versions/7a6587e16f4c_unique_constraints_for_the_db_dbgroup_.py diff --git a/aiida/backends/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py b/aiida/storage/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py rename to aiida/storage/psql_dos/migrations/versions/7b38a9e783e7_seal_unsealed_processes.py diff --git a/aiida/backends/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py b/aiida/storage/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py rename to aiida/storage/psql_dos/migrations/versions/7ca08c391c49_calc_job_option_attribute_keys.py diff --git a/aiida/backends/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py b/aiida/storage/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py rename to aiida/storage/psql_dos/migrations/versions/89176227b25_add_indexes_to_dbworkflowdata_table.py diff --git a/aiida/backends/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py b/aiida/storage/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py rename to aiida/storage/psql_dos/migrations/versions/91b573400be5_prepare_schema_reset.py diff --git a/aiida/backends/psql_dos/migrations/versions/__init__.py b/aiida/storage/psql_dos/migrations/versions/__init__.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/__init__.py rename to aiida/storage/psql_dos/migrations/versions/__init__.py diff --git a/aiida/backends/psql_dos/migrations/versions/a514d673c163_drop_dblock.py b/aiida/storage/psql_dos/migrations/versions/a514d673c163_drop_dblock.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/a514d673c163_drop_dblock.py rename to aiida/storage/psql_dos/migrations/versions/a514d673c163_drop_dblock.py diff --git a/aiida/backends/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py b/aiida/storage/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py rename to aiida/storage/psql_dos/migrations/versions/a603da2cc809_code_sub_class_of_data.py diff --git a/aiida/backends/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py b/aiida/storage/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py rename to aiida/storage/psql_dos/migrations/versions/a6048f0ffca8_update_linktypes.py diff --git a/aiida/backends/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py b/aiida/storage/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py rename to aiida/storage/psql_dos/migrations/versions/b8b23ddefad4_dbgroup_name_to_label_type_to_type_string.py diff --git a/aiida/backends/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py b/aiida/storage/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py rename to aiida/storage/psql_dos/migrations/versions/bf591f31dd12_dbgroup_type_string.py diff --git a/aiida/backends/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py b/aiida/storage/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py similarity index 97% rename from aiida/backends/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py rename to aiida/storage/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py index 41d6328ca5..fa6a9b3137 100644 --- a/aiida/backends/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py +++ b/aiida/storage/psql_dos/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py @@ -22,7 +22,7 @@ from sqlalchemy.dialects.postgresql import JSONB, UUID from sqlalchemy.sql import column, select, table, text -from aiida.backends.psql_dos.migrations.utils import utils +from aiida.storage.psql_dos.migrations.utils import utils # revision identifiers, used by Alembic. revision = 'ce56d84bcc35' diff --git a/aiida/backends/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py b/aiida/storage/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py rename to aiida/storage/psql_dos/migrations/versions/d254fdfed416_rename_parameter_data_to_dict.py diff --git a/aiida/backends/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py b/aiida/storage/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py rename to aiida/storage/psql_dos/migrations/versions/de2eaf6978b4_simplify_user_model.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0001_initial.py b/aiida/storage/psql_dos/migrations/versions/django_0001_initial.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0001_initial.py rename to aiida/storage/psql_dos/migrations/versions/django_0001_initial.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0002_db_state_change.py b/aiida/storage/psql_dos/migrations/versions/django_0002_db_state_change.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0002_db_state_change.py rename to aiida/storage/psql_dos/migrations/versions/django_0002_db_state_change.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0003_add_link_type.py b/aiida/storage/psql_dos/migrations/versions/django_0003_add_link_type.py similarity index 96% rename from aiida/backends/psql_dos/migrations/versions/django_0003_add_link_type.py rename to aiida/storage/psql_dos/migrations/versions/django_0003_add_link_type.py index 7875a5c365..99c14959e2 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0003_add_link_type.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0003_add_link_type.py @@ -17,7 +17,7 @@ from alembic import op import sqlalchemy as sa -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0003' down_revision = 'django_0002' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py b/aiida/storage/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py rename to aiida/storage/psql_dos/migrations/versions/django_0004_add_daemon_and_uuid_indices.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py b/aiida/storage/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py rename to aiida/storage/psql_dos/migrations/versions/django_0005_add_cmtime_indices.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0006_delete_dbpath.py b/aiida/storage/psql_dos/migrations/versions/django_0006_delete_dbpath.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0006_delete_dbpath.py rename to aiida/storage/psql_dos/migrations/versions/django_0006_delete_dbpath.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0007_update_linktypes.py b/aiida/storage/psql_dos/migrations/versions/django_0007_update_linktypes.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0007_update_linktypes.py rename to aiida/storage/psql_dos/migrations/versions/django_0007_update_linktypes.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py b/aiida/storage/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py rename to aiida/storage/psql_dos/migrations/versions/django_0008_code_hidden_to_extra.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py b/aiida/storage/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py rename to aiida/storage/psql_dos/migrations/versions/django_0009_base_data_plugin_type_string.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0010_process_type.py b/aiida/storage/psql_dos/migrations/versions/django_0010_process_type.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0010_process_type.py rename to aiida/storage/psql_dos/migrations/versions/django_0010_process_type.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py b/aiida/storage/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py rename to aiida/storage/psql_dos/migrations/versions/django_0011_delete_kombu_tables.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0012_drop_dblock.py b/aiida/storage/psql_dos/migrations/versions/django_0012_drop_dblock.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0012_drop_dblock.py rename to aiida/storage/psql_dos/migrations/versions/django_0012_drop_dblock.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0013_django_1_8.py b/aiida/storage/psql_dos/migrations/versions/django_0013_django_1_8.py similarity index 95% rename from aiida/backends/psql_dos/migrations/versions/django_0013_django_1_8.py rename to aiida/storage/psql_dos/migrations/versions/django_0013_django_1_8.py index 07bd97f4a1..42339b28aa 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0013_django_1_8.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0013_django_1_8.py @@ -17,7 +17,7 @@ from alembic import op import sqlalchemy as sa -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0013' down_revision = 'django_0012' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py b/aiida/storage/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py similarity index 93% rename from aiida/backends/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py rename to aiida/storage/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py index 883eba7da0..b62ff8a5bf 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0014_add_node_uuid_unique_constraint.py @@ -24,7 +24,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness + from aiida.storage.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness verify_uuid_uniqueness('db_dbnode', op.get_bind()) op.create_unique_constraint('db_dbnode_uuid_62e0bf98_uniq', 'db_dbnode', ['uuid']) op.drop_index('db_dbnode_uuid_62e0bf98', table_name='db_dbnode') diff --git a/aiida/backends/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py b/aiida/storage/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py rename to aiida/storage/psql_dos/migrations/versions/django_0015_invalidating_node_hash.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py b/aiida/storage/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py rename to aiida/storage/psql_dos/migrations/versions/django_0016_code_sub_class_of_data.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py b/aiida/storage/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py rename to aiida/storage/psql_dos/migrations/versions/django_0017_drop_dbcalcstate.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0018_django_1_11.py b/aiida/storage/psql_dos/migrations/versions/django_0018_django_1_11.py similarity index 93% rename from aiida/backends/psql_dos/migrations/versions/django_0018_django_1_11.py rename to aiida/storage/psql_dos/migrations/versions/django_0018_django_1_11.py index 0440f5adbd..e50cc6078c 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0018_django_1_11.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0018_django_1_11.py @@ -18,8 +18,8 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations -from aiida.backends.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations +from aiida.storage.psql_dos.migrations.utils.duplicate_uuids import verify_uuid_uniqueness revision = 'django_0018' down_revision = 'django_0017' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py b/aiida/storage/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py rename to aiida/storage/psql_dos/migrations/versions/django_0019_migrate_builtin_calculations.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0020_provenance_redesign.py b/aiida/storage/psql_dos/migrations/versions/django_0020_provenance_redesign.py similarity index 98% rename from aiida/backends/psql_dos/migrations/versions/django_0020_provenance_redesign.py rename to aiida/storage/psql_dos/migrations/versions/django_0020_provenance_redesign.py index d5fe97e552..e693315a6b 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0020_provenance_redesign.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0020_provenance_redesign.py @@ -32,7 +32,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils import provenance_redesign + from aiida.storage.psql_dos.migrations.utils import provenance_redesign # Migrate calculation nodes by inferring the process type from the type string provenance_redesign.migrate_infer_calculation_entry_point(op) diff --git a/aiida/backends/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py b/aiida/storage/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py similarity index 97% rename from aiida/backends/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py rename to aiida/storage/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py index 660be56f16..4e3b244086 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0021_dbgroup_name_to_label_type_to_type_string.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0021' down_revision = 'django_0020' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py b/aiida/storage/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py rename to aiida/storage/psql_dos/migrations/versions/django_0022_dbgroup_type_string_change_content.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py b/aiida/storage/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py rename to aiida/storage/psql_dos/migrations/versions/django_0023_calc_job_option_attribute_keys.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0024a_dblog_update.py b/aiida/storage/psql_dos/migrations/versions/django_0024a_dblog_update.py similarity index 96% rename from aiida/backends/psql_dos/migrations/versions/django_0024a_dblog_update.py rename to aiida/storage/psql_dos/migrations/versions/django_0024a_dblog_update.py index 9dfc92886b..f76b5888d6 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0024a_dblog_update.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0024a_dblog_update.py @@ -23,7 +23,7 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql -from aiida.backends.psql_dos.migrations.utils.dblog_update import export_and_clean_workflow_logs, set_new_uuid +from aiida.storage.psql_dos.migrations.utils.dblog_update import export_and_clean_workflow_logs, set_new_uuid revision = 'django_0024a' down_revision = 'django_0023' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0024b_dblog_update.py b/aiida/storage/psql_dos/migrations/versions/django_0024b_dblog_update.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0024b_dblog_update.py rename to aiida/storage/psql_dos/migrations/versions/django_0024b_dblog_update.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py b/aiida/storage/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py rename to aiida/storage/psql_dos/migrations/versions/django_0025_move_data_within_node_module.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py b/aiida/storage/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py similarity index 91% rename from aiida/backends/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py rename to aiida/storage/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py index cfd17f2c30..ff15e15d75 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0026_trajectory_symbols_to_attribute.py @@ -20,8 +20,8 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql -from aiida.backends.psql_dos.migrations.utils.create_dbattribute import create_rows -from aiida.backends.psql_dos.migrations.utils.utils import load_numpy_array_from_repository +from aiida.storage.psql_dos.migrations.utils.create_dbattribute import create_rows +from aiida.storage.psql_dos.migrations.utils.utils import load_numpy_array_from_repository revision = 'django_0026' down_revision = 'django_0025' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py b/aiida/storage/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py similarity index 97% rename from aiida/backends/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py rename to aiida/storage/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py index 1b8d06654c..f088d605e7 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0027_delete_trajectory_symbols_array.py @@ -21,7 +21,7 @@ from sqlalchemy.dialects import postgresql from sqlalchemy.sql.expression import delete -from aiida.backends.psql_dos.migrations.utils import utils +from aiida.storage.psql_dos.migrations.utils import utils revision = 'django_0027' down_revision = 'django_0026' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0028_remove_node_prefix.py b/aiida/storage/psql_dos/migrations/versions/django_0028_remove_node_prefix.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0028_remove_node_prefix.py rename to aiida/storage/psql_dos/migrations/versions/django_0028_remove_node_prefix.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py b/aiida/storage/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py rename to aiida/storage/psql_dos/migrations/versions/django_0029_rename_parameter_data_to_dict.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py b/aiida/storage/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py rename to aiida/storage/psql_dos/migrations/versions/django_0030_dbnode_type_to_dbnode_node_type.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py b/aiida/storage/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py rename to aiida/storage/psql_dos/migrations/versions/django_0031_remove_dbcomputer_enabled.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py b/aiida/storage/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py similarity index 94% rename from aiida/backends/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py rename to aiida/storage/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py index 5a087be287..a75abb3366 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0032_remove_legacy_workflows.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils.legacy_workflows import export_workflow_data +from aiida.storage.psql_dos.migrations.utils.legacy_workflows import export_workflow_data revision = 'django_0032' down_revision = 'django_0031' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py b/aiida/storage/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py rename to aiida/storage/psql_dos/migrations/versions/django_0033_replace_text_field_with_json_field.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py b/aiida/storage/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py rename to aiida/storage/psql_dos/migrations/versions/django_0034_drop_node_columns_nodeversion_public.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0035_simplify_user_model.py b/aiida/storage/psql_dos/migrations/versions/django_0035_simplify_user_model.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0035_simplify_user_model.py rename to aiida/storage/psql_dos/migrations/versions/django_0035_simplify_user_model.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py b/aiida/storage/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py rename to aiida/storage/psql_dos/migrations/versions/django_0036_drop_computer_transport_params.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py b/aiida/storage/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py similarity index 99% rename from aiida/backends/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py rename to aiida/storage/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py index 7546ce00a0..1dffd4789a 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0037_attributes_extras_settings_json.py @@ -22,10 +22,10 @@ from sqlalchemy.dialects import postgresql from sqlalchemy.sql import column, table -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations from aiida.cmdline.utils import echo from aiida.common.progress_reporter import get_progress_reporter from aiida.common.timezone import datetime_to_isoformat +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0037' down_revision = 'django_0036' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py b/aiida/storage/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py rename to aiida/storage/psql_dos/migrations/versions/django_0038_data_migration_legacy_job_calculations.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0039_reset_hash.py b/aiida/storage/psql_dos/migrations/versions/django_0039_reset_hash.py similarity index 94% rename from aiida/backends/psql_dos/migrations/versions/django_0039_reset_hash.py rename to aiida/storage/psql_dos/migrations/versions/django_0039_reset_hash.py index a649688555..eb0bd3b14c 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0039_reset_hash.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0039_reset_hash.py @@ -18,7 +18,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils.integrity import drop_hashes +from aiida.storage.psql_dos.migrations.utils.integrity import drop_hashes revision = 'django_0039' down_revision = 'django_0038' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py b/aiida/storage/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py rename to aiida/storage/psql_dos/migrations/versions/django_0040_data_migration_legacy_process_attributes.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py b/aiida/storage/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py rename to aiida/storage/psql_dos/migrations/versions/django_0041_seal_unsealed_processes.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py b/aiida/storage/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py rename to aiida/storage/psql_dos/migrations/versions/django_0042_prepare_schema_reset.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0043_default_link_label.py b/aiida/storage/psql_dos/migrations/versions/django_0043_default_link_label.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0043_default_link_label.py rename to aiida/storage/psql_dos/migrations/versions/django_0043_default_link_label.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py b/aiida/storage/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py rename to aiida/storage/psql_dos/migrations/versions/django_0044_dbgroup_type_string.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0045_dbgroup_extras.py b/aiida/storage/psql_dos/migrations/versions/django_0045_dbgroup_extras.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0045_dbgroup_extras.py rename to aiida/storage/psql_dos/migrations/versions/django_0045_dbgroup_extras.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py b/aiida/storage/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py rename to aiida/storage/psql_dos/migrations/versions/django_0046_add_node_repository_metadata.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0047_migrate_repository.py b/aiida/storage/psql_dos/migrations/versions/django_0047_migrate_repository.py similarity index 92% rename from aiida/backends/psql_dos/migrations/versions/django_0047_migrate_repository.py rename to aiida/storage/psql_dos/migrations/versions/django_0047_migrate_repository.py index 82af262cdc..d2205f51c0 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0047_migrate_repository.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0047_migrate_repository.py @@ -24,7 +24,7 @@ def upgrade(): """Migrations for the upgrade.""" - from aiida.backends.psql_dos.migrations.utils.migrate_repository import migrate_repository + from aiida.storage.psql_dos.migrations.utils.migrate_repository import migrate_repository migrate_repository(op.get_bind(), op.get_context().opts['aiida_profile']) diff --git a/aiida/backends/psql_dos/migrations/versions/django_0048_computer_name_to_label.py b/aiida/storage/psql_dos/migrations/versions/django_0048_computer_name_to_label.py similarity index 95% rename from aiida/backends/psql_dos/migrations/versions/django_0048_computer_name_to_label.py rename to aiida/storage/psql_dos/migrations/versions/django_0048_computer_name_to_label.py index e038eb65b4..2a7d626443 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0048_computer_name_to_label.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0048_computer_name_to_label.py @@ -16,7 +16,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils import ReflectMigrations +from aiida.storage.psql_dos.migrations.utils import ReflectMigrations revision = 'django_0048' down_revision = 'django_0047' diff --git a/aiida/backends/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py b/aiida/storage/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py rename to aiida/storage/psql_dos/migrations/versions/django_0049_entry_point_core_prefix.py diff --git a/aiida/backends/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py b/aiida/storage/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py similarity index 95% rename from aiida/backends/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py rename to aiida/storage/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py index acaab70cda..4f471e1330 100644 --- a/aiida/backends/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py +++ b/aiida/storage/psql_dos/migrations/versions/django_0050_sqlalchemy_parity.py @@ -25,7 +25,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils.parity import synchronize_schemas +from aiida.storage.psql_dos.migrations.utils.parity import synchronize_schemas revision = 'django_0050' down_revision = 'django_0049' diff --git a/aiida/backends/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py b/aiida/storage/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py similarity index 99% rename from aiida/backends/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py rename to aiida/storage/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py index 7d6e401d0f..860994c1e5 100644 --- a/aiida/backends/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py +++ b/aiida/storage/psql_dos/migrations/versions/e15ef2630a1b_initial_schema.py @@ -20,7 +20,7 @@ from sqlalchemy.dialects import postgresql from sqlalchemy.orm.session import Session -from aiida.backends.psql_dos.utils import install_tc +from aiida.storage.psql_dos.utils import install_tc # revision identifiers, used by Alembic. revision = 'e15ef2630a1b' diff --git a/aiida/backends/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py b/aiida/storage/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py rename to aiida/storage/psql_dos/migrations/versions/e72ad251bcdb_dbgroup_class_change_type_string_values.py diff --git a/aiida/backends/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py b/aiida/storage/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py rename to aiida/storage/psql_dos/migrations/versions/e734dd5e50d7_data_migration_legacy_process_attributes.py diff --git a/aiida/backends/psql_dos/migrations/versions/e797afa09270_reset_hash.py b/aiida/storage/psql_dos/migrations/versions/e797afa09270_reset_hash.py similarity index 95% rename from aiida/backends/psql_dos/migrations/versions/e797afa09270_reset_hash.py rename to aiida/storage/psql_dos/migrations/versions/e797afa09270_reset_hash.py index 99b632b56f..cc77888fdf 100644 --- a/aiida/backends/psql_dos/migrations/versions/e797afa09270_reset_hash.py +++ b/aiida/storage/psql_dos/migrations/versions/e797afa09270_reset_hash.py @@ -19,7 +19,7 @@ """ from alembic import op -from aiida.backends.psql_dos.migrations.utils.integrity import drop_hashes +from aiida.storage.psql_dos.migrations.utils.integrity import drop_hashes # revision identifiers, used by Alembic. revision = 'e797afa09270' diff --git a/aiida/backends/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py b/aiida/storage/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py similarity index 95% rename from aiida/backends/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py rename to aiida/storage/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py index f4d3d210eb..72d4e9a94f 100644 --- a/aiida/backends/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py +++ b/aiida/storage/psql_dos/migrations/versions/ea2f50e7f615_dblog_create_uuid_column.py @@ -29,8 +29,8 @@ def upgrade(): """ Add an UUID column an populate it with unique UUIDs """ - from aiida.backends.psql_dos.migrations.utils.dblog_update import set_new_uuid from aiida.common.utils import get_new_uuid + from aiida.storage.psql_dos.migrations.utils.dblog_update import set_new_uuid connection = op.get_bind() diff --git a/aiida/backends/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py b/aiida/storage/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py rename to aiida/storage/psql_dos/migrations/versions/f9a69de76a9a_delete_kombu_tables.py diff --git a/aiida/backends/psql_dos/migrations/versions/main_0001_initial.py b/aiida/storage/psql_dos/migrations/versions/main_0001_initial.py similarity index 100% rename from aiida/backends/psql_dos/migrations/versions/main_0001_initial.py rename to aiida/storage/psql_dos/migrations/versions/main_0001_initial.py diff --git a/aiida/backends/psql_dos/migrator.py b/aiida/storage/psql_dos/migrator.py similarity index 98% rename from aiida/backends/psql_dos/migrator.py rename to aiida/storage/psql_dos/migrator.py index 69c2d8e24e..2e0bcb2d29 100644 --- a/aiida/backends/psql_dos/migrator.py +++ b/aiida/storage/psql_dos/migrator.py @@ -31,10 +31,10 @@ from sqlalchemy.future.engine import Connection from sqlalchemy.orm import Session -from aiida.backends.psql_dos.models.settings import DbSetting -from aiida.backends.psql_dos.utils import create_sqlalchemy_engine from aiida.common import exceptions from aiida.manage.configuration.profile import Profile +from aiida.storage.psql_dos.models.settings import DbSetting +from aiida.storage.psql_dos.utils import create_sqlalchemy_engine TEMPLATE_LEGACY_DJANGO_SCHEMA = """ Database schema is using the legacy Django schema. @@ -168,8 +168,8 @@ def validate_storage(self) -> None: def initialise(self) -> None: """Generate the initial storage schema for this profile, from the ORM models.""" - from aiida.backends.psql_dos.backend import CONTAINER_DEFAULTS - from aiida.backends.psql_dos.models.base import get_orm_metadata + from aiida.storage.psql_dos.backend import CONTAINER_DEFAULTS + from aiida.storage.psql_dos.models.base import get_orm_metadata # setup the database # see: https://alembic.sqlalchemy.org/en/latest/cookbook.html#building-an-up-to-date-database-from-scratch diff --git a/aiida/backends/psql_dos/models/__init__.py b/aiida/storage/psql_dos/models/__init__.py similarity index 100% rename from aiida/backends/psql_dos/models/__init__.py rename to aiida/storage/psql_dos/models/__init__.py diff --git a/aiida/backends/psql_dos/models/authinfo.py b/aiida/storage/psql_dos/models/authinfo.py similarity index 100% rename from aiida/backends/psql_dos/models/authinfo.py rename to aiida/storage/psql_dos/models/authinfo.py diff --git a/aiida/backends/psql_dos/models/base.py b/aiida/storage/psql_dos/models/base.py similarity index 96% rename from aiida/backends/psql_dos/models/base.py rename to aiida/storage/psql_dos/models/base.py index f442ebc4c8..3ca9f911ed 100644 --- a/aiida/backends/psql_dos/models/base.py +++ b/aiida/storage/psql_dos/models/base.py @@ -35,7 +35,7 @@ class Model: def get_orm_metadata() -> MetaData: """Return the populated metadata object.""" # we must load all models, to populate the ORM metadata - from aiida.backends.psql_dos.models import ( # pylint: disable=unused-import + from aiida.storage.psql_dos.models import ( # pylint: disable=unused-import authinfo, comment, computer, diff --git a/aiida/backends/psql_dos/models/comment.py b/aiida/storage/psql_dos/models/comment.py similarity index 98% rename from aiida/backends/psql_dos/models/comment.py rename to aiida/storage/psql_dos/models/comment.py index c81f717b13..1b128b79b0 100644 --- a/aiida/backends/psql_dos/models/comment.py +++ b/aiida/storage/psql_dos/models/comment.py @@ -14,9 +14,9 @@ from sqlalchemy.orm import relationship from sqlalchemy.types import DateTime, Integer, Text -from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.models.base import Base class DbComment(Base): diff --git a/aiida/backends/psql_dos/models/computer.py b/aiida/storage/psql_dos/models/computer.py similarity index 98% rename from aiida/backends/psql_dos/models/computer.py rename to aiida/storage/psql_dos/models/computer.py index b1fd64b5b7..2b0549a1eb 100644 --- a/aiida/backends/psql_dos/models/computer.py +++ b/aiida/storage/psql_dos/models/computer.py @@ -14,8 +14,8 @@ from sqlalchemy.sql.schema import Index from sqlalchemy.types import Integer, String, Text -from aiida.backends.psql_dos.models.base import Base from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.models.base import Base class DbComputer(Base): diff --git a/aiida/backends/psql_dos/models/group.py b/aiida/storage/psql_dos/models/group.py similarity index 100% rename from aiida/backends/psql_dos/models/group.py rename to aiida/storage/psql_dos/models/group.py diff --git a/aiida/backends/psql_dos/models/log.py b/aiida/storage/psql_dos/models/log.py similarity index 98% rename from aiida/backends/psql_dos/models/log.py rename to aiida/storage/psql_dos/models/log.py index ec2d4f668e..0097f5b37c 100644 --- a/aiida/backends/psql_dos/models/log.py +++ b/aiida/storage/psql_dos/models/log.py @@ -15,9 +15,9 @@ from sqlalchemy.sql.schema import ForeignKey, Index from sqlalchemy.types import DateTime, Integer, String, Text -from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.models.base import Base class DbLog(Base): diff --git a/aiida/backends/psql_dos/models/node.py b/aiida/storage/psql_dos/models/node.py similarity index 99% rename from aiida/backends/psql_dos/models/node.py rename to aiida/storage/psql_dos/models/node.py index 8257877342..1141e3629b 100644 --- a/aiida/backends/psql_dos/models/node.py +++ b/aiida/storage/psql_dos/models/node.py @@ -15,9 +15,9 @@ from sqlalchemy.sql.schema import ForeignKey, Index from sqlalchemy.types import DateTime, Integer, String, Text -from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.models.base import Base class DbNode(Base): diff --git a/aiida/backends/psql_dos/models/settings.py b/aiida/storage/psql_dos/models/settings.py similarity index 96% rename from aiida/backends/psql_dos/models/settings.py rename to aiida/storage/psql_dos/models/settings.py index 9dc1034099..79b2df94d0 100644 --- a/aiida/backends/psql_dos/models/settings.py +++ b/aiida/storage/psql_dos/models/settings.py @@ -14,8 +14,8 @@ from sqlalchemy.sql.schema import Index from sqlalchemy.types import DateTime, Integer, String, Text -from aiida.backends.psql_dos.models.base import Base from aiida.common import timezone +from aiida.storage.psql_dos.models.base import Base class DbSetting(Base): diff --git a/aiida/backends/psql_dos/models/user.py b/aiida/storage/psql_dos/models/user.py similarity index 97% rename from aiida/backends/psql_dos/models/user.py rename to aiida/storage/psql_dos/models/user.py index 7323ffe02e..c38867c5ba 100644 --- a/aiida/backends/psql_dos/models/user.py +++ b/aiida/storage/psql_dos/models/user.py @@ -14,7 +14,7 @@ from sqlalchemy.sql.schema import Index from sqlalchemy.types import Integer, String -from aiida.backends.psql_dos.models.base import Base +from aiida.storage.psql_dos.models.base import Base class DbUser(Base): diff --git a/aiida/backends/psql_dos/orm/__init__.py b/aiida/storage/psql_dos/orm/__init__.py similarity index 100% rename from aiida/backends/psql_dos/orm/__init__.py rename to aiida/storage/psql_dos/orm/__init__.py diff --git a/aiida/backends/psql_dos/orm/authinfos.py b/aiida/storage/psql_dos/orm/authinfos.py similarity index 98% rename from aiida/backends/psql_dos/orm/authinfos.py rename to aiida/storage/psql_dos/orm/authinfos.py index 481172c6bf..46d19ced70 100644 --- a/aiida/backends/psql_dos/orm/authinfos.py +++ b/aiida/storage/psql_dos/orm/authinfos.py @@ -8,10 +8,10 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Module for the SqlAlchemy backend implementation of the `AuthInfo` ORM class.""" -from aiida.backends.psql_dos.models.authinfo import DbAuthInfo from aiida.common import exceptions from aiida.common.lang import type_check from aiida.orm.implementation.authinfos import BackendAuthInfo, BackendAuthInfoCollection +from aiida.storage.psql_dos.models.authinfo import DbAuthInfo from . import computers, entities, utils diff --git a/aiida/backends/psql_dos/orm/comments.py b/aiida/storage/psql_dos/orm/comments.py similarity index 99% rename from aiida/backends/psql_dos/orm/comments.py rename to aiida/storage/psql_dos/orm/comments.py index 621e4cb519..5f325812ef 100644 --- a/aiida/backends/psql_dos/orm/comments.py +++ b/aiida/storage/psql_dos/orm/comments.py @@ -14,9 +14,9 @@ from sqlalchemy.orm.exc import NoResultFound -from aiida.backends.psql_dos.models import comment as models from aiida.common import exceptions, lang from aiida.orm.implementation.comments import BackendComment, BackendCommentCollection +from aiida.storage.psql_dos.models import comment as models from . import entities, users, utils diff --git a/aiida/backends/psql_dos/orm/computers.py b/aiida/storage/psql_dos/orm/computers.py similarity index 98% rename from aiida/backends/psql_dos/orm/computers.py rename to aiida/storage/psql_dos/orm/computers.py index 8dc8f0ca50..8cb6d43491 100644 --- a/aiida/backends/psql_dos/orm/computers.py +++ b/aiida/storage/psql_dos/orm/computers.py @@ -15,9 +15,9 @@ from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.session import make_transient -from aiida.backends.psql_dos.models.computer import DbComputer from aiida.common import exceptions from aiida.orm.implementation.computers import BackendComputer, BackendComputerCollection +from aiida.storage.psql_dos.models.computer import DbComputer from . import entities, utils diff --git a/aiida/backends/psql_dos/orm/convert.py b/aiida/storage/psql_dos/orm/convert.py similarity index 88% rename from aiida/backends/psql_dos/orm/convert.py rename to aiida/storage/psql_dos/orm/convert.py index 3b1dfa8417..8ad16684a9 100644 --- a/aiida/backends/psql_dos/orm/convert.py +++ b/aiida/storage/psql_dos/orm/convert.py @@ -12,13 +12,13 @@ """ from functools import singledispatch -from aiida.backends.psql_dos.models.authinfo import DbAuthInfo -from aiida.backends.psql_dos.models.comment import DbComment -from aiida.backends.psql_dos.models.computer import DbComputer -from aiida.backends.psql_dos.models.group import DbGroup -from aiida.backends.psql_dos.models.log import DbLog -from aiida.backends.psql_dos.models.node import DbLink, DbNode -from aiida.backends.psql_dos.models.user import DbUser +from aiida.storage.psql_dos.models.authinfo import DbAuthInfo +from aiida.storage.psql_dos.models.comment import DbComment +from aiida.storage.psql_dos.models.computer import DbComputer +from aiida.storage.psql_dos.models.group import DbGroup +from aiida.storage.psql_dos.models.log import DbLog +from aiida.storage.psql_dos.models.node import DbLink, DbNode +from aiida.storage.psql_dos.models.user import DbUser # pylint: disable=cyclic-import diff --git a/aiida/backends/psql_dos/orm/entities.py b/aiida/storage/psql_dos/orm/entities.py similarity index 98% rename from aiida/backends/psql_dos/orm/entities.py rename to aiida/storage/psql_dos/orm/entities.py index 0a09fb075e..b277f6c955 100644 --- a/aiida/backends/psql_dos/orm/entities.py +++ b/aiida/storage/psql_dos/orm/entities.py @@ -10,8 +10,8 @@ """Classes and methods for Django specific backend entities""" from typing import Generic, Set, TypeVar -from aiida.backends.psql_dos.models.base import Base from aiida.common.lang import type_check +from aiida.storage.psql_dos.models.base import Base from . import utils diff --git a/aiida/backends/psql_dos/orm/extras_mixin.py b/aiida/storage/psql_dos/orm/extras_mixin.py similarity index 100% rename from aiida/backends/psql_dos/orm/extras_mixin.py rename to aiida/storage/psql_dos/orm/extras_mixin.py diff --git a/aiida/backends/psql_dos/orm/groups.py b/aiida/storage/psql_dos/orm/groups.py similarity index 97% rename from aiida/backends/psql_dos/orm/groups.py rename to aiida/storage/psql_dos/orm/groups.py index 9ce4448a4b..c399b3123f 100644 --- a/aiida/backends/psql_dos/orm/groups.py +++ b/aiida/storage/psql_dos/orm/groups.py @@ -10,10 +10,10 @@ """SQLA groups""" import logging -from aiida.backends.psql_dos.models.group import DbGroup from aiida.common.exceptions import UniquenessError from aiida.common.lang import type_check from aiida.orm.implementation.groups import BackendGroup, BackendGroupCollection +from aiida.storage.psql_dos.models.group import DbGroup from . import entities, users, utils from .extras_mixin import ExtrasMixin @@ -177,8 +177,8 @@ def add_nodes(self, nodes, **kwargs): from sqlalchemy.dialects.postgresql import insert # pylint: disable=import-error, no-name-in-module from sqlalchemy.exc import IntegrityError # pylint: disable=import-error, no-name-in-module - from aiida.backends.psql_dos.models.base import Base - from aiida.backends.psql_dos.orm.nodes import SqlaNode + from aiida.storage.psql_dos.models.base import Base + from aiida.storage.psql_dos.orm.nodes import SqlaNode super().add_nodes(nodes) skip_orm = kwargs.get('skip_orm', False) @@ -233,8 +233,8 @@ def remove_nodes(self, nodes, **kwargs): """ from sqlalchemy import and_ - from aiida.backends.psql_dos.models.base import Base - from aiida.backends.psql_dos.orm.nodes import SqlaNode + from aiida.storage.psql_dos.models.base import Base + from aiida.storage.psql_dos.orm.nodes import SqlaNode super().remove_nodes(nodes) diff --git a/aiida/backends/psql_dos/orm/logs.py b/aiida/storage/psql_dos/orm/logs.py similarity index 98% rename from aiida/backends/psql_dos/orm/logs.py rename to aiida/storage/psql_dos/orm/logs.py index f7fa2f55e4..f869b084ba 100644 --- a/aiida/backends/psql_dos/orm/logs.py +++ b/aiida/storage/psql_dos/orm/logs.py @@ -12,9 +12,9 @@ from sqlalchemy.orm.exc import NoResultFound -from aiida.backends.psql_dos.models import log as models from aiida.common import exceptions from aiida.orm.implementation import BackendLog, BackendLogCollection +from aiida.storage.psql_dos.models import log as models from . import entities, utils diff --git a/aiida/backends/psql_dos/orm/nodes.py b/aiida/storage/psql_dos/orm/nodes.py similarity index 98% rename from aiida/backends/psql_dos/orm/nodes.py rename to aiida/storage/psql_dos/orm/nodes.py index b0edd5d6ac..b5734807da 100644 --- a/aiida/backends/psql_dos/orm/nodes.py +++ b/aiida/storage/psql_dos/orm/nodes.py @@ -15,11 +15,11 @@ from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.orm.exc import NoResultFound -from aiida.backends.psql_dos.models import node as models from aiida.common import exceptions from aiida.common.lang import type_check from aiida.orm.implementation import BackendNode, BackendNodeCollection from aiida.orm.implementation.utils import clean_value, validate_attribute_extra_key +from aiida.storage.psql_dos.models import node as models from . import entities from . import utils as sqla_utils @@ -195,7 +195,7 @@ def add_incoming(self, source, link_type, link_label): def _add_link(self, source, link_type, link_label): """Add a single link""" - from aiida.backends.psql_dos.models.node import DbLink + from aiida.storage.psql_dos.models.node import DbLink session = self.backend.get_session() diff --git a/aiida/backends/psql_dos/orm/querybuilder/__init__.py b/aiida/storage/psql_dos/orm/querybuilder/__init__.py similarity index 100% rename from aiida/backends/psql_dos/orm/querybuilder/__init__.py rename to aiida/storage/psql_dos/orm/querybuilder/__init__.py diff --git a/aiida/backends/psql_dos/orm/querybuilder/joiner.py b/aiida/storage/psql_dos/orm/querybuilder/joiner.py similarity index 99% rename from aiida/backends/psql_dos/orm/querybuilder/joiner.py rename to aiida/storage/psql_dos/orm/querybuilder/joiner.py index 54adc819a3..bc65ee1301 100644 --- a/aiida/backends/psql_dos/orm/querybuilder/joiner.py +++ b/aiida/storage/psql_dos/orm/querybuilder/joiner.py @@ -19,8 +19,8 @@ from sqlalchemy.sql.schema import Table from sqlalchemy.types import Integer -from aiida.backends.psql_dos.models.base import Model from aiida.common.links import LinkType +from aiida.storage.psql_dos.models.base import Model class _EntityMapper(Protocol): diff --git a/aiida/backends/psql_dos/orm/querybuilder/main.py b/aiida/storage/psql_dos/orm/querybuilder/main.py similarity index 97% rename from aiida/backends/psql_dos/orm/querybuilder/main.py rename to aiida/storage/psql_dos/orm/querybuilder/main.py index 31b097c3da..d7efafe7ef 100644 --- a/aiida/backends/psql_dos/orm/querybuilder/main.py +++ b/aiida/storage/psql_dos/orm/querybuilder/main.py @@ -128,48 +128,48 @@ def set_field_mappings(self): @property def Node(self): - import aiida.backends.psql_dos.models.node - return aiida.backends.psql_dos.models.node.DbNode + import aiida.storage.psql_dos.models.node + return aiida.storage.psql_dos.models.node.DbNode @property def Link(self): - import aiida.backends.psql_dos.models.node - return aiida.backends.psql_dos.models.node.DbLink + import aiida.storage.psql_dos.models.node + return aiida.storage.psql_dos.models.node.DbLink @property def Computer(self): - import aiida.backends.psql_dos.models.computer - return aiida.backends.psql_dos.models.computer.DbComputer + import aiida.storage.psql_dos.models.computer + return aiida.storage.psql_dos.models.computer.DbComputer @property def User(self): - import aiida.backends.psql_dos.models.user - return aiida.backends.psql_dos.models.user.DbUser + import aiida.storage.psql_dos.models.user + return aiida.storage.psql_dos.models.user.DbUser @property def Group(self): - import aiida.backends.psql_dos.models.group - return aiida.backends.psql_dos.models.group.DbGroup + import aiida.storage.psql_dos.models.group + return aiida.storage.psql_dos.models.group.DbGroup @property def AuthInfo(self): - import aiida.backends.psql_dos.models.authinfo - return aiida.backends.psql_dos.models.authinfo.DbAuthInfo + import aiida.storage.psql_dos.models.authinfo + return aiida.storage.psql_dos.models.authinfo.DbAuthInfo @property def Comment(self): - import aiida.backends.psql_dos.models.comment - return aiida.backends.psql_dos.models.comment.DbComment + import aiida.storage.psql_dos.models.comment + return aiida.storage.psql_dos.models.comment.DbComment @property def Log(self): - import aiida.backends.psql_dos.models.log - return aiida.backends.psql_dos.models.log.DbLog + import aiida.storage.psql_dos.models.log + return aiida.storage.psql_dos.models.log.DbLog @property def table_groups_nodes(self): - import aiida.backends.psql_dos.models.group - return aiida.backends.psql_dos.models.group.table_groups_nodes + import aiida.storage.psql_dos.models.group + return aiida.storage.psql_dos.models.group.table_groups_nodes def get_session(self) -> Session: """ diff --git a/aiida/backends/psql_dos/orm/users.py b/aiida/storage/psql_dos/orm/users.py similarity index 97% rename from aiida/backends/psql_dos/orm/users.py rename to aiida/storage/psql_dos/orm/users.py index 84115a15e5..10711ffb4b 100644 --- a/aiida/backends/psql_dos/orm/users.py +++ b/aiida/storage/psql_dos/orm/users.py @@ -8,8 +8,8 @@ # For further information please visit http://www.aiida.net # ########################################################################### """SQLA user""" -from aiida.backends.psql_dos.models.user import DbUser from aiida.orm.implementation.users import BackendUser, BackendUserCollection +from aiida.storage.psql_dos.models.user import DbUser from . import entities, utils diff --git a/aiida/backends/psql_dos/orm/utils.py b/aiida/storage/psql_dos/orm/utils.py similarity index 99% rename from aiida/backends/psql_dos/orm/utils.py rename to aiida/storage/psql_dos/orm/utils.py index 91c09d02c3..e0c8be199a 100644 --- a/aiida/backends/psql_dos/orm/utils.py +++ b/aiida/storage/psql_dos/orm/utils.py @@ -20,7 +20,7 @@ from aiida.common import exceptions if TYPE_CHECKING: - from aiida.backends.psql_dos.backend import PsqlDosBackend + from aiida.storage.psql_dos.backend import PsqlDosBackend IMMUTABLE_MODEL_FIELDS = {'id', 'pk', 'uuid', 'node_type'} diff --git a/aiida/backends/psql_dos/utils.py b/aiida/storage/psql_dos/utils.py similarity index 99% rename from aiida/backends/psql_dos/utils.py rename to aiida/storage/psql_dos/utils.py index 34af3b66ae..7de46c4539 100644 --- a/aiida/backends/psql_dos/utils.py +++ b/aiida/storage/psql_dos/utils.py @@ -74,7 +74,7 @@ def flag_modified(instance, key): """ from sqlalchemy.orm.attributes import flag_modified as flag_modified_sqla - from aiida.backends.psql_dos.orm.utils import ModelWrapper + from aiida.storage.psql_dos.orm.utils import ModelWrapper if isinstance(instance, ModelWrapper): instance = instance._model # pylint: disable=protected-access diff --git a/aiida/backends/testbase.py b/aiida/storage/testbase.py similarity index 100% rename from aiida/backends/testbase.py rename to aiida/storage/testbase.py diff --git a/aiida/tools/archive/implementations/sqlite/backend.py b/aiida/tools/archive/implementations/sqlite/backend.py index 4663c826f2..9d93ce7b1d 100644 --- a/aiida/tools/archive/implementations/sqlite/backend.py +++ b/aiida/tools/archive/implementations/sqlite/backend.py @@ -24,16 +24,16 @@ from sqlalchemy.dialects.sqlite import JSON from sqlalchemy.sql.schema import Table -# we need to import all models, to ensure they are loaded on the SQLA Metadata -from aiida.backends.psql_dos.models import authinfo, base, comment, computer, group, log, node, user -from aiida.backends.psql_dos.orm import authinfos, comments, computers, entities, groups, logs, nodes, users -from aiida.backends.psql_dos.orm.querybuilder import SqlaQueryBuilder -from aiida.backends.psql_dos.orm.utils import ModelWrapper from aiida.common.exceptions import UnreachableStorage from aiida.manage import Profile from aiida.orm.entities import EntityTypes from aiida.orm.implementation.backends import Backend as BackendAbstract from aiida.repository.backend.abstract import AbstractRepositoryBackend +# we need to import all models, to ensure they are loaded on the SQLA Metadata +from aiida.storage.psql_dos.models import authinfo, base, comment, computer, group, log, node, user +from aiida.storage.psql_dos.orm import authinfos, comments, computers, entities, groups, logs, nodes, users +from aiida.storage.psql_dos.orm.querybuilder import SqlaQueryBuilder +from aiida.storage.psql_dos.orm.utils import ModelWrapper from aiida.tools.archive.exceptions import ArchiveClosedError, CorruptArchive, ReadOnlyError from .common import DB_FILENAME, REPO_FOLDER, create_sqla_engine diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py index 721bc12087..2e872db20f 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v04_to_v05.py @@ -13,13 +13,13 @@ In the description of each migration, a revision number is given, which refers to the Django migrations. The individual Django database migrations may be found at: - `aiida.backends.djsite.db.migrations.00XX_.py` + `aiida.storage.djsite.db.migrations.00XX_.py` Where XX are the numbers in the migrations' documentation: REV. 1.0.XX And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.psql_dos.migrations.versions._.py` + `aiida.storage.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py index 275211d9f0..3f6a7ea9c5 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v05_to_v06.py @@ -13,13 +13,13 @@ In the description of each migration, a revision number is given, which refers to the Django migrations. The individual Django database migrations may be found at: - `aiida.backends.djsite.db.migrations.00XX_.py` + `aiida.storage.djsite.db.migrations.00XX_.py` Where XX are the numbers in the migrations' documentation: REV. 1.0.XX And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.psql_dos.migrations.versions._.py` + `aiida.storage.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ @@ -98,7 +98,7 @@ def migration_migrate_legacy_job_calculation_data(data): `process_status`. These are inferred from the old `state` attribute, which is then discarded as its values have been deprecated. """ - from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING + from aiida.storage.psql_dos.migrations.utils.calc_state import STATE_MAPPING calc_job_node_type = 'process.calculation.calcjob.CalcJobNode.' node_data = data['export_data'].get('Node', {}) diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py index 962f6f6969..4b764140f6 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v06_to_v07.py @@ -13,13 +13,13 @@ In the description of each migration, a revision number is given, which refers to the Django migrations. The individual Django database migrations may be found at: - `aiida.backends.djsite.db.migrations.00XX_.py` + `aiida.storage.djsite.db.migrations.00XX_.py` Where XX are the numbers in the migrations' documentation: REV. 1.0.XX And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.psql_dos.migrations.versions._.py` + `aiida.storage.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ @@ -52,7 +52,7 @@ def data_migration_legacy_process_attributes(data): the ProcessNode is in an active state, i.e. `process_state` is one of ('created', 'running', 'waiting'). A log-file, listing all illegal ProcessNodes, will be produced in the current directory. """ - from aiida.backends.psql_dos.migrations.utils.integrity import write_database_integrity_violation + from aiida.storage.psql_dos.migrations.utils.integrity import write_database_integrity_violation from aiida.tools.archive.exceptions import CorruptArchive attrs_to_remove = ['_sealed', '_finished', '_failed', '_aborted', '_do_abort'] diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py index 2f07fcae23..15ea832041 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v07_to_v08.py @@ -13,13 +13,13 @@ In the description of each migration, a revision number is given, which refers to the Django migrations. The individual Django database migrations may be found at: - `aiida.backends.djsite.db.migrations.00XX_.py` + `aiida.storage.djsite.db.migrations.00XX_.py` Where XX are the numbers in the migrations' documentation: REV. 1.0.XX And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.psql_dos.migrations.versions._.py` + `aiida.storage.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ diff --git a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py index 639a1c5aa4..c3c12d616b 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/legacy/v08_to_v09.py @@ -13,13 +13,13 @@ In the description of each migration, a revision number is given, which refers to the Django migrations. The individual Django database migrations may be found at: - `aiida.backends.djsite.db.migrations.00XX_.py` + `aiida.storage.djsite.db.migrations.00XX_.py` Where XX are the numbers in the migrations' documentation: REV. 1.0.XX And migration-name is the name of the particular migration. The individual SQLAlchemy database migrations may be found at: - `aiida.backends.psql_dos.migrations.versions._.py` + `aiida.storage.psql_dos.migrations.versions._.py` Where id is a SQLA id and migration-name is the name of the particular migration. """ diff --git a/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py b/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py index 2c17a59cce..30baf8709f 100644 --- a/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py +++ b/aiida/tools/archive/implementations/sqlite/migrations/v1_db_schema.py @@ -10,7 +10,7 @@ """This is the sqlite DB schema, coresponding to the 34a831f4286d main DB revision. For normal operation of the archive, -we auto-generate the schema from the models in ``aiida.backends.psql_dos.models``. +we auto-generate the schema from the models in ``aiida.storage.psql_dos.models``. However, when migrating an archive from the old format, we require a fixed revision of the schema. The only difference between the PostGreSQL schema and SQLite one, diff --git a/docs/source/internals/database.rst b/docs/source/internals/database.rst index 9cdbfa893d..598b0bc375 100644 --- a/docs/source/internals/database.rst +++ b/docs/source/internals/database.rst @@ -96,25 +96,25 @@ The following section provides a complete schema for each of the tables of the S ``*`` indicates columns with a unique constraint, ``→`` indicate foreign keys, and ``?`` indicate value types that are nullable. -.. sqla-model:: ~aiida.backends.psql_dos.models.node.DbNode +.. sqla-model:: ~aiida.storage.psql_dos.models.node.DbNode -.. sqla-model:: ~aiida.backends.psql_dos.models.node.DbLink +.. sqla-model:: ~aiida.storage.psql_dos.models.node.DbLink -.. sqla-model:: ~aiida.backends.psql_dos.models.group.DbGroup +.. sqla-model:: ~aiida.storage.psql_dos.models.group.DbGroup -.. sqla-model:: ~aiida.backends.psql_dos.models.group.DbGroupNode +.. sqla-model:: ~aiida.storage.psql_dos.models.group.DbGroupNode -.. sqla-model:: ~aiida.backends.psql_dos.models.user.DbUser +.. sqla-model:: ~aiida.storage.psql_dos.models.user.DbUser -.. sqla-model:: ~aiida.backends.psql_dos.models.computer.DbComputer +.. sqla-model:: ~aiida.storage.psql_dos.models.computer.DbComputer -.. sqla-model:: ~aiida.backends.psql_dos.models.authinfo.DbAuthInfo +.. sqla-model:: ~aiida.storage.psql_dos.models.authinfo.DbAuthInfo -.. sqla-model:: ~aiida.backends.psql_dos.models.comment.DbComment +.. sqla-model:: ~aiida.storage.psql_dos.models.comment.DbComment -.. sqla-model:: ~aiida.backends.psql_dos.models.log.DbLog +.. sqla-model:: ~aiida.storage.psql_dos.models.log.DbLog -.. sqla-model:: ~aiida.backends.psql_dos.models.settings.DbSetting +.. sqla-model:: ~aiida.storage.psql_dos.models.settings.DbSetting Sequence tables diff --git a/tests/cmdline/commands/test_calcjob.py b/tests/cmdline/commands/test_calcjob.py index 8210c5c545..9c75795392 100644 --- a/tests/cmdline/commands/test_calcjob.py +++ b/tests/cmdline/commands/test_calcjob.py @@ -14,12 +14,12 @@ from click.testing import CliRunner from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_calcjob as command from aiida.common.datastructures import CalcJobState from aiida.orm.nodes.data.remote.base import RemoteData from aiida.plugins import CalculationFactory from aiida.plugins.entry_point import get_entry_point_string_from_class +from aiida.storage.testbase import AiidaTestCase from tests.utils.archives import import_test_archive diff --git a/tests/cmdline/commands/test_computer.py b/tests/cmdline/commands/test_computer.py index 0aaa043bdb..c64b72c5d2 100644 --- a/tests/cmdline/commands/test_computer.py +++ b/tests/cmdline/commands/test_computer.py @@ -17,7 +17,6 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands.cmd_computer import ( computer_configure, computer_delete, @@ -28,6 +27,7 @@ computer_show, computer_test, ) +from aiida.storage.testbase import AiidaTestCase def generate_setup_options_dict(replace_args=None, non_interactive=True): diff --git a/tests/cmdline/commands/test_data.py b/tests/cmdline/commands/test_data.py index f64edd5baf..053bdb442e 100644 --- a/tests/cmdline/commands/test_data.py +++ b/tests/cmdline/commands/test_data.py @@ -23,7 +23,6 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_group from aiida.cmdline.commands.cmd_data import ( cmd_array, @@ -39,6 +38,7 @@ from aiida.engine import calcfunction from aiida.orm import ArrayData, BandsData, CifData, Dict, Group, KpointsData, RemoteData, StructureData, TrajectoryData from aiida.orm.nodes.data.cif import has_pycifrw +from aiida.storage.testbase import AiidaTestCase from tests.static import STATIC_DIR diff --git a/tests/cmdline/commands/test_group.py b/tests/cmdline/commands/test_group.py index 3d177b160b..f92b503665 100644 --- a/tests/cmdline/commands/test_group.py +++ b/tests/cmdline/commands/test_group.py @@ -9,10 +9,10 @@ ########################################################################### """Tests for the `verdi group` command.""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_group from aiida.cmdline.utils.echo import ExitCode from aiida.common import exceptions +from aiida.storage.testbase import AiidaTestCase class TestVerdiGroup(AiidaTestCase): diff --git a/tests/cmdline/commands/test_help.py b/tests/cmdline/commands/test_help.py index 82310bbdb6..83c632cd0f 100644 --- a/tests/cmdline/commands/test_help.py +++ b/tests/cmdline/commands/test_help.py @@ -11,8 +11,8 @@ from click.testing import CliRunner import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_verdi +from aiida.storage.testbase import AiidaTestCase @pytest.mark.usefixtures('config_with_profile') diff --git a/tests/cmdline/commands/test_node.py b/tests/cmdline/commands/test_node.py index 47d9e0e380..28c11280c3 100644 --- a/tests/cmdline/commands/test_node.py +++ b/tests/cmdline/commands/test_node.py @@ -19,8 +19,8 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_node +from aiida.storage.testbase import AiidaTestCase def get_result_lines(result): diff --git a/tests/cmdline/commands/test_process.py b/tests/cmdline/commands/test_process.py index 666ba51af4..d3e228aca6 100644 --- a/tests/cmdline/commands/test_process.py +++ b/tests/cmdline/commands/test_process.py @@ -18,11 +18,11 @@ import pytest from aiida import get_profile -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_process from aiida.common.links import LinkType from aiida.common.log import LOG_LEVEL_REPORT from aiida.orm import CalcJobNode, WorkChainNode, WorkflowNode, WorkFunctionNode +from aiida.storage.testbase import AiidaTestCase from tests.utils import processes as test_processes diff --git a/tests/cmdline/commands/test_profile.py b/tests/cmdline/commands/test_profile.py index a05c62f806..0bbcd4ac7e 100644 --- a/tests/cmdline/commands/test_profile.py +++ b/tests/cmdline/commands/test_profile.py @@ -12,9 +12,9 @@ from click.testing import CliRunner import pytest -from aiida.backends.testbase import AiidaPostgresTestCase from aiida.cmdline.commands import cmd_profile, cmd_verdi from aiida.manage import configuration, get_manager +from aiida.storage.testbase import AiidaPostgresTestCase from tests.utils.configuration import create_mock_profile diff --git a/tests/cmdline/commands/test_run.py b/tests/cmdline/commands/test_run.py index 6b26747e31..dd0672b0bc 100644 --- a/tests/cmdline/commands/test_run.py +++ b/tests/cmdline/commands/test_run.py @@ -14,9 +14,9 @@ from click.testing import CliRunner import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_run from aiida.common.log import override_log_level +from aiida.storage.testbase import AiidaTestCase class TestVerdiRun(AiidaTestCase): diff --git a/tests/cmdline/commands/test_setup.py b/tests/cmdline/commands/test_setup.py index 95bb84f395..76507a8fbc 100644 --- a/tests/cmdline/commands/test_setup.py +++ b/tests/cmdline/commands/test_setup.py @@ -16,10 +16,10 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaPostgresTestCase from aiida.cmdline.commands import cmd_setup from aiida.manage import configuration, get_manager from aiida.manage.external.postgres import Postgres +from aiida.storage.testbase import AiidaPostgresTestCase @pytest.mark.usefixtures('config_with_profile') diff --git a/tests/cmdline/commands/test_status.py b/tests/cmdline/commands/test_status.py index 33cd62b50c..2d46adbe84 100644 --- a/tests/cmdline/commands/test_status.py +++ b/tests/cmdline/commands/test_status.py @@ -11,9 +11,9 @@ import pytest from aiida import __version__, get_profile -from aiida.backends.psql_dos import migrator from aiida.cmdline.commands import cmd_status from aiida.cmdline.utils.echo import ExitCode +from aiida.storage.psql_dos import migrator @pytest.mark.requires_rmq diff --git a/tests/cmdline/commands/test_storage.py b/tests/cmdline/commands/test_storage.py index fb1168b9ce..c8f4e6f2f9 100644 --- a/tests/cmdline/commands/test_storage.py +++ b/tests/cmdline/commands/test_storage.py @@ -118,7 +118,7 @@ def tests_storage_maintain_logging(run_cli_command, monkeypatch, caplog): """Test all the information and cases of the storage maintain command.""" import logging - from aiida.backends import control + from aiida.storage import control def mock_maintain(**kwargs): logmsg = 'Provided kwargs:\n' diff --git a/tests/cmdline/commands/test_user.py b/tests/cmdline/commands/test_user.py index 50a58d1742..f8d4160c5f 100644 --- a/tests/cmdline/commands/test_user.py +++ b/tests/cmdline/commands/test_user.py @@ -12,8 +12,8 @@ from click.testing import CliRunner from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands import cmd_user +from aiida.storage.testbase import AiidaTestCase USER_1 = { # pylint: disable=invalid-name 'email': 'testuser1@localhost', diff --git a/tests/cmdline/params/types/test_calculation.py b/tests/cmdline/params/types/test_calculation.py index 893900193d..fcacd3052f 100644 --- a/tests/cmdline/params/types/test_calculation.py +++ b/tests/cmdline/params/types/test_calculation.py @@ -9,10 +9,10 @@ ########################################################################### """Tests for the `CalculationParamType`.""" -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.params.types import CalculationParamType from aiida.orm import CalcFunctionNode, CalcJobNode, CalculationNode, WorkChainNode, WorkFunctionNode from aiida.orm.utils.loaders import OrmEntityLoader +from aiida.storage.testbase import AiidaTestCase class TestCalculationParamType(AiidaTestCase): diff --git a/tests/cmdline/params/types/test_data.py b/tests/cmdline/params/types/test_data.py index e541574bbf..30dd277a44 100644 --- a/tests/cmdline/params/types/test_data.py +++ b/tests/cmdline/params/types/test_data.py @@ -9,10 +9,10 @@ ########################################################################### """Tests for the `DataParamType`.""" -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.params.types import DataParamType from aiida.orm import Data from aiida.orm.utils.loaders import OrmEntityLoader +from aiida.storage.testbase import AiidaTestCase class TestDataParamType(AiidaTestCase): diff --git a/tests/cmdline/params/types/test_identifier.py b/tests/cmdline/params/types/test_identifier.py index 0bc8747ae4..c9cb1c6f64 100644 --- a/tests/cmdline/params/types/test_identifier.py +++ b/tests/cmdline/params/types/test_identifier.py @@ -11,9 +11,9 @@ import click -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.params.types import IdentifierParamType, NodeParamType from aiida.orm import Bool, Float, Int +from aiida.storage.testbase import AiidaTestCase class TestIdentifierParamType(AiidaTestCase): diff --git a/tests/cmdline/params/types/test_node.py b/tests/cmdline/params/types/test_node.py index ecd3b53d72..9b9ac85ce9 100644 --- a/tests/cmdline/params/types/test_node.py +++ b/tests/cmdline/params/types/test_node.py @@ -8,10 +8,10 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for the `NodeParamType`.""" -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.params.types import NodeParamType from aiida.orm import Data from aiida.orm.utils.loaders import OrmEntityLoader +from aiida.storage.testbase import AiidaTestCase class TestNodeParamType(AiidaTestCase): diff --git a/tests/cmdline/params/types/test_path.py b/tests/cmdline/params/types/test_path.py index 84f76609a0..5acd65ca27 100644 --- a/tests/cmdline/params/types/test_path.py +++ b/tests/cmdline/params/types/test_path.py @@ -8,8 +8,8 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for Path types""" -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.params.types.path import PathOrUrl, check_timeout_seconds +from aiida.storage.testbase import AiidaTestCase class TestPath(AiidaTestCase): diff --git a/tests/cmdline/params/types/test_plugin.py b/tests/cmdline/params/types/test_plugin.py index 98bee64122..760f58f0f5 100644 --- a/tests/cmdline/params/types/test_plugin.py +++ b/tests/cmdline/params/types/test_plugin.py @@ -11,9 +11,9 @@ import click -from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.params.types.plugin import PluginParamType from aiida.plugins.entry_point import get_entry_point_from_string +from aiida.storage.testbase import AiidaTestCase class TestPluginParamType(AiidaTestCase): diff --git a/tests/common/test_hashing.py b/tests/common/test_hashing.py index 6d0f9f76a1..7a71fd8929 100644 --- a/tests/common/test_hashing.py +++ b/tests/common/test_hashing.py @@ -26,12 +26,12 @@ except ImportError: import unittest -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import HashingError from aiida.common.folders import SandboxFolder from aiida.common.hashing import chunked_file_hash, float_to_text, make_hash from aiida.common.utils import DatetimePrecision from aiida.orm import Dict +from aiida.storage.testbase import AiidaTestCase class FloatToTextTest(unittest.TestCase): diff --git a/tests/common/test_links.py b/tests/common/test_links.py index 2c03a2020c..6880270140 100644 --- a/tests/common/test_links.py +++ b/tests/common/test_links.py @@ -9,8 +9,8 @@ ########################################################################### """Tests for the links utilities.""" -from aiida.backends.testbase import AiidaTestCase from aiida.common.links import validate_link_label +from aiida.storage.testbase import AiidaTestCase class TestValidateLinkLabel(AiidaTestCase): diff --git a/tests/engine/daemon/test_client.py b/tests/engine/daemon/test_client.py index e344cc24c1..8056ed4394 100644 --- a/tests/engine/daemon/test_client.py +++ b/tests/engine/daemon/test_client.py @@ -11,8 +11,8 @@ import zmq -from aiida.backends.testbase import AiidaTestCase from aiida.engine.daemon.client import get_daemon_client +from aiida.storage.testbase import AiidaTestCase class TestDaemonClient(AiidaTestCase): diff --git a/tests/engine/processes/calcjobs/test_calc_job.py b/tests/engine/processes/calcjobs/test_calc_job.py index 806cb52238..811287e550 100644 --- a/tests/engine/processes/calcjobs/test_calc_job.py +++ b/tests/engine/processes/calcjobs/test_calc_job.py @@ -20,12 +20,12 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import CalcJobState, LinkType, StashMode, exceptions from aiida.engine import CalcJob, CalcJobImporter, ExitCode, Process, launch from aiida.engine.processes.calcjobs.calcjob import validate_stash_options from aiida.engine.processes.ports import PortNamespace from aiida.plugins import CalculationFactory +from aiida.storage.testbase import AiidaTestCase ArithmeticAddCalculation = CalculationFactory('core.arithmetic.add') # pylint: disable=invalid-name diff --git a/tests/engine/processes/workchains/test_utils.py b/tests/engine/processes/workchains/test_utils.py index 694d92ca08..d0171c5ad5 100644 --- a/tests/engine/processes/workchains/test_utils.py +++ b/tests/engine/processes/workchains/test_utils.py @@ -11,12 +11,12 @@ """Tests for `aiida.engine.processes.workchains.utils` module.""" import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.engine import ExitCode, ProcessState from aiida.engine.processes.workchains.restart import BaseRestartWorkChain from aiida.engine.processes.workchains.utils import ProcessHandlerReport, process_handler from aiida.orm import ProcessNode from aiida.plugins import CalculationFactory +from aiida.storage.testbase import AiidaTestCase ArithmeticAddCalculation = CalculationFactory('core.arithmetic.add') diff --git a/tests/engine/test_calcfunctions.py b/tests/engine/test_calcfunctions.py index aea81d99c7..d3d029297d 100644 --- a/tests/engine/test_calcfunctions.py +++ b/tests/engine/test_calcfunctions.py @@ -10,12 +10,12 @@ """Tests for the calcfunction decorator and CalcFunctionNode.""" import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.common.links import LinkType from aiida.engine import Process, calcfunction from aiida.manage.caching import enable_caching from aiida.orm import CalcFunctionNode, Int +from aiida.storage.testbase import AiidaTestCase # Global required for one of the caching tests to keep track of the number of times the calculation function is executed EXECUTION_COUNTER = 0 diff --git a/tests/engine/test_class_loader.py b/tests/engine/test_class_loader.py index 3f593044b1..e04e836bd4 100644 --- a/tests/engine/test_class_loader.py +++ b/tests/engine/test_class_loader.py @@ -9,9 +9,9 @@ ########################################################################### """A module to test class loader factories.""" import aiida -from aiida.backends.testbase import AiidaTestCase from aiida.engine import Process from aiida.plugins import CalculationFactory +from aiida.storage.testbase import AiidaTestCase class TestCalcJob(AiidaTestCase): diff --git a/tests/engine/test_futures.py b/tests/engine/test_futures.py index 1c63f2e9a0..33fea6c2ba 100644 --- a/tests/engine/test_futures.py +++ b/tests/engine/test_futures.py @@ -12,9 +12,9 @@ import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.engine import processes, run from aiida.manage import get_manager +from aiida.storage.testbase import AiidaTestCase from tests.utils import processes as test_processes diff --git a/tests/engine/test_launch.py b/tests/engine/test_launch.py index 5fecee0fcc..345585e28b 100644 --- a/tests/engine/test_launch.py +++ b/tests/engine/test_launch.py @@ -11,9 +11,9 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.engine import CalcJob, Process, WorkChain, calcfunction, launch +from aiida.storage.testbase import AiidaTestCase @calcfunction diff --git a/tests/engine/test_manager.py b/tests/engine/test_manager.py index 94e07305a4..89958a2b14 100644 --- a/tests/engine/test_manager.py +++ b/tests/engine/test_manager.py @@ -12,10 +12,10 @@ import asyncio import time -from aiida.backends.testbase import AiidaTestCase from aiida.engine.processes.calcjobs.manager import JobManager, JobsList from aiida.engine.transports import TransportQueue from aiida.orm import AuthInfo, User +from aiida.storage.testbase import AiidaTestCase class TestJobManager(AiidaTestCase): diff --git a/tests/engine/test_persistence.py b/tests/engine/test_persistence.py index 958986ce34..e54703ccdc 100644 --- a/tests/engine/test_persistence.py +++ b/tests/engine/test_persistence.py @@ -11,9 +11,9 @@ import plumpy import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.engine import Process, run from aiida.engine.persistence import AiiDAPersister +from aiida.storage.testbase import AiidaTestCase from tests.utils.processes import DummyProcess diff --git a/tests/engine/test_ports.py b/tests/engine/test_ports.py index 796571d407..e5f26cf5b2 100644 --- a/tests/engine/test_ports.py +++ b/tests/engine/test_ports.py @@ -9,9 +9,9 @@ ########################################################################### """Tests for process spec ports.""" -from aiida.backends.testbase import AiidaTestCase from aiida.engine.processes.ports import InputPort, PortNamespace from aiida.orm import Dict, Int +from aiida.storage.testbase import AiidaTestCase class TestInputPort(AiidaTestCase): diff --git a/tests/engine/test_process.py b/tests/engine/test_process.py index 71e1154dfe..bdf9144986 100644 --- a/tests/engine/test_process.py +++ b/tests/engine/test_process.py @@ -16,12 +16,12 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common.lang import override from aiida.engine import ExitCode, ExitCodesNamespace, Process, run, run_get_node, run_get_pk from aiida.engine.processes.ports import PortNamespace from aiida.manage.caching import enable_caching from aiida.plugins import CalculationFactory +from aiida.storage.testbase import AiidaTestCase from tests.utils import processes as test_processes diff --git a/tests/engine/test_process_function.py b/tests/engine/test_process_function.py index efd636897f..c118b965f7 100644 --- a/tests/engine/test_process_function.py +++ b/tests/engine/test_process_function.py @@ -11,9 +11,9 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.engine import ExitCode, Process, calcfunction, run, run_get_node, submit, workfunction from aiida.orm.nodes.data.bool import get_true_node +from aiida.storage.testbase import AiidaTestCase from aiida.workflows.arithmetic.add_multiply import add_multiply DEFAULT_INT = 256 diff --git a/tests/engine/test_process_spec.py b/tests/engine/test_process_spec.py index 1dfc622e74..345e0d6f11 100644 --- a/tests/engine/test_process_spec.py +++ b/tests/engine/test_process_spec.py @@ -9,9 +9,9 @@ ########################################################################### """Tests for the `ProcessSpec` class.""" -from aiida.backends.testbase import AiidaTestCase from aiida.engine import Process from aiida.orm import Data, Node +from aiida.storage.testbase import AiidaTestCase class TestProcessSpec(AiidaTestCase): diff --git a/tests/engine/test_rmq.py b/tests/engine/test_rmq.py index c54bb56c97..5b49308ee0 100644 --- a/tests/engine/test_rmq.py +++ b/tests/engine/test_rmq.py @@ -13,10 +13,10 @@ import plumpy import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.engine import ProcessState from aiida.manage import get_manager from aiida.orm import Int +from aiida.storage.testbase import AiidaTestCase from tests.utils import processes as test_processes diff --git a/tests/engine/test_run.py b/tests/engine/test_run.py index 3722f912ea..a150f21b28 100644 --- a/tests/engine/test_run.py +++ b/tests/engine/test_run.py @@ -10,9 +10,9 @@ """Tests for the `run` functions.""" import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.engine import run, run_get_node from aiida.orm import Int, ProcessNode, Str +from aiida.storage.testbase import AiidaTestCase from tests.utils.processes import DummyProcess diff --git a/tests/engine/test_transport.py b/tests/engine/test_transport.py index 7bf0acf6d9..7bd0e519e1 100644 --- a/tests/engine/test_transport.py +++ b/tests/engine/test_transport.py @@ -11,8 +11,8 @@ import asyncio from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.engine.transports import TransportQueue +from aiida.storage.testbase import AiidaTestCase class TestTransportQueue(AiidaTestCase): diff --git a/tests/engine/test_utils.py b/tests/engine/test_utils.py index 8bb077819c..8018ed0ef0 100644 --- a/tests/engine/test_utils.py +++ b/tests/engine/test_utils.py @@ -14,9 +14,9 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.engine import calcfunction, workfunction from aiida.engine.utils import InterruptableFuture, exponential_backoff_retry, interruptable_task, is_process_function +from aiida.storage.testbase import AiidaTestCase ITERATION = 0 MAX_ITERATIONS = 3 diff --git a/tests/engine/test_work_chain.py b/tests/engine/test_work_chain.py index 6479b5109f..65ec106910 100644 --- a/tests/engine/test_work_chain.py +++ b/tests/engine/test_work_chain.py @@ -16,7 +16,6 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.common.links import LinkType from aiida.common.utils import Capturing @@ -24,6 +23,7 @@ from aiida.engine.persistence import ObjectLoader from aiida.manage import get_manager from aiida.orm import Bool, Float, Int, Str, load_node +from aiida.storage.testbase import AiidaTestCase def run_until_paused(proc): diff --git a/tests/engine/test_workfunctions.py b/tests/engine/test_workfunctions.py index d449a6357d..e47ecae994 100644 --- a/tests/engine/test_workfunctions.py +++ b/tests/engine/test_workfunctions.py @@ -10,11 +10,11 @@ """Tests for the workfunction decorator and WorkFunctionNode.""" import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.common.links import LinkType from aiida.engine import Process, calcfunction, workfunction from aiida.manage.caching import enable_caching from aiida.orm import CalcFunctionNode, Int, WorkFunctionNode +from aiida.storage.testbase import AiidaTestCase @pytest.mark.requires_rmq diff --git a/tests/manage/configuration/test_options.py b/tests/manage/configuration/test_options.py index 40ee872a76..f9d783c250 100644 --- a/tests/manage/configuration/test_options.py +++ b/tests/manage/configuration/test_options.py @@ -11,10 +11,10 @@ import pytest from aiida import get_profile -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import ConfigurationError from aiida.manage.configuration import ConfigValidationError, get_config, get_config_option from aiida.manage.configuration.options import Option, get_option, get_option_names, parse_option +from aiida.storage.testbase import AiidaTestCase class TestConfigurationOptions(AiidaTestCase): diff --git a/tests/manage/configuration/test_profile.py b/tests/manage/configuration/test_profile.py index 55a8519a20..cd2bc13c21 100644 --- a/tests/manage/configuration/test_profile.py +++ b/tests/manage/configuration/test_profile.py @@ -12,8 +12,8 @@ import os import uuid -from aiida.backends.testbase import AiidaTestCase from aiida.manage.configuration import Profile +from aiida.storage.testbase import AiidaTestCase from tests.utils.configuration import create_mock_profile diff --git a/tests/orm/implementation/test_comments.py b/tests/orm/implementation/test_comments.py index 04ecfe6831..a380806014 100644 --- a/tests/orm/implementation/test_comments.py +++ b/tests/orm/implementation/test_comments.py @@ -15,8 +15,8 @@ import pytz from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions, timezone +from aiida.storage.testbase import AiidaTestCase class TestBackendComment(AiidaTestCase): diff --git a/tests/orm/implementation/test_logs.py b/tests/orm/implementation/test_logs.py index 3ef2c5c1dd..7f7bcff730 100644 --- a/tests/orm/implementation/test_logs.py +++ b/tests/orm/implementation/test_logs.py @@ -16,9 +16,9 @@ import pytz from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions, timezone from aiida.common.log import LOG_LEVEL_REPORT +from aiida.storage.testbase import AiidaTestCase class TestBackendLog(AiidaTestCase): diff --git a/tests/orm/implementation/test_nodes.py b/tests/orm/implementation/test_nodes.py index 135a751b52..22faff9bf8 100644 --- a/tests/orm/implementation/test_nodes.py +++ b/tests/orm/implementation/test_nodes.py @@ -16,8 +16,8 @@ import pytz -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions, timezone +from aiida.storage.testbase import AiidaTestCase class TestBackendNode(AiidaTestCase): diff --git a/tests/orm/implementation/test_utils.py b/tests/orm/implementation/test_utils.py index b06c1a6c36..f7e7d60925 100644 --- a/tests/orm/implementation/test_utils.py +++ b/tests/orm/implementation/test_utils.py @@ -10,9 +10,9 @@ """Unit tests for the backend non-specific utility methods.""" import math -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.orm.implementation.utils import FIELD_SEPARATOR, clean_value, validate_attribute_extra_key +from aiida.storage.testbase import AiidaTestCase class TestOrmImplementationUtils(AiidaTestCase): diff --git a/tests/orm/nodes/data/test_kpoints.py b/tests/orm/nodes/data/test_kpoints.py index cb0df80ee5..1a8005d2ae 100644 --- a/tests/orm/nodes/data/test_kpoints.py +++ b/tests/orm/nodes/data/test_kpoints.py @@ -11,8 +11,8 @@ import numpy as np -from aiida.backends.testbase import AiidaTestCase from aiida.orm import KpointsData, StructureData, load_node +from aiida.storage.testbase import AiidaTestCase class TestKpoints(AiidaTestCase): diff --git a/tests/orm/nodes/data/test_orbital.py b/tests/orm/nodes/data/test_orbital.py index fdd23890d6..09d9c57701 100644 --- a/tests/orm/nodes/data/test_orbital.py +++ b/tests/orm/nodes/data/test_orbital.py @@ -11,10 +11,10 @@ import copy -from aiida.backends.testbase import AiidaTestCase from aiida.common import ValidationError from aiida.orm import OrbitalData from aiida.plugins import OrbitalFactory +from aiida.storage.testbase import AiidaTestCase class TestOrbitalData(AiidaTestCase): diff --git a/tests/orm/nodes/data/test_trajectory.py b/tests/orm/nodes/data/test_trajectory.py index 545cafec7a..aaf6abe284 100644 --- a/tests/orm/nodes/data/test_trajectory.py +++ b/tests/orm/nodes/data/test_trajectory.py @@ -3,8 +3,8 @@ import numpy as np -from aiida.backends.testbase import AiidaTestCase from aiida.orm import TrajectoryData, load_node +from aiida.storage.testbase import AiidaTestCase class TestTrajectory(AiidaTestCase): diff --git a/tests/orm/nodes/data/test_upf.py b/tests/orm/nodes/data/test_upf.py index 7d59493f3b..4922aa1bcf 100644 --- a/tests/orm/nodes/data/test_upf.py +++ b/tests/orm/nodes/data/test_upf.py @@ -21,9 +21,9 @@ from numpy import array, isclose from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import ParsingError from aiida.orm.nodes.data.upf import parse_upf +from aiida.storage.testbase import AiidaTestCase from tests.static import STATIC_DIR diff --git a/tests/orm/nodes/test_calcjob.py b/tests/orm/nodes/test_calcjob.py index 420118a0b6..a963c50021 100644 --- a/tests/orm/nodes/test_calcjob.py +++ b/tests/orm/nodes/test_calcjob.py @@ -10,9 +10,9 @@ """Tests for the `CalcJobNode` node sub class.""" import io -from aiida.backends.testbase import AiidaTestCase from aiida.common import CalcJobState, LinkType from aiida.orm import CalcJobNode, FolderData +from aiida.storage.testbase import AiidaTestCase class TestCalcJobNode(AiidaTestCase): diff --git a/tests/orm/test_authinfos.py b/tests/orm/test_authinfos.py index 07051662d4..d4a4127f4d 100644 --- a/tests/orm/test_authinfos.py +++ b/tests/orm/test_authinfos.py @@ -9,9 +9,9 @@ ########################################################################### """Unit tests for the AuthInfo ORM class.""" -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.orm import authinfos +from aiida.storage.testbase import AiidaTestCase class TestAuthinfo(AiidaTestCase): diff --git a/tests/orm/test_comments.py b/tests/orm/test_comments.py index 5434fdc0de..6cd3c77764 100644 --- a/tests/orm/test_comments.py +++ b/tests/orm/test_comments.py @@ -10,9 +10,9 @@ """Unit tests for the Comment ORM class.""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.orm.comments import Comment +from aiida.storage.testbase import AiidaTestCase class TestComment(AiidaTestCase): diff --git a/tests/orm/test_computers.py b/tests/orm/test_computers.py index 05eea1ad00..fa43e17450 100644 --- a/tests/orm/test_computers.py +++ b/tests/orm/test_computers.py @@ -10,8 +10,8 @@ """Tests for the `Computer` ORM class.""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions +from aiida.storage.testbase import AiidaTestCase class TestComputer(AiidaTestCase): diff --git a/tests/orm/test_entities.py b/tests/orm/test_entities.py index 3287799357..f35e193793 100644 --- a/tests/orm/test_entities.py +++ b/tests/orm/test_entities.py @@ -10,7 +10,7 @@ """Test for general backend entities""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase +from aiida.storage.testbase import AiidaTestCase class TestBackendEntitiesAndCollections(AiidaTestCase): diff --git a/tests/orm/test_groups.py b/tests/orm/test_groups.py index 194948e537..ff65d3d852 100644 --- a/tests/orm/test_groups.py +++ b/tests/orm/test_groups.py @@ -11,8 +11,8 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions +from aiida.storage.testbase import AiidaTestCase class TestGroups(AiidaTestCase): diff --git a/tests/orm/test_logs.py b/tests/orm/test_logs.py index 47ebd34a83..e65b380265 100644 --- a/tests/orm/test_logs.py +++ b/tests/orm/test_logs.py @@ -12,11 +12,11 @@ import logging from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.common.log import LOG_LEVEL_REPORT from aiida.common.timezone import now from aiida.orm import Log +from aiida.storage.testbase import AiidaTestCase class TestBackendLog(AiidaTestCase): diff --git a/tests/orm/test_mixins.py b/tests/orm/test_mixins.py index aa949da708..d176b59b67 100644 --- a/tests/orm/test_mixins.py +++ b/tests/orm/test_mixins.py @@ -9,11 +9,11 @@ ########################################################################### """Tests for the ORM mixin classes.""" -from aiida.backends.testbase import AiidaTestCase from aiida.common import exceptions from aiida.common.links import LinkType from aiida.orm import CalculationNode, Int from aiida.orm.utils.mixins import Sealable +from aiida.storage.testbase import AiidaTestCase class TestSealable(AiidaTestCase): diff --git a/tests/orm/utils/test_loaders.py b/tests/orm/utils/test_loaders.py index 00d1574561..26f867d72d 100644 --- a/tests/orm/utils/test_loaders.py +++ b/tests/orm/utils/test_loaders.py @@ -8,11 +8,11 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Module to test orm utilities to load nodes, codes etc.""" -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import NotExistent from aiida.orm import Data, Group, Node from aiida.orm.utils import load_code, load_computer, load_entity, load_group, load_node from aiida.orm.utils.loaders import NodeEntityLoader +from aiida.storage.testbase import AiidaTestCase class TestOrmUtils(AiidaTestCase): diff --git a/tests/orm/utils/test_node.py b/tests/orm/utils/test_node.py index dadeea9e76..1b8214e631 100644 --- a/tests/orm/utils/test_node.py +++ b/tests/orm/utils/test_node.py @@ -10,9 +10,9 @@ """Tests for the `Node` utils.""" import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.orm import Data from aiida.orm.utils.node import load_node_class +from aiida.storage.testbase import AiidaTestCase class TestLoadNodeClass(AiidaTestCase): diff --git a/tests/parsers/test_parser.py b/tests/parsers/test_parser.py index b3bca4651d..04bd7154f8 100644 --- a/tests/parsers/test_parser.py +++ b/tests/parsers/test_parser.py @@ -14,12 +14,12 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import LinkType from aiida.engine import CalcJob from aiida.parsers import Parser from aiida.parsers.plugins.arithmetic.add import SimpleArithmeticAddParser # for demonstration purposes only from aiida.plugins import CalculationFactory, ParserFactory +from aiida.storage.testbase import AiidaTestCase ArithmeticAddCalculation = CalculationFactory('core.arithmetic.add') # pylint: disable=invalid-name ArithmeticAddParser = ParserFactory('core.arithmetic.add') # pylint: disable=invalid-name diff --git a/tests/plugins/test_utils.py b/tests/plugins/test_utils.py index 23e2acf1b7..8b259c1988 100644 --- a/tests/plugins/test_utils.py +++ b/tests/plugins/test_utils.py @@ -9,10 +9,10 @@ ########################################################################### """Tests for utilities dealing with plugins and entry points.""" from aiida import __version__ as version_core -from aiida.backends.testbase import AiidaTestCase from aiida.engine import WorkChain, calcfunction from aiida.plugins import CalculationFactory from aiida.plugins.utils import PluginVersionProvider +from aiida.storage.testbase import AiidaTestCase class TestPluginVersionProvider(AiidaTestCase): diff --git a/tests/restapi/test_routes.py b/tests/restapi/test_routes.py index 912ddc968e..1a71fc30b0 100644 --- a/tests/restapi/test_routes.py +++ b/tests/restapi/test_routes.py @@ -15,10 +15,10 @@ from flask_cors.core import ACL_ORIGIN from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import json from aiida.common.links import LinkType from aiida.restapi.run_api import configure_api +from aiida.storage.testbase import AiidaTestCase class RESTApiTestCase(AiidaTestCase): diff --git a/tests/backends/__init__.py b/tests/storage/__init__.py similarity index 100% rename from tests/backends/__init__.py rename to tests/storage/__init__.py diff --git a/tests/backends/psql_dos/__init__.py b/tests/storage/psql_dos/__init__.py similarity index 100% rename from tests/backends/psql_dos/__init__.py rename to tests/storage/psql_dos/__init__.py diff --git a/tests/backends/psql_dos/conftest.py b/tests/storage/psql_dos/conftest.py similarity index 100% rename from tests/backends/psql_dos/conftest.py rename to tests/storage/psql_dos/conftest.py diff --git a/tests/backends/psql_dos/migrations/__init__.py b/tests/storage/psql_dos/migrations/__init__.py similarity index 100% rename from tests/backends/psql_dos/migrations/__init__.py rename to tests/storage/psql_dos/migrations/__init__.py diff --git a/tests/backends/psql_dos/migrations/conftest.py b/tests/storage/psql_dos/migrations/conftest.py similarity index 98% rename from tests/backends/psql_dos/migrations/conftest.py rename to tests/storage/psql_dos/migrations/conftest.py index 2ed08ca228..0650cc9a75 100644 --- a/tests/backends/psql_dos/migrations/conftest.py +++ b/tests/storage/psql_dos/migrations/conftest.py @@ -15,9 +15,9 @@ import pytest from sqlalchemy import text -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator -from aiida.backends.psql_dos.utils import create_sqlalchemy_engine from aiida.manage.configuration import Profile +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.utils import create_sqlalchemy_engine def pytest_collection_modifyitems(config, items): # pylint: disable=unused-argument diff --git a/tests/backends/psql_dos/migrations/django_branch/__init__.py b/tests/storage/psql_dos/migrations/django_branch/__init__.py similarity index 100% rename from tests/backends/psql_dos/migrations/django_branch/__init__.py rename to tests/storage/psql_dos/migrations/django_branch/__init__.py diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0024_dblog_update.py b/tests/storage/psql_dos/migrations/django_branch/test_0024_dblog_update.py similarity index 99% rename from tests/backends/psql_dos/migrations/django_branch/test_0024_dblog_update.py rename to tests/storage/psql_dos/migrations/django_branch/test_0024_dblog_update.py index 89d4167c9a..9a55f88ab9 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0024_dblog_update.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0024_dblog_update.py @@ -10,9 +10,9 @@ """Test the update to the ``DbLog`` table.""" import json -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_dblog_update(perform_migrations: PsqlDostoreMigrator): # pylint: disable=too-many-locals diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py b/tests/storage/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py similarity index 95% rename from tests/backends/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py rename to tests/storage/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py index 2a8e6c5eee..1927a90baa 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py @@ -11,11 +11,11 @@ import numpy import pytest -from aiida.backends.psql_dos.migrations.utils import utils -from aiida.backends.psql_dos.migrations.utils.create_dbattribute import create_rows -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrations.utils import utils +from aiida.storage.psql_dos.migrations.utils.create_dbattribute import create_rows +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_traj_data(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0028_0029_node_type.py b/tests/storage/psql_dos/migrations/django_branch/test_0028_0029_node_type.py similarity index 97% rename from tests/backends/psql_dos/migrations/django_branch/test_0028_0029_node_type.py rename to tests/storage/psql_dos/migrations/django_branch/test_0028_0029_node_type.py index 65bc00e831..f358ca3f5d 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0028_0029_node_type.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0028_0029_node_type.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test alterations to `db_dbnode.type`values.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_node_repository(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py b/tests/storage/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py similarity index 98% rename from tests/backends/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py rename to tests/storage/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py index 8093c480d6..4a2797143d 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0032_remove_legacy_workflows.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test removing legacy workflows.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_node_repository(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py b/tests/storage/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py similarity index 98% rename from tests/backends/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py rename to tests/storage/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py index c6397d180a..db3d4e80b1 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0033_replace_text_field_with_json_field.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration adding the `repository_metadata` column to the `Node` model.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import json, timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_text_to_jsonb(perform_migrations: PsqlDostoreMigrator): # pylint: disable=too-many-locals diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py b/tests/storage/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py similarity index 98% rename from tests/backends/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py rename to tests/storage/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py index f44189aa5c..99c255da0a 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0037_attributes_extras_settings_json.py @@ -10,8 +10,8 @@ """Tests for the migrations of the attributes, extras and settings from EAV to JSONB.""" from sqlalchemy import select -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_attr_extra_migration(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py b/tests/storage/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py similarity index 94% rename from tests/backends/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py rename to tests/storage/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py index 2c446b91c1..75f656a7b4 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0038_data_migration_legacy_job_calculations.py @@ -12,9 +12,9 @@ from uuid import uuid4 -from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING, StateMapping -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrations.utils.calc_state import STATE_MAPPING, StateMapping +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_legacy_jobcalcstate(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0039_reset_hash.py b/tests/storage/psql_dos/migrations/django_branch/test_0039_reset_hash.py similarity index 97% rename from tests/backends/psql_dos/migrations/django_branch/test_0039_reset_hash.py rename to tests/storage/psql_dos/migrations/django_branch/test_0039_reset_hash.py index 5e47a53d21..3ba1255b24 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0039_reset_hash.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0039_reset_hash.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test the node hash reset.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_reset_hash(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py b/tests/storage/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py similarity index 98% rename from tests/backends/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py rename to tests/storage/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py index 9f7a247aa3..1885412f0f 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0040_data_migration_legacy_process_attributes.py @@ -10,8 +10,8 @@ """Tests the database migration of legacy process attributes.""" from uuid import uuid4 -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_legacy_jobcalc_attrs(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py b/tests/storage/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py similarity index 98% rename from tests/backends/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py rename to tests/storage/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py index 4d955548a7..d5f3e560f5 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0041_seal_unsealed_processes.py @@ -10,8 +10,8 @@ """Test sealing of unsealed processes.""" from uuid import uuid4 -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_legacy_jobcalc_attrs(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0043_default_link_label.py b/tests/storage/psql_dos/migrations/django_branch/test_0043_default_link_label.py similarity index 97% rename from tests/backends/psql_dos/migrations/django_branch/test_0043_default_link_label.py rename to tests/storage/psql_dos/migrations/django_branch/test_0043_default_link_label.py index 729404cfec..772382a62f 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0043_default_link_label.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0043_default_link_label.py @@ -10,8 +10,8 @@ """Test update of link labels.""" from uuid import uuid4 -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_legacy_jobcalc_attrs(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py b/tests/storage/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py similarity index 97% rename from tests/backends/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py rename to tests/storage/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py index 16f1bbaf70..d75da56acf 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0044_dbgroup_type_string.py @@ -10,8 +10,8 @@ """Test migration of `type_string` after the `Group` class became pluginnable.""" from uuid import uuid4 -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_group_type_string(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py b/tests/storage/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py similarity index 96% rename from tests/backends/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py rename to tests/storage/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py index 4408988708..eae85eeff9 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0045_dbgroup_extras.py @@ -10,8 +10,8 @@ """Test migration to add the `extras` JSONB column to the `DbGroup` model.""" from uuid import uuid4 -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_group_extras(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py b/tests/storage/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py similarity index 96% rename from tests/backends/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py rename to tests/storage/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py index a07592a523..c20245a8a1 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0046_add_node_repository_metadata.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration adding the `repository_metadata` column to the `Node` model.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_node_repository(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0047_migrate_repository.py b/tests/storage/psql_dos/migrations/django_branch/test_0047_migrate_repository.py similarity index 97% rename from tests/backends/psql_dos/migrations/django_branch/test_0047_migrate_repository.py rename to tests/storage/psql_dos/migrations/django_branch/test_0047_migrate_repository.py index e3d49296ce..4648c716f3 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0047_migrate_repository.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0047_migrate_repository.py @@ -12,9 +12,9 @@ import os from uuid import uuid4 -from aiida.backends.psql_dos.migrations.utils import utils -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone +from aiida.storage.psql_dos.migrations.utils import utils +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator REPOSITORY_UUID_KEY = 'repository|uuid' diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py b/tests/storage/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py similarity index 96% rename from tests/backends/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py rename to tests/storage/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py index 2b8c8432f2..dd1518cc1d 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0048_computer_name_to_label.py @@ -8,8 +8,8 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test the renaming of `name` to `label` for `db_dbcomputer`.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_computer_name_to_label(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py b/tests/storage/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py similarity index 98% rename from tests/backends/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py rename to tests/storage/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py index eeac51a81a..06bba3123d 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0049_entry_point_core_prefix.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration that updates node types after `core.` prefix was added to entry point names.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_entry_point_core_prefix(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_0050_schema_parity.py b/tests/storage/psql_dos/migrations/django_branch/test_0050_schema_parity.py similarity index 97% rename from tests/backends/psql_dos/migrations/django_branch/test_0050_schema_parity.py rename to tests/storage/psql_dos/migrations/django_branch/test_0050_schema_parity.py index 0f518fd6c9..e622a1790f 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_0050_schema_parity.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_0050_schema_parity.py @@ -8,9 +8,9 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migration that renames all index/constraint names, to have parity between django/sqlalchemy.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common import timezone from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_schema_parity(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/django_branch/test_legacy.py b/tests/storage/psql_dos/migrations/django_branch/test_legacy.py similarity index 99% rename from tests/backends/psql_dos/migrations/django_branch/test_legacy.py rename to tests/storage/psql_dos/migrations/django_branch/test_legacy.py index 33bb995285..c9e8398ebd 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_legacy.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_legacy.py @@ -20,7 +20,7 @@ """ import sqlalchemy as sa -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_v0x_django_0003(perform_migrations: PsqlDostoreMigrator, reflect_schema, data_regression): # pylint: disable=too-many-locals diff --git a/tests/backends/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml b/tests/storage/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml similarity index 100% rename from tests/backends/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml rename to tests/storage/psql_dos/migrations/django_branch/test_legacy/test_v0x_django_0003.yml diff --git a/tests/backends/psql_dos/migrations/django_branch/test_migrate_to_head.py b/tests/storage/psql_dos/migrations/django_branch/test_migrate_to_head.py similarity index 94% rename from tests/backends/psql_dos/migrations/django_branch/test_migrate_to_head.py rename to tests/storage/psql_dos/migrations/django_branch/test_migrate_to_head.py index e96fab9663..88fd8d7194 100644 --- a/tests/backends/psql_dos/migrations/django_branch/test_migrate_to_head.py +++ b/tests/storage/psql_dos/migrations/django_branch/test_migrate_to_head.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migrating from the base of the django branch, to the main head.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_migrate(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/__init__.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/__init__.py similarity index 100% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/__init__.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/__init__.py diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py index 98baba91b4..55fe9e3aba 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_10_group_update.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for group migrations: 118349c10896 -> 0edcdd5a30f0""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_group_typestring(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py index 814859e95b..d752295898 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_11_v2_repository.py @@ -11,9 +11,9 @@ import hashlib import os -from aiida.backends.psql_dos.migrations.utils import utils -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator from aiida.common.utils import get_new_uuid +from aiida.storage.psql_dos.migrations.utils import utils +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_node_repository_metadata(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py index 389c5ade85..e901f93b38 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_12_sqla_django_parity.py @@ -9,7 +9,7 @@ ########################################################################### """Tests for migrations to bring parity between SQLAlchemy and Django.""" # pylint: disable=invalid-name,too-many-locals,too-many-statements -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_non_nullable(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py index 7fb7b7a97f..1c9ac7061f 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_1_provenance_redesign.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for the provenance redesign: 140c971ae0a3 -> 239cea6d2452""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_provenance_redesign(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py index e5e7b07a98..e01710f711 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_2_group_renaming.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test renaming of type strings: b8b23ddefad4 -> e72ad251bcdb""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_group_renaming(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py index 83a6de948c..10c249636e 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_3_calc_attributes_keys.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests migration of the keys of certain attribute for ProcessNodes and CalcJobNodes: e72ad251bcdb -> 7ca08c391c49""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator KEY_RESOURCES_OLD = 'jobresource_params' KEY_RESOURCES_NEW = 'resources' diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py index 0e10b3834a..8edb5c4cea 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_4_dblog_update.py @@ -13,8 +13,8 @@ import pytest from sqlalchemy import column -from aiida.backends.psql_dos.migrations.utils import dblog_update -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrations.utils import dblog_update +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator # The values that will be exported for the log records that will be deleted values_to_export = ('id', 'time', 'loggername', 'levelname', 'objpk', 'objname', 'message', 'metadata') @@ -28,7 +28,7 @@ class TestDbLogMigrationRecordCleaning: @pytest.fixture(autouse=True) def setup_db(self, perform_migrations: PsqlDostoreMigrator): # pylint: disable=too-many-locals,too-many-statements """Setup the database schema.""" - from aiida.backends.psql_dos.migrations.utils.utils import dumps_json + from aiida.storage.psql_dos.migrations.utils.utils import dumps_json self.migrator = perform_migrations diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py similarity index 97% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py index 1e72c764ba..c35b1486f0 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_5_data_move_with_node.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests 041a79fc615f -> 6a5c2ea1439d""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_data_move_with_node(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py similarity index 95% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py index fe97ae105e..0665e23df2 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_6_trajectory_data.py @@ -11,9 +11,9 @@ import numpy as np import pytest -from aiida.backends.psql_dos.migrations.utils import utils -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator -from aiida.backends.psql_dos.utils import flag_modified +from aiida.storage.psql_dos.migrations.utils import utils +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.utils import flag_modified def set_node_array(node, repo_path, name, array): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py similarity index 97% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py index 75f7f28948..38d14a3805 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_7_node_prefix_removal.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests ce56d84bcc35 -> 61fc0913fae9""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_node_prefix_removal(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py similarity index 96% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py index 123bb2ef4e..eb7c915ec9 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_8_parameter_data_to_dict.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests 61fc0913fae9 -> d254fdfed416""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_parameter_data_to_dict(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py similarity index 98% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py index fb9b2283c4..81e30bb628 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_9_legacy_process.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Tests for legacy process migrations: 07fac78e6209 -> 118349c10896""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_legacy_jobcalcstate_data(perform_migrations: PsqlDostoreMigrator): @@ -16,7 +16,7 @@ def test_legacy_jobcalcstate_data(perform_migrations: PsqlDostoreMigrator): Verify that the `process_state`, `process_status` and `exit_status` are set correctly. """ - from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING + from aiida.storage.psql_dos.migrations.utils.calc_state import STATE_MAPPING # starting revision perform_migrations.migrate_up('sqlalchemy@07fac78e6209') diff --git a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py similarity index 94% rename from tests/backends/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py rename to tests/storage/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py index 27eab2acbe..8a1f47951a 100644 --- a/tests/backends/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py +++ b/tests/storage/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test migrating from the base of the sqlalchemy branch, to the main head.""" -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator def test_migrate(perform_migrations: PsqlDostoreMigrator): diff --git a/tests/backends/psql_dos/migrations/test_all_schema.py b/tests/storage/psql_dos/migrations/test_all_schema.py similarity index 97% rename from tests/backends/psql_dos/migrations/test_all_schema.py rename to tests/storage/psql_dos/migrations/test_all_schema.py index 615e4bce63..de06cb5359 100644 --- a/tests/backends/psql_dos/migrations/test_all_schema.py +++ b/tests/storage/psql_dos/migrations/test_all_schema.py @@ -10,7 +10,7 @@ """Basic tests for all migrations""" import pytest -from aiida.backends.psql_dos.migrator import PsqlDostoreMigrator +from aiida.storage.psql_dos.migrator import PsqlDostoreMigrator @pytest.mark.parametrize('version', list(v for v in PsqlDostoreMigrator.get_schema_versions() if v.startswith('main'))) diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0001_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0002_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0003_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0004_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0005_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0006_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0007_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0008_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0009_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0010_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0011_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0012_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0013_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0014_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0015_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0016_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0017_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0018_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0019_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0020_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0021_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0022_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0023_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0024_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0024a_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0025_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0026_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0027_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0028_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0029_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0030_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0031_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0032_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0033_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0034_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0035_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0036_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0037_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0038_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0039_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0040_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0041_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0042_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0043_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0044_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0045_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0046_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0047_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0048_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0049_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_django_django_0050_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_main_main_0001_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_0_e15ef2630a1b_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_10_59edaf8a8b79_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_11_62fe0d36de90_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_12_5d4d844852b6_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_13_a603da2cc809_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_14_162b99bca4a2_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_15_140c971ae0a3_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_16_239cea6d2452_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_17_b8b23ddefad4_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_18_e72ad251bcdb_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_19_7ca08c391c49_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_1_70c7d732f1b2_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_20_041a79fc615f_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_21_ea2f50e7f615_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_22_375c2db70663_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_23_6a5c2ea1439d_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_24_37f3d4882837_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_25_12536798d4d3_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_26_ce56d84bcc35_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_27_61fc0913fae9_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_28_d254fdfed416_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_29_5ddd24e52864_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_2_a6048f0ffca8_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_30_5a49629f0d45_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_31_3d6190594e19_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_32_1b8ed3425af9_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_33_1830c8430131_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_34_de2eaf6978b4_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_35_07fac78e6209_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_36_26d561acd560_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_37_e797afa09270_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_38_e734dd5e50d7_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_39_7b38a9e783e7_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_3_89176227b25_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_40_91b573400be5_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_41_118349c10896_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_42_bf591f31dd12_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_43_0edcdd5a30f0_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_44_7536a82b2cc4_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_45_1feaea71bd5a_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_46_535039300e4a_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_47_34a831f4286d_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_48_1de112340b16_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_49_1de112340b17_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_4_35d4ee9a1b0e_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_50_1de112340b18_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_5_7a6587e16f4c_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_6_0aebbeab274d_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_7_6c629c886f84_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_8_f9a69de76a9a_.yml diff --git a/tests/backends/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml b/tests/storage/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml similarity index 100% rename from tests/backends/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml rename to tests/storage/psql_dos/migrations/test_all_schema/test_sqla_9_a514d673c163_.yml diff --git a/tests/backends/psql_dos/test_alembic_cli.py b/tests/storage/psql_dos/test_alembic_cli.py similarity index 93% rename from tests/backends/psql_dos/test_alembic_cli.py rename to tests/storage/psql_dos/test_alembic_cli.py index 2254734a10..b2c949968e 100644 --- a/tests/backends/psql_dos/test_alembic_cli.py +++ b/tests/storage/psql_dos/test_alembic_cli.py @@ -10,7 +10,7 @@ """Basic tests for the alembic_cli module.""" from click.testing import CliRunner -from aiida.backends.psql_dos.alembic_cli import alembic_cli +from aiida.storage.psql_dos.alembic_cli import alembic_cli def test_history(): diff --git a/tests/backends/psql_dos/test_nodes.py b/tests/storage/psql_dos/test_nodes.py similarity index 97% rename from tests/backends/psql_dos/test_nodes.py rename to tests/storage/psql_dos/test_nodes.py index c25a7801ee..104fe2ff50 100644 --- a/tests/backends/psql_dos/test_nodes.py +++ b/tests/storage/psql_dos/test_nodes.py @@ -11,8 +11,8 @@ """Tests for nodes, attributes and links.""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.orm import Data +from aiida.storage.testbase import AiidaTestCase class TestNodeBasicSQLA(AiidaTestCase): @@ -73,8 +73,8 @@ def test_multiple_node_creation(self): (and subsequently committed) when a user is in the session. It tests the fix for the issue #234 """ - from aiida.backends.psql_dos.models.node import DbNode from aiida.common.utils import get_new_uuid + from aiida.storage.psql_dos.models.node import DbNode # Get the automatic user dbuser = self.backend.users.create(f'{self.id()}@aiida.net').store().bare_model diff --git a/tests/backends/psql_dos/test_query.py b/tests/storage/psql_dos/test_query.py similarity index 97% rename from tests/backends/psql_dos/test_query.py rename to tests/storage/psql_dos/test_query.py index 0c6215e79f..ce57b6c3b0 100644 --- a/tests/backends/psql_dos/test_query.py +++ b/tests/storage/psql_dos/test_query.py @@ -9,8 +9,8 @@ ########################################################################### """Tests for generic queries.""" -from aiida.backends.testbase import AiidaTestCase from aiida.orm import Computer, Data, Group, Node, ProcessNode, QueryBuilder, User +from aiida.storage.testbase import AiidaTestCase class TestQueryBuilderSQLA(AiidaTestCase): diff --git a/tests/backends/psql_dos/test_schema.py b/tests/storage/psql_dos/test_schema.py similarity index 98% rename from tests/backends/psql_dos/test_schema.py rename to tests/storage/psql_dos/test_schema.py index 426a5cea41..affd43937f 100644 --- a/tests/backends/psql_dos/test_schema.py +++ b/tests/storage/psql_dos/test_schema.py @@ -13,13 +13,13 @@ from sqlalchemy import exc as sa_exc -from aiida.backends.psql_dos.models.node import DbNode -from aiida.backends.psql_dos.models.user import DbUser -from aiida.backends.testbase import AiidaTestCase from aiida.common.links import LinkType from aiida.common.utils import get_new_uuid from aiida.manage import get_manager from aiida.orm import CalculationNode, Data +from aiida.storage.psql_dos.models.node import DbNode +from aiida.storage.psql_dos.models.user import DbUser +from aiida.storage.testbase import AiidaTestCase class TestRelationshipsSQLA(AiidaTestCase): diff --git a/tests/backends/psql_dos/test_session.py b/tests/storage/psql_dos/test_session.py similarity index 98% rename from tests/backends/psql_dos/test_session.py rename to tests/storage/psql_dos/test_session.py index 35d537f93c..7ca1fa0658 100644 --- a/tests/backends/psql_dos/test_session.py +++ b/tests/storage/psql_dos/test_session.py @@ -12,7 +12,7 @@ import pytest from sqlalchemy.orm import sessionmaker -from aiida.backends.psql_dos.utils import create_scoped_session_factory +from aiida.storage.psql_dos.utils import create_scoped_session_factory class TestSessionSqla: @@ -142,8 +142,8 @@ def test_node_access_with_sessions(self): Tests for bug #1372 """ - import aiida.backends.psql_dos as sa from aiida.common import timezone + import aiida.storage.psql_dos as sa session = sessionmaker(bind=self.backend.get_session().bind, future=True) custom_session = session() diff --git a/tests/backends/psql_dos/test_utils.py b/tests/storage/psql_dos/test_utils.py similarity index 100% rename from tests/backends/psql_dos/test_utils.py rename to tests/storage/psql_dos/test_utils.py diff --git a/tests/backends/test_control.py b/tests/storage/test_control.py similarity index 95% rename from tests/backends/test_control.py rename to tests/storage/test_control.py index b905008292..ebcfb6b012 100644 --- a/tests/backends/test_control.py +++ b/tests/storage/test_control.py @@ -7,7 +7,7 @@ # For further information on the license, see the LICENSE.txt file # # For further information please visit http://www.aiida.net # ########################################################################### -"""Tests for the :mod:`aiida.backends.control` module.""" +"""Tests for the :mod:`aiida.storage.control` module.""" import pytest from aiida.manage import get_manager @@ -65,7 +65,7 @@ def test_get_unreferenced_keyset(): from io import BytesIO from aiida import orm - from aiida.backends.control import get_unreferenced_keyset + from aiida.storage.control import get_unreferenced_keyset # Coverage code pass unreferenced_keyset = get_unreferenced_keyset() @@ -111,7 +111,7 @@ def test_repository_maintain(caplog, monkeypatch, kwargs, logged_texts): """Test the ``repository_maintain`` method.""" import logging - from aiida.backends.control import repository_maintain + from aiida.storage.control import repository_maintain def mock_maintain(self, live=True, dry_run=False, **kwargs): # pylint: disable=unused-argument logmsg = 'keywords provided:\n' @@ -134,7 +134,7 @@ def mock_maintain(self, live=True, dry_run=False, **kwargs): # pylint: disable= def test_repository_info(monkeypatch): """Test the ``repository_info`` method.""" - from aiida.backends.control import get_repository_info + from aiida.storage.control import get_repository_info def mock_get_info(self, statistics=False, **kwargs): # pylint: disable=unused-argument output = {'value': 42} diff --git a/tests/test_calculation_node.py b/tests/test_calculation_node.py index 1af8e61ece..2906deca15 100644 --- a/tests/test_calculation_node.py +++ b/tests/test_calculation_node.py @@ -9,10 +9,10 @@ ########################################################################### """Tests for the CalculationNode and CalcJobNode class.""" -from aiida.backends.testbase import AiidaTestCase from aiida.common.datastructures import CalcJobState from aiida.common.exceptions import ModificationNotAllowed from aiida.orm import CalcJobNode, CalculationNode +from aiida.storage.testbase import AiidaTestCase class TestProcessNode(AiidaTestCase): diff --git a/tests/test_dataclasses.py b/tests/test_dataclasses.py index f05760ba1c..2df6ca3e8c 100644 --- a/tests/test_dataclasses.py +++ b/tests/test_dataclasses.py @@ -15,7 +15,6 @@ import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import ModificationNotAllowed from aiida.common.utils import Capturing from aiida.orm import ArrayData, BandsData, CifData, Dict, KpointsData, StructureData, TrajectoryData, load_node @@ -29,6 +28,7 @@ has_pymatgen, has_spglib, ) +from aiida.storage.testbase import AiidaTestCase def has_seekpath(): diff --git a/tests/test_dbimporters.py b/tests/test_dbimporters.py index 933101c24c..9c23165515 100644 --- a/tests/test_dbimporters.py +++ b/tests/test_dbimporters.py @@ -10,7 +10,7 @@ """Tests for subclasses of DbImporter, DbSearchResults and DbEntry""" import unittest -from aiida.backends.testbase import AiidaTestCase +from aiida.storage.testbase import AiidaTestCase from tests.static import STATIC_DIR diff --git a/tests/test_generic.py b/tests/test_generic.py index 4c936da1ae..4df00cbee1 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -10,7 +10,7 @@ """Generic tests that need the use of the DB.""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase +from aiida.storage.testbase import AiidaTestCase class TestCode(AiidaTestCase): diff --git a/tests/test_nodes.py b/tests/test_nodes.py index d9e0899805..ce55867571 100644 --- a/tests/test_nodes.py +++ b/tests/test_nodes.py @@ -17,9 +17,9 @@ import pytest from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import InvalidOperation, ModificationNotAllowed, StoringNotAllowed, ValidationError from aiida.common.links import LinkType +from aiida.storage.testbase import AiidaTestCase from aiida.tools import delete_group_nodes, delete_nodes diff --git a/tests/tools/archive/migration/test_v05_to_v06.py b/tests/tools/archive/migration/test_v05_to_v06.py index ce74f0f1c5..4a6a29342c 100644 --- a/tests/tools/archive/migration/test_v05_to_v06.py +++ b/tests/tools/archive/migration/test_v05_to_v06.py @@ -8,7 +8,7 @@ # For further information please visit http://www.aiida.net # ########################################################################### """Test archive file migration from export version 0.5 to 0.6""" -from aiida.backends.psql_dos.migrations.utils.calc_state import STATE_MAPPING +from aiida.storage.psql_dos.migrations.utils.calc_state import STATE_MAPPING from aiida.tools.archive.implementations.sqlite.migrations.legacy import migrate_v5_to_v6 from aiida.tools.archive.implementations.sqlite.migrations.utils import verify_metadata_version from tests.utils.archives import get_archive_file, read_json_files diff --git a/tests/tools/data/orbital/test_orbitals.py b/tests/tools/data/orbital/test_orbitals.py index 1fa13b85ea..25442dccab 100644 --- a/tests/tools/data/orbital/test_orbitals.py +++ b/tests/tools/data/orbital/test_orbitals.py @@ -9,10 +9,10 @@ ########################################################################### """Test for the `Orbital` class and subclasses.""" -#from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common.exceptions import ValidationError from aiida.plugins import OrbitalFactory +#from aiida import orm +from aiida.storage.testbase import AiidaTestCase from aiida.tools.data.orbital import Orbital diff --git a/tests/tools/dbimporters/test_icsd.py b/tests/tools/dbimporters/test_icsd.py index 691d13ac6b..55374659f8 100644 --- a/tests/tools/dbimporters/test_icsd.py +++ b/tests/tools/dbimporters/test_icsd.py @@ -14,7 +14,7 @@ import pytest -from aiida.backends.testbase import AiidaTestCase +from aiida.storage.testbase import AiidaTestCase from aiida.tools.dbimporters.plugins import icsd diff --git a/tests/tools/dbimporters/test_materialsproject.py b/tests/tools/dbimporters/test_materialsproject.py index a33fc43170..2a670e23c1 100644 --- a/tests/tools/dbimporters/test_materialsproject.py +++ b/tests/tools/dbimporters/test_materialsproject.py @@ -11,8 +11,8 @@ import pytest -from aiida.backends.testbase import AiidaTestCase from aiida.plugins import DbImporterFactory +from aiida.storage.testbase import AiidaTestCase def run_materialsproject_api_tests(): diff --git a/tests/tools/graph/test_age.py b/tests/tools/graph/test_age.py index fea9dae275..b3e2850e75 100644 --- a/tests/tools/graph/test_age.py +++ b/tests/tools/graph/test_age.py @@ -13,8 +13,8 @@ import numpy as np from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common.links import LinkType +from aiida.storage.testbase import AiidaTestCase from aiida.tools.graph.age_entities import AiidaEntitySet, Basket, DirectedEdgeSet, GroupNodeEdge from aiida.tools.graph.age_rules import ReplaceRule, RuleSaveWalkers, RuleSequence, RuleSetWalkers, UpdateRule diff --git a/tests/tools/graph/test_graph_traversers.py b/tests/tools/graph/test_graph_traversers.py index 09e1b5a142..8db6af587e 100644 --- a/tests/tools/graph/test_graph_traversers.py +++ b/tests/tools/graph/test_graph_traversers.py @@ -9,8 +9,8 @@ ########################################################################### """Tests for aiida.tools.graph.graph_traversers""" -from aiida.backends.testbase import AiidaTestCase from aiida.common.links import LinkType +from aiida.storage.testbase import AiidaTestCase from aiida.tools.graph.graph_traversers import get_nodes_delete, traverse_graph diff --git a/tests/tools/visualization/test_graph.py b/tests/tools/visualization/test_graph.py index 9c927e39cc..434b6a747b 100644 --- a/tests/tools/visualization/test_graph.py +++ b/tests/tools/visualization/test_graph.py @@ -10,11 +10,11 @@ """Tests for creating graphs (using graphviz)""" from aiida import orm -from aiida.backends.testbase import AiidaTestCase from aiida.common import AttributeDict from aiida.common.links import LinkType from aiida.engine import ProcessState from aiida.orm.utils.links import LinkPair +from aiida.storage.testbase import AiidaTestCase from aiida.tools.visualization import graph as graph_mod diff --git a/utils/make_all.py b/utils/make_all.py index 1c4b71b15a..9f8cc42174 100644 --- a/utils/make_all.py +++ b/utils/make_all.py @@ -157,7 +157,7 @@ def write_inits(folder_path: str, all_dict: dict, skip_children: Dict[str, List[ # skipped since this is for testing only not general use 'manage': ['tests'], # skipped since we don't want to expose the implementation at the top-level - 'backends': ['psql_dos'], + 'storage': ['psql_dos'], 'orm': ['implementation'], # skip all since the module requires extra requirements 'restapi': ['*'], From 18e1515bba231cb8c05377dbb0ac028337c5faec Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 18 Feb 2022 12:46:20 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20REFACTOR:=20`backends.?= =?UTF-8?q?Backend`=20->=20`storage=5Fbackend.StorageBackend`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- aiida/manage/configuration/profile.py | 4 +- aiida/manage/manager.py | 8 ++-- aiida/orm/authinfos.py | 4 +- aiida/orm/comments.py | 6 ++- aiida/orm/computers.py | 4 +- aiida/orm/entities.py | 20 ++++----- aiida/orm/groups.py | 4 +- aiida/orm/implementation/__init__.py | 4 +- aiida/orm/implementation/entities.py | 10 ++--- aiida/orm/implementation/querybuilder.py | 8 ++-- .../{backends.py => storage_backend.py} | 4 +- aiida/orm/logs.py | 4 +- aiida/orm/nodes/node.py | 17 ++++---- aiida/orm/querybuilder.py | 6 +-- aiida/orm/users.py | 6 +-- aiida/storage/control.py | 9 ++-- aiida/storage/psql_dos/backend.py | 5 +-- aiida/storage/testbase.py | 4 +- aiida/tools/archive/abstract.py | 4 +- aiida/tools/archive/create.py | 10 ++--- .../archive/implementations/sqlite/backend.py | 4 +- aiida/tools/archive/imports.py | 41 ++++++++++--------- aiida/tools/graph/graph_traversers.py | 8 ++-- aiida/tools/visualization/graph.py | 6 +-- tests/tools/archive/test_backend.py | 4 +- 26 files changed, 105 insertions(+), 101 deletions(-) rename aiida/orm/implementation/{backends.py => storage_backend.py} (98%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3cad7ac827..aa07afaf39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -76,7 +76,7 @@ repos: aiida/manage/database/delete/nodes.py| aiida/orm/querybuilder.py| aiida/orm/implementation/entities.py| - aiida/orm/implementation/backends.py| + aiida/orm/implementation/storage_backend.py| aiida/orm/implementation/authinfos.py| aiida/orm/implementation/comments.py| aiida/orm/implementation/computers.py| diff --git a/aiida/manage/configuration/profile.py b/aiida/manage/configuration/profile.py index d4698b7d18..19b9aa9270 100644 --- a/aiida/manage/configuration/profile.py +++ b/aiida/manage/configuration/profile.py @@ -20,7 +20,7 @@ from .settings import DAEMON_DIR, DAEMON_LOG_DIR if TYPE_CHECKING: - from aiida.orm.implementation.backends import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('Profile',) @@ -121,7 +121,7 @@ def set_storage(self, name: str, config: Dict[str, Any]) -> None: self._attributes[self.KEY_STORAGE][self.KEY_STORAGE_CONFIG] = config @property - def storage_cls(self) -> Type['Backend']: + def storage_cls(self) -> Type['StorageBackend']: """Return the storage backend class for this profile.""" if self.storage_backend == 'psql_dos': from aiida.storage.psql_dos.backend import PsqlDosBackend diff --git a/aiida/manage/manager.py b/aiida/manage/manager.py index 5d3963f537..4bd6d97631 100644 --- a/aiida/manage/manager.py +++ b/aiida/manage/manager.py @@ -23,7 +23,7 @@ from aiida.engine.runners import Runner from aiida.manage.configuration.config import Config from aiida.manage.configuration.profile import Profile - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('get_manager',) @@ -64,7 +64,7 @@ class Manager: def __init__(self) -> None: # note: the config currently references the global variables self._profile: Optional['Profile'] = None - self._profile_storage: Optional['Backend'] = None + self._profile_storage: Optional['StorageBackend'] = None self._daemon_client: Optional['DaemonClient'] = None self._communicator: Optional['RmqThreadCommunicator'] = None self._process_controller: Optional['RemoteProcessThreadController'] = None @@ -193,7 +193,7 @@ def get_option(self, option_name: str) -> Any: option = get_option(option_name) return option.default - def get_backend(self) -> 'Backend': + def get_backend(self) -> 'StorageBackend': """Return the current profile's storage backend, loading it if necessary. Deprecated: use `get_profile_storage` instead. @@ -202,7 +202,7 @@ def get_backend(self) -> 'Backend': warn('get_backend() is deprecated, use get_profile_storage() instead', AiidaDeprecationWarning) return self.get_profile_storage() - def get_profile_storage(self) -> 'Backend': + def get_profile_storage(self) -> 'StorageBackend': """Return the current profile's storage backend, loading it if necessary.""" from aiida.common import ConfigurationError from aiida.common.log import configure_logging diff --git a/aiida/orm/authinfos.py b/aiida/orm/authinfos.py index d83718ba21..553655928e 100644 --- a/aiida/orm/authinfos.py +++ b/aiida/orm/authinfos.py @@ -19,7 +19,7 @@ if TYPE_CHECKING: from aiida.orm import Computer, User - from aiida.orm.implementation import Backend, BackendAuthInfo + from aiida.orm.implementation import BackendAuthInfo, StorageBackend from aiida.transports import Transport __all__ = ('AuthInfo',) @@ -51,7 +51,7 @@ def objects(cls: Type['AuthInfo']) -> AuthInfoCollection: # type: ignore[misc] PROPERTY_WORKDIR = 'workdir' - def __init__(self, computer: 'Computer', user: 'User', backend: Optional['Backend'] = None) -> None: + def __init__(self, computer: 'Computer', user: 'User', backend: Optional['StorageBackend'] = None) -> None: """Create an `AuthInfo` instance for the given computer and user. :param computer: a `Computer` instance diff --git a/aiida/orm/comments.py b/aiida/orm/comments.py index a8e3a99ea2..0475c4098d 100644 --- a/aiida/orm/comments.py +++ b/aiida/orm/comments.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: from aiida.orm import Node, User - from aiida.orm.implementation import Backend, BackendComment + from aiida.orm.implementation import BackendComment, StorageBackend __all__ = ('Comment',) @@ -72,7 +72,9 @@ class Comment(entities.Entity['BackendComment']): def objects(cls: Type['Comment']) -> CommentCollection: # type: ignore[misc] # pylint: disable=no-self-argument return CommentCollection.get_cached(cls, get_manager().get_profile_storage()) - def __init__(self, node: 'Node', user: 'User', content: Optional[str] = None, backend: Optional['Backend'] = None): + def __init__( + self, node: 'Node', user: 'User', content: Optional[str] = None, backend: Optional['StorageBackend'] = None + ): """Create a Comment for a given node and user :param node: a Node instance diff --git a/aiida/orm/computers.py b/aiida/orm/computers.py index 2a2361aaa8..88200cb3a8 100644 --- a/aiida/orm/computers.py +++ b/aiida/orm/computers.py @@ -21,7 +21,7 @@ if TYPE_CHECKING: from aiida.orm import AuthInfo, User - from aiida.orm.implementation import Backend, BackendComputer + from aiida.orm.implementation import BackendComputer, StorageBackend from aiida.schedulers import Scheduler from aiida.transports import Transport @@ -89,7 +89,7 @@ def __init__( # pylint: disable=too-many-arguments transport_type: str = '', scheduler_type: str = '', workdir: str = None, - backend: Optional['Backend'] = None, + backend: Optional['StorageBackend'] = None, ) -> None: """Construct a new computer.""" backend = backend or get_manager().get_profile_storage() diff --git a/aiida/orm/entities.py b/aiida/orm/entities.py index 62a1a35896..65efd1f3e9 100644 --- a/aiida/orm/entities.py +++ b/aiida/orm/entities.py @@ -21,7 +21,7 @@ from aiida.manage import get_manager if TYPE_CHECKING: - from aiida.orm.implementation import Backend, BackendEntity + from aiida.orm.implementation import BackendEntity, StorageBackend from aiida.orm.querybuilder import FilterType, OrderByType, QueryBuilder __all__ = ('Entity', 'Collection', 'EntityAttributesMixin', 'EntityExtrasMixin', 'EntityTypes') @@ -56,28 +56,28 @@ def _entity_base_cls() -> Type[EntityType]: @classmethod @lru_cache(maxsize=100) - def get_cached(cls, entity_class: Type[EntityType], backend: 'Backend'): + def get_cached(cls, entity_class: Type[EntityType], backend: 'StorageBackend'): """Get the cached collection instance for the given entity class and backend. :param backend: the backend instance to get the collection for """ - from aiida.orm.implementation import Backend - type_check(backend, Backend) + from aiida.orm.implementation import StorageBackend + type_check(backend, StorageBackend) return cls(entity_class, backend=backend) - def __init__(self, entity_class: Type[EntityType], backend: Optional['Backend'] = None) -> None: + def __init__(self, entity_class: Type[EntityType], backend: Optional['StorageBackend'] = None) -> None: """ Construct a new entity collection. :param entity_class: the entity type e.g. User, Computer, etc :param backend: the backend instance to get the collection for, or use the default """ - from aiida.orm.implementation import Backend - type_check(backend, Backend, allow_none=True) + from aiida.orm.implementation import StorageBackend + type_check(backend, StorageBackend, allow_none=True) assert issubclass(entity_class, self._entity_base_cls()) self._backend = backend or get_manager().get_profile_storage() self._entity_type = entity_class - def __call__(self: CollectionType, backend: 'Backend') -> CollectionType: + def __call__(self: CollectionType, backend: 'StorageBackend') -> CollectionType: """Get or create a cached collection using a new backend.""" if backend is self._backend: return self @@ -89,7 +89,7 @@ def entity_type(self) -> Type[EntityType]: return self._entity_type @property - def backend(self) -> 'Backend': + def backend(self) -> 'StorageBackend': """Return the backend.""" return self._backend @@ -244,7 +244,7 @@ def is_stored(self) -> bool: return self._backend_entity.is_stored @property - def backend(self) -> 'Backend': + def backend(self) -> 'StorageBackend': """Get the backend for this entity""" return self._backend_entity.backend diff --git a/aiida/orm/groups.py b/aiida/orm/groups.py index 33d52dfb87..976178acba 100644 --- a/aiida/orm/groups.py +++ b/aiida/orm/groups.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: from aiida.orm import Node, User - from aiida.orm.implementation import Backend, BackendGroup + from aiida.orm.implementation import BackendGroup, StorageBackend __all__ = ('Group', 'AutoGroup', 'ImportGroup', 'UpfFamily') @@ -127,7 +127,7 @@ def __init__( user: Optional['User'] = None, description: str = '', type_string: Optional[str] = None, - backend: Optional['Backend'] = None + backend: Optional['StorageBackend'] = None ): """ Create a new group. Either pass a dbgroup parameter, to reload diff --git a/aiida/orm/implementation/__init__.py b/aiida/orm/implementation/__init__.py index 588a8a7dae..0f02fcbf65 100644 --- a/aiida/orm/implementation/__init__.py +++ b/aiida/orm/implementation/__init__.py @@ -15,7 +15,6 @@ # pylint: disable=wildcard-import from .authinfos import * -from .backends import * from .comments import * from .computers import * from .entities import * @@ -23,11 +22,11 @@ from .logs import * from .nodes import * from .querybuilder import * +from .storage_backend import * from .users import * from .utils import * __all__ = ( - 'Backend', 'BackendAuthInfo', 'BackendAuthInfoCollection', 'BackendCollection', @@ -47,6 +46,7 @@ 'BackendUser', 'BackendUserCollection', 'EntityType', + 'StorageBackend', 'clean_value', 'validate_attribute_extra_key', ) diff --git a/aiida/orm/implementation/entities.py b/aiida/orm/implementation/entities.py index 9e0e4df17e..41f8e8b988 100644 --- a/aiida/orm/implementation/entities.py +++ b/aiida/orm/implementation/entities.py @@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Any, ClassVar, Dict, Generic, Iterable, List, Tuple, Type, TypeVar if TYPE_CHECKING: - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('BackendEntity', 'BackendCollection', 'EntityType', 'BackendEntityExtrasMixin') @@ -22,11 +22,11 @@ class BackendEntity(abc.ABC): """An first-class entity in the backend""" - def __init__(self, backend: 'Backend', **kwargs: Any): # pylint: disable=unused-argument + def __init__(self, backend: 'StorageBackend', **kwargs: Any): # pylint: disable=unused-argument self._backend = backend @property - def backend(self) -> 'Backend': + def backend(self) -> 'StorageBackend': """Return the backend this entity belongs to :return: the backend instance @@ -74,7 +74,7 @@ class BackendCollection(Generic[EntityType]): ENTITY_CLASS: ClassVar[Type[EntityType]] # type: ignore[misc] - def __init__(self, backend: 'Backend'): + def __init__(self, backend: 'StorageBackend'): """ :param backend: the backend this collection belongs to """ @@ -82,7 +82,7 @@ def __init__(self, backend: 'Backend'): self._backend = backend @property - def backend(self) -> 'Backend': + def backend(self) -> 'StorageBackend': """Return the backend.""" return self._backend diff --git a/aiida/orm/implementation/querybuilder.py b/aiida/orm/implementation/querybuilder.py index 567b0cfdde..55e649aac3 100644 --- a/aiida/orm/implementation/querybuilder.py +++ b/aiida/orm/implementation/querybuilder.py @@ -16,7 +16,7 @@ from aiida.orm.entities import EntityTypes if TYPE_CHECKING: - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('BackendQueryBuilder',) @@ -80,12 +80,12 @@ class QueryDictType(TypedDict): class BackendQueryBuilder(abc.ABC): """Backend query builder interface""" - def __init__(self, backend: 'Backend'): + def __init__(self, backend: 'StorageBackend'): """ :param backend: the backend """ - from . import backends - type_check(backend, backends.Backend) + from .storage_backend import StorageBackend + type_check(backend, StorageBackend) self._backend = backend @abc.abstractmethod diff --git a/aiida/orm/implementation/backends.py b/aiida/orm/implementation/storage_backend.py similarity index 98% rename from aiida/orm/implementation/backends.py rename to aiida/orm/implementation/storage_backend.py index cf99ea416f..2541925d51 100644 --- a/aiida/orm/implementation/backends.py +++ b/aiida/orm/implementation/storage_backend.py @@ -27,12 +27,12 @@ ) from aiida.repository.backend.abstract import AbstractRepositoryBackend -__all__ = ('Backend',) +__all__ = ('StorageBackend',) TransactionType = TypeVar('TransactionType') -class Backend(abc.ABC): # pylint: disable=too-many-public-methods +class StorageBackend(abc.ABC): # pylint: disable=too-many-public-methods """Abstraction for a backend to read/write persistent data for a profile's provenance graph. AiiDA splits data storage into two sources: diff --git a/aiida/orm/logs.py b/aiida/orm/logs.py index 885ffb7bb1..d1aebb9e5d 100644 --- a/aiida/orm/logs.py +++ b/aiida/orm/logs.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: from aiida.orm import Node - from aiida.orm.implementation import Backend, BackendLog + from aiida.orm.implementation import BackendLog, StorageBackend from aiida.orm.querybuilder import FilterType, OrderByType __all__ = ('Log', 'OrderSpecifier', 'ASCENDING', 'DESCENDING') @@ -142,7 +142,7 @@ def __init__( dbnode_id: int, message: str = '', metadata: Optional[Dict[str, Any]] = None, - backend: Optional['Backend'] = None + backend: Optional['StorageBackend'] = None ): # pylint: disable=too-many-arguments """Construct a new log diff --git a/aiida/orm/nodes/node.py b/aiida/orm/nodes/node.py index 4b416e1b05..0b53719316 100644 --- a/aiida/orm/nodes/node.py +++ b/aiida/orm/nodes/node.py @@ -48,8 +48,7 @@ from .repository import NodeRepositoryMixin if TYPE_CHECKING: - from ..implementation import Backend - from ..implementation.nodes import BackendNode + from ..implementation import BackendNode, StorageBackend __all__ = ('Node',) @@ -157,7 +156,7 @@ def objects(cls: Type[NodeType]) -> NodeCollection[NodeType]: # pylint: disable def __init__( self, - backend: Optional['Backend'] = None, + backend: Optional['StorageBackend'] = None, user: Optional[User] = None, computer: Optional[Computer] = None, **kwargs: Any @@ -292,7 +291,7 @@ def process_type(self, value: str) -> None: :param value: the new value to set """ - self.backend_entity.process_type = value # type: ignore[misc] + self.backend_entity.process_type = value @property def label(self) -> str: @@ -308,7 +307,7 @@ def label(self, value: str) -> None: :param value: the new value to set """ - self.backend_entity.label = value # type: ignore[misc] + self.backend_entity.label = value @property def description(self) -> str: @@ -324,7 +323,7 @@ def description(self, value: str) -> None: :param value: the new value to set """ - self.backend_entity.description = value # type: ignore[misc] + self.backend_entity.description = value @property def repository_metadata(self) -> Dict[str, Any]: @@ -340,7 +339,7 @@ def repository_metadata(self, value: Dict[str, Any]) -> None: :param value: the new value to set """ - self.backend_entity.repository_metadata = value # type: ignore[misc] + self.backend_entity.repository_metadata = value @property def computer(self) -> Optional[Computer]: @@ -361,7 +360,7 @@ def computer(self, computer: Optional[Computer]) -> None: type_check(computer, Computer, allow_none=True) - self.backend_entity.computer = None if computer is None else computer.backend_entity # type: ignore[misc] + self.backend_entity.computer = None if computer is None else computer.backend_entity @property def user(self) -> User: @@ -378,7 +377,7 @@ def user(self, user: User) -> None: raise exceptions.ModificationNotAllowed('cannot set the user on a stored node') type_check(user, User) - self.backend_entity.user = user.backend_entity # type: ignore[misc] + self.backend_entity.user = user.backend_entity @property def ctime(self) -> datetime.datetime: diff --git a/aiida/orm/querybuilder.py b/aiida/orm/querybuilder.py index fcdf6a5fbd..483ca86784 100644 --- a/aiida/orm/querybuilder.py +++ b/aiida/orm/querybuilder.py @@ -53,7 +53,7 @@ if TYPE_CHECKING: # pylint: disable=ungrouped-imports from aiida.engine import Process - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('QueryBuilder',) @@ -94,7 +94,7 @@ class QueryBuilder: def __init__( self, - backend: Optional['Backend'] = None, + backend: Optional['StorageBackend'] = None, *, debug: bool = False, path: Optional[Sequence[Union[str, Dict[str, Any], EntityClsType]]] = (), @@ -190,7 +190,7 @@ def __init__( self.order_by(order_by) @property - def backend(self) -> 'Backend': + def backend(self) -> 'StorageBackend': """Return the backend used by the QueryBuilder.""" return self._backend diff --git a/aiida/orm/users.py b/aiida/orm/users.py index abc56e2e19..309b4e1c7d 100644 --- a/aiida/orm/users.py +++ b/aiida/orm/users.py @@ -17,7 +17,7 @@ from . import entities if TYPE_CHECKING: - from aiida.orm.implementation import Backend, BackendUser + from aiida.orm.implementation import BackendUser, StorageBackend __all__ = ('User',) @@ -29,7 +29,7 @@ class UserCollection(entities.Collection['User']): def _entity_base_cls() -> Type['User']: return User - def __init__(self, entity_class: Type['User'], backend: Optional['Backend'] = None) -> None: + def __init__(self, entity_class: Type['User'], backend: Optional['StorageBackend'] = None) -> None: super().__init__(entity_class=entity_class, backend=backend) self._default_user: Optional[User] = None @@ -82,7 +82,7 @@ def __init__( first_name: str = '', last_name: str = '', institution: str = '', - backend: Optional['Backend'] = None + backend: Optional['StorageBackend'] = None ): """Create a new `User`.""" # pylint: disable=too-many-arguments diff --git a/aiida/storage/control.py b/aiida/storage/control.py index 044424e5f6..96d439f571 100644 --- a/aiida/storage/control.py +++ b/aiida/storage/control.py @@ -18,7 +18,7 @@ from aiida.manage import get_manager if TYPE_CHECKING: - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('MAINTAIN_LOGGER',) @@ -28,7 +28,7 @@ def repository_maintain( full: bool = False, dry_run: bool = False, - backend: Optional['Backend'] = None, + backend: Optional['StorageBackend'] = None, **kwargs, ) -> None: """Performs maintenance tasks on the repository. @@ -56,7 +56,8 @@ def repository_maintain( repository.maintain(live=not full, dry_run=dry_run, **kwargs) -def get_unreferenced_keyset(check_consistency: bool = True, aiida_backend: Optional['Backend'] = None) -> Set[str]: +def get_unreferenced_keyset(check_consistency: bool = True, + aiida_backend: Optional['StorageBackend'] = None) -> Set[str]: """Returns the keyset of objects that exist in the repository but are not tracked by AiiDA. This should be all the soft-deleted files. @@ -92,7 +93,7 @@ def get_unreferenced_keyset(check_consistency: bool = True, aiida_backend: Optio return keyset_repository - keyset_database -def get_repository_info(statistics: bool = False, backend: Optional['Backend'] = None) -> dict: +def get_repository_info(statistics: bool = False, backend: Optional['StorageBackend'] = None) -> dict: """Returns general information on the repository.""" if backend is None: backend = get_manager().get_profile_storage() diff --git a/aiida/storage/psql_dos/backend.py b/aiida/storage/psql_dos/backend.py index 862bd6103b..0ffa7a3035 100644 --- a/aiida/storage/psql_dos/backend.py +++ b/aiida/storage/psql_dos/backend.py @@ -21,8 +21,7 @@ from aiida.manage.configuration.profile import Profile from aiida.orm import User from aiida.orm.entities import EntityTypes -from aiida.orm.implementation.backends import Backend -from aiida.orm.implementation.entities import BackendEntity +from aiida.orm.implementation import BackendEntity, StorageBackend from aiida.storage.psql_dos.migrator import REPOSITORY_UUID_KEY, PsqlDostoreMigrator from aiida.storage.psql_dos.models import base @@ -41,7 +40,7 @@ } -class PsqlDosBackend(Backend): # pylint: disable=too-many-public-methods +class PsqlDosBackend(StorageBackend): # pylint: disable=too-many-public-methods """An AiiDA storage backend that stores data in a PostgreSQL database and disk-objectstore repository. Note, there were originally two such backends, `sqlalchemy` and `django`. diff --git a/aiida/storage/testbase.py b/aiida/storage/testbase.py index 05aa9b7d8e..30a093f658 100644 --- a/aiida/storage/testbase.py +++ b/aiida/storage/testbase.py @@ -16,7 +16,7 @@ from aiida.common.exceptions import TestsNotAllowedError from aiida.common.lang import classproperty from aiida.manage import configuration, get_manager -from aiida.orm.implementation import Backend +from aiida.orm.implementation import StorageBackend TEST_KEYWORD = 'test_' @@ -33,7 +33,7 @@ def check_if_tests_can_run(): class AiidaTestCase(unittest.TestCase): """This is the base class for AiiDA tests, independent of the backend.""" _class_was_setup = False - backend: Optional[Backend] = None + backend: Optional[StorageBackend] = None @classmethod def setUpClass(cls): diff --git a/aiida/tools/archive/abstract.py b/aiida/tools/archive/abstract.py index 4689ecd582..b45eded9a6 100644 --- a/aiida/tools/archive/abstract.py +++ b/aiida/tools/archive/abstract.py @@ -15,7 +15,7 @@ if TYPE_CHECKING: from aiida.orm import QueryBuilder from aiida.orm.entities import Entity, EntityTypes - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend from aiida.tools.visualization.graph import Graph SelfType = TypeVar('SelfType') @@ -145,7 +145,7 @@ def get_metadata(self) -> Dict[str, Any]: """ @abstractmethod - def get_backend(self) -> 'Backend': + def get_backend(self) -> 'StorageBackend': """Return a 'read-only' backend for the archive.""" # below are convenience methods for some common use cases diff --git a/aiida/tools/archive/create.py b/aiida/tools/archive/create.py index 34166badb8..edd60d5132 100644 --- a/aiida/tools/archive/create.py +++ b/aiida/tools/archive/create.py @@ -29,7 +29,7 @@ from aiida.common.progress_reporter import get_progress_reporter from aiida.manage import get_manager from aiida.orm.entities import EntityTypes -from aiida.orm.implementation import Backend +from aiida.orm.implementation import StorageBackend from aiida.orm.utils.links import LinkQuadruple from aiida.tools.graph.graph_traversers import get_nodes_export, validate_traversal_rules @@ -59,7 +59,7 @@ def create_archive( batch_size: int = 1000, compression: int = 6, test_run: bool = False, - backend: Optional[Backend] = None, + backend: Optional[StorageBackend] = None, **traversal_rules: bool ) -> Path: """Export AiiDA data to an archive file. @@ -151,7 +151,7 @@ def create_archive( """ # check the backend backend = backend or get_manager().get_profile_storage() - type_check(backend, Backend) + type_check(backend, StorageBackend) # create a function to get a query builder instance for the backend querybuilder = lambda: orm.QueryBuilder(backend=backend) @@ -425,7 +425,7 @@ def _collect_all_entities( def _collect_required_entities( querybuilder: QbType, entity_ids: Dict[EntityTypes, Set[int]], traversal_rules: Dict[str, bool], - include_authinfos: bool, include_comments: bool, include_logs: bool, backend: Backend, batch_size: int + include_authinfos: bool, include_comments: bool, include_logs: bool, backend: StorageBackend, batch_size: int ) -> Tuple[List[list], Set[LinkQuadruple]]: """Collect required entities, given a set of starting entities and provenance graph traversal rules. @@ -565,7 +565,7 @@ def _collect_required_entities( def _stream_repo_files( - key_format: str, writer: ArchiveWriterAbstract, node_ids: Set[int], backend: Backend, batch_size: int + key_format: str, writer: ArchiveWriterAbstract, node_ids: Set[int], backend: StorageBackend, batch_size: int ) -> None: """Collect all repository object keys from the nodes, then stream the files to the archive.""" keys = set(orm.Node.objects(backend).iter_repo_keys(filters={'id': {'in': list(node_ids)}}, batch_size=batch_size)) diff --git a/aiida/tools/archive/implementations/sqlite/backend.py b/aiida/tools/archive/implementations/sqlite/backend.py index 9d93ce7b1d..06afc51907 100644 --- a/aiida/tools/archive/implementations/sqlite/backend.py +++ b/aiida/tools/archive/implementations/sqlite/backend.py @@ -27,7 +27,7 @@ from aiida.common.exceptions import UnreachableStorage from aiida.manage import Profile from aiida.orm.entities import EntityTypes -from aiida.orm.implementation.backends import Backend as BackendAbstract +from aiida.orm.implementation import StorageBackend from aiida.repository.backend.abstract import AbstractRepositoryBackend # we need to import all models, to ensure they are loaded on the SQLA Metadata from aiida.storage.psql_dos.models import authinfo, base, comment, computer, group, log, node, user @@ -245,7 +245,7 @@ def table_groups_nodes(self): return DbGroupNodes.__table__ # type: ignore[attr-defined] # pylint: disable=no-member -class ArchiveReadOnlyBackend(BackendAbstract): # pylint: disable=too-many-public-methods +class ArchiveReadOnlyBackend(StorageBackend): # pylint: disable=too-many-public-methods """A read-only backend for the archive.""" @classmethod diff --git a/aiida/tools/archive/imports.py b/aiida/tools/archive/imports.py index bca6cfaea5..7c0b002bf9 100644 --- a/aiida/tools/archive/imports.py +++ b/aiida/tools/archive/imports.py @@ -22,7 +22,7 @@ from aiida.common.progress_reporter import get_progress_reporter from aiida.manage import get_manager from aiida.orm.entities import EntityTypes -from aiida.orm.implementation import Backend +from aiida.orm.implementation import StorageBackend from aiida.orm.querybuilder import QueryBuilder from aiida.repository import Repository @@ -65,7 +65,7 @@ def import_archive( create_group: bool = True, group: Optional[orm.Group] = None, test_run: bool = False, - backend: Optional[Backend] = None, + backend: Optional[StorageBackend] = None, ) -> Optional[int]: """Import an archive into the AiiDA backend. @@ -116,7 +116,7 @@ def import_archive( type_check(group, orm.Group, allow_none=True) type_check(test_run, bool) backend = backend or get_manager().get_profile_storage() - type_check(backend, Backend) + type_check(backend, StorageBackend) if group and not group.is_stored: group.store() @@ -194,8 +194,8 @@ def import_archive( def _add_new_entities( - etype: EntityTypes, total: int, unique_field: str, backend_unique_id: dict, backend_from: Backend, - backend_to: Backend, batch_size: int, transform: Callable[[dict], dict] + etype: EntityTypes, total: int, unique_field: str, backend_unique_id: dict, backend_from: StorageBackend, + backend_to: StorageBackend, batch_size: int, transform: Callable[[dict], dict] ) -> None: """Add new entities to the output backend and update the mapping of unique field -> id.""" IMPORT_LOGGER.report(f'Adding {total} new {etype.value}(s)') @@ -216,7 +216,7 @@ def _add_new_entities( progress.update(nrows) -def _import_users(backend_from: Backend, backend_to: Backend, batch_size: int) -> Dict[int, int]: +def _import_users(backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int) -> Dict[int, int]: """Import users from one backend to another. :returns: mapping of input backend id to output backend id @@ -254,7 +254,7 @@ def _import_users(backend_from: Backend, backend_to: Backend, batch_size: int) - return {int(i): output_email_id[email] for i, email in input_id_email.items()} -def _import_computers(backend_from: Backend, backend_to: Backend, batch_size: int) -> Dict[int, int]: +def _import_computers(backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int) -> Dict[int, int]: """Import computers from one backend to another. :returns: mapping of input backend id to output backend id @@ -323,7 +323,7 @@ def transform(row: dict) -> dict: def _import_authinfos( - backend_from: Backend, backend_to: Backend, batch_size: int, user_ids_archive_backend: Dict[int, int], + backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int, user_ids_archive_backend: Dict[int, int], computer_ids_archive_backend: Dict[int, int] ) -> None: """Import logs from one backend to another. @@ -402,7 +402,7 @@ def transform(row: dict) -> dict: def _import_nodes( - backend_from: Backend, backend_to: Backend, batch_size: int, user_ids_archive_backend: Dict[int, int], + backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int, user_ids_archive_backend: Dict[int, int], computer_ids_archive_backend: Dict[int, int], import_new_extras: bool, merge_extras: MergeExtrasType ) -> Dict[int, int]: """Import users from one backend to another. @@ -480,8 +480,9 @@ def __call__(self, row: dict) -> dict: return data -def _import_logs(backend_from: Backend, backend_to: Backend, batch_size: int, - node_ids_archive_backend: Dict[int, int]) -> Dict[int, int]: +def _import_logs( + backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int, node_ids_archive_backend: Dict[int, int] +) -> Dict[int, int]: """Import logs from one backend to another. :returns: mapping of input backend id to output backend id @@ -528,7 +529,8 @@ def transform(row: dict) -> dict: def _merge_node_extras( - backend_from: Backend, backend_to: Backend, batch_size: int, backend_uuid_id: Dict[str, int], mode: MergeExtrasType + backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int, backend_uuid_id: Dict[str, int], + mode: MergeExtrasType ) -> None: """Merge extras from the input backend with the ones in the output backend. @@ -672,8 +674,8 @@ def __call__(self, row: dict) -> dict: def _import_comments( - backend_from: Backend, - backend: Backend, + backend_from: StorageBackend, + backend: StorageBackend, batch_size: int, user_ids_archive_backend: Dict[int, int], node_ids_archive_backend: Dict[int, int], @@ -753,7 +755,7 @@ def _transform(row): def _import_links( - backend_from: Backend, backend_to: Backend, batch_size: int, node_ids_archive_backend: Dict[int, int] + backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int, node_ids_archive_backend: Dict[int, int] ) -> None: """Import links from one backend to another.""" @@ -922,7 +924,7 @@ def __call__(self, row: dict) -> dict: def _import_groups( - backend_from: Backend, backend_to: Backend, batch_size: int, user_ids_archive_backend: Dict[int, int], + backend_from: StorageBackend, backend_to: StorageBackend, batch_size: int, user_ids_archive_backend: Dict[int, int], node_ids_archive_backend: Dict[int, int] ) -> Set[str]: """Import groups from the input backend, and add group -> node records. @@ -1002,7 +1004,7 @@ def group_node_transform(row): def _make_import_group( - group: Optional[orm.Group], labels: Set[str], node_ids_archive_backend: Dict[int, int], backend_to: Backend, + group: Optional[orm.Group], labels: Set[str], node_ids_archive_backend: Dict[int, int], backend_to: StorageBackend, batch_size: int ) -> Optional[int]: """Make an import group containing all imported nodes. @@ -1065,7 +1067,8 @@ def _make_import_group( return group_id -def _get_new_object_keys(key_format: str, backend_from: Backend, backend_to: Backend, batch_size: int) -> Set[str]: +def _get_new_object_keys(key_format: str, backend_from: StorageBackend, backend_to: StorageBackend, + batch_size: int) -> Set[str]: """Return the object keys that need to be added to the backend.""" archive_hashkeys: Set[str] = set() query = QueryBuilder(backend=backend_from).append(orm.Node, project='repository_metadata') @@ -1092,7 +1095,7 @@ def _get_new_object_keys(key_format: str, backend_from: Backend, backend_to: Bac return new_hashkeys -def _add_files_to_repo(backend_from: Backend, backend_to: Backend, new_keys: Set[str]) -> None: +def _add_files_to_repo(backend_from: StorageBackend, backend_to: StorageBackend, new_keys: Set[str]) -> None: """Add the new files to the repository.""" if not new_keys: return None diff --git a/aiida/tools/graph/graph_traversers.py b/aiida/tools/graph/graph_traversers.py index 991332a817..22e9ef4c93 100644 --- a/aiida/tools/graph/graph_traversers.py +++ b/aiida/tools/graph/graph_traversers.py @@ -21,7 +21,7 @@ from aiida.tools.graph.age_rules import RuleSaveWalkers, RuleSequence, RuleSetWalkers, UpdateRule if TYPE_CHECKING: - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend if sys.version_info >= (3, 8): from typing import TypedDict @@ -38,7 +38,7 @@ def get_nodes_delete( starting_pks: Iterable[int], get_links: bool = False, missing_callback: Optional[Callable[[Iterable[int]], None]] = None, - backend: Optional['Backend'] = None, + backend: Optional['StorageBackend'] = None, **traversal_rules: bool ) -> TraverseGraphOutput: """ @@ -81,7 +81,7 @@ def get_nodes_delete( def get_nodes_export( starting_pks: Iterable[int], get_links: bool = False, - backend: Optional['Backend'] = None, + backend: Optional['StorageBackend'] = None, **traversal_rules: bool ) -> TraverseGraphOutput: """ @@ -196,7 +196,7 @@ def traverse_graph( links_forward: Iterable[LinkType] = (), links_backward: Iterable[LinkType] = (), missing_callback: Optional[Callable[[Iterable[int]], None]] = None, - backend: Optional['Backend'] = None + backend: Optional['StorageBackend'] = None ) -> TraverseGraphOutput: """ This function will return the set of all nodes that can be connected diff --git a/aiida/tools/visualization/graph.py b/aiida/tools/visualization/graph.py index 5803f53f69..37b4fd0b04 100644 --- a/aiida/tools/visualization/graph.py +++ b/aiida/tools/visualization/graph.py @@ -23,7 +23,7 @@ from aiida.tools.graph.graph_traversers import traverse_graph if TYPE_CHECKING: - from aiida.orm.implementation import Backend + from aiida.orm.implementation import StorageBackend __all__ = ('Graph', 'default_link_styles', 'default_node_styles', 'pstate_node_styles', 'default_node_sublabels') @@ -364,7 +364,7 @@ def __init__( node_style_fn=None, node_sublabel_fn=None, node_id_type='pk', - backend: Optional['Backend'] = None + backend: Optional['StorageBackend'] = None ): """a class to create graphviz graphs of the AiiDA node provenance @@ -409,7 +409,7 @@ def __init__( self._origin_node_style = _OVERRIDE_STYLES_DICT['origin_node'] @property - def backend(self) -> 'Backend': + def backend(self) -> 'StorageBackend': """The backend used to create the graph""" return self._backend diff --git a/tests/tools/archive/test_backend.py b/tests/tools/archive/test_backend.py index 7b5d0c8d50..d537c32d09 100644 --- a/tests/tools/archive/test_backend.py +++ b/tests/tools/archive/test_backend.py @@ -13,7 +13,7 @@ from aiida import orm from aiida.common.exceptions import NotExistent -from aiida.orm.implementation.backends import Backend +from aiida.orm.implementation import StorageBackend from aiida.tools.archive import ArchiveFormatSqlZip, ArchiveReaderAbstract from tests.utils.archives import get_archive_file @@ -32,7 +32,7 @@ def archive(tmp_path): def test_get_backend(archive: ArchiveReaderAbstract): """Test retrieving the backend""" backend = archive.get_backend() - assert isinstance(backend, Backend) + assert isinstance(backend, StorageBackend) def test_get(archive: ArchiveReaderAbstract):