diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0430a4f6b5ac08d4ab38f00bff78b845e11fb97e..240175315b4acdc373129c7d112af71bb38565b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/Makefile b/Makefile index 0a0888ad0484c0307583e139e65058c38574ed3a..d15c830d8e4cf6e4bc0b519b9fa5b8cb5f224043 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2020 Daniel Hornung <d.hornung@indiscale.com> @@ -40,7 +40,7 @@ style: .PHONY: style lint: - pylint --unsafe-load-any-extension=y -d all -e E,F src/caosdb/common + pylint --unsafe-load-any-extension=y -d all -e E,F src/linkahead/common .PHONY: lint unittest: diff --git a/RELEASE_GUIDELINES.md b/RELEASE_GUIDELINES.md index 95ee8e314871153476c30790a456242e38dcaf9e..b3025f0021ac82a29db5380be021ccaec86b96f9 100644 --- a/RELEASE_GUIDELINES.md +++ b/RELEASE_GUIDELINES.md @@ -1,7 +1,7 @@ # Release Guidelines for the CaosDB Python Client Library This document specifies release guidelines in addition to the general release -guidelines of the CaosDB Project +guidelines of the LinkAhead Project ([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md)) ## General Prerequisites diff --git a/examples/server_side_script.py b/examples/server_side_script.py index 71bd9c05b4e86133cc356e1c15359701642a9486..0c5013eb7fac64d2ee04e8a7ab02f39342f411a8 100755 --- a/examples/server_side_script.py +++ b/examples/server_side_script.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/examples/set_permissions.py b/examples/set_permissions.py index 8162b11bfefb41b1bcdbc74b8e314f99a61d1a4e..8eef49fe0ace06e8471729f27298846d41a2f7a7 100755 --- a/examples/set_permissions.py +++ b/examples/set_permissions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (c) 2019 IndiScale GmbH # Copyright (c) 2019 Daniel Hornung <d.hornung@indiscale.com> diff --git a/src/doc/Makefile b/src/doc/Makefile index 64219c5957ee963e84f9305685f2ec4e8ed3d761..0f1d3c6a2174aa2e9fad70705e7cc572d1649df8 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -1,5 +1,5 @@ # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2020 Daniel Hornung <d.hornung@indiscale.com> diff --git a/src/doc/gallery/Makefile b/src/doc/gallery/Makefile index 658f9a6a93e23957b20aee5f38e5565bde35af80..b8ed911d9fdeb2cc64023ee0c6ec2306f84d5afa 100644 --- a/src/doc/gallery/Makefile +++ b/src/doc/gallery/Makefile @@ -1,4 +1,4 @@ -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2022 Daniel Hornung <d.hornung@indiscale.com> diff --git a/src/doc/gallery/curator_permissions.py b/src/doc/gallery/curator_permissions.py index 16b4b7f6f1bb9abfb7e191c6a1101181984bce9a..36eb45000198b3583de10c609f504279a42cb77c 100644 --- a/src/doc/gallery/curator_permissions.py +++ b/src/doc/gallery/curator_permissions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # encoding: utf-8 # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> # Copyright (C) 2022 Florian Spreckelsen <f.spreckelsen@indiscale.com> diff --git a/src/linkahead/__init__.py b/src/linkahead/__init__.py index acf323e860a93753b57f2e104531383b412f3fa0..0bc70972495f63a1a9a9fde12c817a18b64fb492 100644 --- a/src/linkahead/__init__.py +++ b/src/linkahead/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -34,24 +34,24 @@ from os import environ, getcwd from os.path import expanduser, join # Import of convenience methods: -import caosdb.apiutils -from caosdb.common import administration -from caosdb.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, +import linkahead.apiutils +from linkahead.common import administration +from linkahead.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, LIST, REFERENCE, TEXT) -from caosdb.common.state import State, Transition +from linkahead.common.state import State, Transition # Import of the basic API classes: -from caosdb.common.models import (ACL, ALL, FIX, NONE, OBLIGATORY, RECOMMENDED, +from linkahead.common.models import (ACL, ALL, FIX, NONE, OBLIGATORY, RECOMMENDED, SUGGESTED, Container, DropOffBox, Entity, File, Info, Message, Permissions, Property, Query, QueryTemplate, Record, RecordType, delete, execute_query, get_global_acl, get_known_permissions, raise_errors) -from caosdb.utils.get_entity import get_entity_by_name, get_entity_by_path, get_entity_by_id -from caosdb.configuration import _read_config_files, configure, get_config -from caosdb.connection.connection import configure_connection, get_connection -from caosdb.exceptions import * +from linkahead.utils.get_entity import get_entity_by_name, get_entity_by_path, get_entity_by_id +from linkahead.configuration import _read_config_files, configure, get_config +from linkahead.connection.connection import configure_connection, get_connection +from linkahead.exceptions import * try: - from caosdb.version import version as __version__ + from linkahead.version import version as __version__ except ModuleNotFoundError: version = "uninstalled" __version__ = version diff --git a/src/linkahead/apiutils.py b/src/linkahead/apiutils.py index a5a936c556dd065b56b60ff690baf9a1ce19a583..c522e34e173713905ef9f3c1324fc429f82f6bd2 100644 --- a/src/linkahead/apiutils.py +++ b/src/linkahead/apiutils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -35,12 +35,12 @@ from collections.abc import Iterable from subprocess import call from typing import Optional, Any, Dict, List -from caosdb.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, +from linkahead.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, REFERENCE, TEXT, is_reference) -from caosdb.common.models import (Container, Entity, File, Property, Query, +from linkahead.common.models import (Container, Entity, File, Property, Query, Record, RecordType, execute_query, get_config, SPECIAL_ATTRIBUTES) -from caosdb.exceptions import CaosDBException +from linkahead.exceptions import CaosDBException logger = logging.getLogger(__name__) diff --git a/src/linkahead/cached.py b/src/linkahead/cached.py index 4f735bb8e85ba7aa364b211e198840f9f6fb97e2..33124d61ce5f86da362127aa3fde516088dd6b19 100644 --- a/src/linkahead/cached.py +++ b/src/linkahead/cached.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2023 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2023 Henrik tom Wörden <h.tomwoerden@indiscale.com> diff --git a/src/linkahead/common/administration.py b/src/linkahead/common/administration.py index a27aaf0406c83ac33c37b676a9cdeab812bf2f7a..12c738f1532d2fc67b3da4315264b3429c5fea31 100644 --- a/src/linkahead/common/administration.py +++ b/src/linkahead/common/administration.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -29,9 +29,9 @@ import re import string import random -from caosdb.common.utils import xml2str -from caosdb.connection.connection import get_connection -from caosdb.exceptions import (EntityDoesNotExistError, HTTPClientError, +from linkahead.common.utils import xml2str +from linkahead.connection.connection import get_connection +from linkahead.exceptions import (EntityDoesNotExistError, HTTPClientError, HTTPForbiddenError, HTTPResourceNotFoundError, ServerConfigurationException) from lxml import etree diff --git a/src/linkahead/common/datatype.py b/src/linkahead/common/datatype.py index 03ff6d023ab0d3005c37d56c65353c1a1072518e..50d923d9b9aea2e79c861d3ae6299e2cf25f78e0 100644 --- a/src/linkahead/common/datatype.py +++ b/src/linkahead/common/datatype.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 IndiScale GmbH # Copyright (C) 2020 Henrik tom Wörden, IndiScale GmbH @@ -148,7 +148,7 @@ def get_id_of_datatype(datatype): EmptyUniqueQueryError If there is no entity with the name of the datatype. """ - from caosdb import execute_query + from linkahead import execute_query if is_list_datatype(datatype): datatype = get_list_datatype(datatype) diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index 9ba54c49d2d4cd776dc2263b850cc095c65fea60..7b6db6d8903788dfa34f4f6a19691df9d214c414 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -49,16 +49,16 @@ from random import randint from tempfile import NamedTemporaryFile from warnings import warn -from caosdb.common.datatype import (BOOLEAN, DATETIME, DOUBLE, INTEGER, TEXT, +from linkahead.common.datatype import (BOOLEAN, DATETIME, DOUBLE, INTEGER, TEXT, is_list_datatype, is_reference) -from caosdb.common.state import State -from caosdb.common.utils import uuid, xml2str -from caosdb.common.timezone import TimeZone -from caosdb.common.versioning import Version -from caosdb.configuration import get_config -from caosdb.connection.connection import get_connection -from caosdb.connection.encode import MultipartParam, multipart_encode -from caosdb.exceptions import (AmbiguousEntityError, AuthorizationError, +from linkahead.common.state import State +from linkahead.common.utils import uuid, xml2str +from linkahead.common.timezone import TimeZone +from linkahead.common.versioning import Version +from linkahead.configuration import get_config +from linkahead.connection.connection import get_connection +from linkahead.connection.encode import MultipartParam, multipart_encode +from linkahead.exceptions import (AmbiguousEntityError, AuthorizationError, CaosDBConnectionError, CaosDBException, ConsistencyError, EmptyUniqueQueryError, EntityDoesNotExistError, EntityError, @@ -529,7 +529,7 @@ class Entity: Add a simple integer property with the name ``TestProp`` and the value 27 to a Record: - >>> import caosdb as db + >>> import linkahead as db >>> rec = db.Record(name="TestRec").add_parent(name="TestType") >>> rec.add_property("TestProp", value=27) # specified by name, you could equally use the property's id if it is known diff --git a/src/linkahead/common/state.py b/src/linkahead/common/state.py index cb74022bef57a77c8270b2033c904eecabaadf83..82f314e80191163f14a5c4babdd749f977f2901b 100644 --- a/src/linkahead/common/state.py +++ b/src/linkahead/common/state.py @@ -1,5 +1,5 @@ # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> diff --git a/src/linkahead/common/utils.py b/src/linkahead/common/utils.py index f0ce740d38d90b0c7bb1031e808b83efb2207a43..b333e3e07253397e54f3e2830a7cdcce42fa2e1e 100644 --- a/src/linkahead/common/utils.py +++ b/src/linkahead/common/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/common/versioning.py b/src/linkahead/common/versioning.py index 2875486a13347a2eb834d22580497033699ebd37..64d66609ce4f59143b19076cac05f6def9dcda9d 100644 --- a/src/linkahead/common/versioning.py +++ b/src/linkahead/common/versioning.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -27,7 +27,7 @@ Currently this module defines nothing but a single class, `Version`. """ from __future__ import absolute_import -from caosdb.common.utils import xml2str +from linkahead.common.utils import xml2str from lxml import etree diff --git a/src/linkahead/configuration.py b/src/linkahead/configuration.py index 1c108ac1d39c135dbc90f477be8b8f2f630391ce..fcceba1a919974dcaefd68019738bcf017edb4cf 100644 --- a/src/linkahead/configuration.py +++ b/src/linkahead/configuration.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/authentication/auth_token.py b/src/linkahead/connection/authentication/auth_token.py index 688123867f68153d3631bb8559baa235f6f02da5..761abcc7e0481cb5220af2712a26831d5e5540f3 100644 --- a/src/linkahead/connection/authentication/auth_token.py +++ b/src/linkahead/connection/authentication/auth_token.py @@ -1,7 +1,7 @@ #! -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -29,8 +29,8 @@ An Authentictor which only uses only a pre-supplied authentication token. """ from __future__ import absolute_import, unicode_literals, print_function from .interface import AbstractAuthenticator, CaosDBServerConnection -from caosdb.connection.utils import auth_token_to_cookie -from caosdb.exceptions import LoginFailedError +from linkahead.connection.utils import auth_token_to_cookie +from linkahead.exceptions import LoginFailedError def get_authentication_provider(): diff --git a/src/linkahead/connection/authentication/external_credentials_provider.py b/src/linkahead/connection/authentication/external_credentials_provider.py index 1cf4cefc90de2a0281528eb83c1efe55eda4f345..91158c90add616ca42c0dca2e1b4eb8d1abf3c46 100644 --- a/src/linkahead/connection/authentication/external_credentials_provider.py +++ b/src/linkahead/connection/authentication/external_credentials_provider.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/authentication/input.py b/src/linkahead/connection/authentication/input.py index 7edec7c814d9019d43701b33d4022063081714a7..2799207354b3949063461229d7d465e8a83c83ae 100644 --- a/src/linkahead/connection/authentication/input.py +++ b/src/linkahead/connection/authentication/input.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/authentication/interface.py b/src/linkahead/connection/authentication/interface.py index f2cc5001cf8fa0f6d61ec65346f6a200ba0dfcd8..ad1147ebc22d1e6bcbda120eb4dfaffd297c9983 100644 --- a/src/linkahead/connection/authentication/interface.py +++ b/src/linkahead/connection/authentication/interface.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -28,10 +28,10 @@ Implementing modules muts provide a `get_authentication_provider()` method. """ from abc import ABCMeta, abstractmethod, abstractproperty import logging -from caosdb.connection.utils import urlencode -from caosdb.connection.interface import CaosDBServerConnection -from caosdb.connection.utils import parse_auth_token, auth_token_to_cookie -from caosdb.exceptions import LoginFailedError +from linkahead.connection.utils import urlencode +from linkahead.connection.interface import CaosDBServerConnection +from linkahead.connection.utils import parse_auth_token, auth_token_to_cookie +from linkahead.exceptions import LoginFailedError # meta class compatible with Python 2 *and* 3: ABC = ABCMeta('ABC', (object, ), {'__slots__': ()}) diff --git a/src/linkahead/connection/authentication/keyring.py b/src/linkahead/connection/authentication/keyring.py index 99d184136c20b23557efea0b54c648095a8d3ab2..5ed63634bcc68a0da2bc1b90f53d89477cefd3ba 100644 --- a/src/linkahead/connection/authentication/keyring.py +++ b/src/linkahead/connection/authentication/keyring.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -30,7 +30,7 @@ retrieve the password. import sys import importlib from getpass import getpass -from caosdb.exceptions import ConfigurationError +from linkahead.exceptions import ConfigurationError from .external_credentials_provider import ExternalCredentialsProvider from .interface import CredentialsAuthenticator diff --git a/src/linkahead/connection/authentication/pass.py b/src/linkahead/connection/authentication/pass.py index 853cdf0ed92039e7b5fc9beda8bb76cc0f3cc030..8067a890eee8999ce25d1a3d1cd19b36e50ac365 100644 --- a/src/linkahead/connection/authentication/pass.py +++ b/src/linkahead/connection/authentication/pass.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -28,7 +28,7 @@ password. """ from subprocess import check_output, CalledProcessError -from caosdb.exceptions import ConfigurationError +from linkahead.exceptions import ConfigurationError from .interface import CredentialsAuthenticator from .external_credentials_provider import ExternalCredentialsProvider diff --git a/src/linkahead/connection/authentication/plain.py b/src/linkahead/connection/authentication/plain.py index 83dd592940a7010d07112f73b9bd5bcf3741a168..162cd365b76349c4baf1831900236c832c593547 100644 --- a/src/linkahead/connection/authentication/plain.py +++ b/src/linkahead/connection/authentication/plain.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/authentication/unauthenticated.py b/src/linkahead/connection/authentication/unauthenticated.py index 65febae8fd8f02f3ee0d339fafb36af512fc7be7..8c220acde2e10750a8bedf10067213ac869bb3bf 100644 --- a/src/linkahead/connection/authentication/unauthenticated.py +++ b/src/linkahead/connection/authentication/unauthenticated.py @@ -1,7 +1,7 @@ #! -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -30,7 +30,7 @@ cookies. """ from __future__ import absolute_import, unicode_literals, print_function from .interface import AbstractAuthenticator, CaosDBServerConnection -from caosdb.exceptions import LoginFailedError +from linkahead.exceptions import LoginFailedError def get_authentication_provider(): diff --git a/src/linkahead/connection/connection.py b/src/linkahead/connection/connection.py index 46dadea9dfcfa6e614493b75d709f604aa188ef6..84e9add51552984845c709d566a31b4554cf88df 100644 --- a/src/linkahead/connection/connection.py +++ b/src/linkahead/connection/connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -38,8 +38,8 @@ from requests.exceptions import ConnectionError as HTTPConnectionError from urllib3.poolmanager import PoolManager from requests.adapters import HTTPAdapter -from caosdb.configuration import get_config -from caosdb.exceptions import (CaosDBException, HTTPClientError, +from linkahead.configuration import get_config +from linkahead.exceptions import (CaosDBException, HTTPClientError, ConfigurationError, CaosDBConnectionError, HTTPForbiddenError, @@ -48,7 +48,7 @@ from caosdb.exceptions import (CaosDBException, HTTPClientError, HTTPServerError, HTTPURITooLongError) try: - from caosdb.version import version + from linkahead.version import version except ModuleNotFoundError: version = "uninstalled" diff --git a/src/linkahead/connection/encode.py b/src/linkahead/connection/encode.py index 0b826cc4400275a2374308ee104cdbdabb619b75..6b328285e97e4dce2483ddd955134ee64cd3ce84 100644 --- a/src/linkahead/connection/encode.py +++ b/src/linkahead/connection/encode.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/interface.py b/src/linkahead/connection/interface.py index a6f739171597a848356321578f4a4065a2e94006..d56900d8022a3753c5acbbf843e2dcd07fb71a0a 100644 --- a/src/linkahead/connection/interface.py +++ b/src/linkahead/connection/interface.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/mockup.py b/src/linkahead/connection/mockup.py index b37670b867cd88cf47e64084c6ccc802cad463b4..8da791333fe64d2d68bc62e61567c729ac21496f 100644 --- a/src/linkahead/connection/mockup.py +++ b/src/linkahead/connection/mockup.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/connection/utils.py b/src/linkahead/connection/utils.py index 095d47035e24dad5b6d7041f5d3b8a739652f271..90ec6b5ba6789747f5d4452a1260306b716b1f7e 100644 --- a/src/linkahead/connection/utils.py +++ b/src/linkahead/connection/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/exceptions.py b/src/linkahead/exceptions.py index fdd2e11f1dfb8857f86942df2534d732bad9a793..97c6d708959e13bbea676ec60063906e15b3d33f 100644 --- a/src/linkahead/exceptions.py +++ b/src/linkahead/exceptions.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/src/linkahead/high_level_api.py b/src/linkahead/high_level_api.py index 427a095a4bafc0c372b0169298f2980dbd902c49..e7e9beab9b7ed75bc3ba422af8d612b8405819e5 100644 --- a/src/linkahead/high_level_api.py +++ b/src/linkahead/high_level_api.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -30,12 +30,12 @@ A high level API for accessing CaosDB entities from within python. This is refactored from apiutils. """ -from caosdb.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, +from linkahead.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, REFERENCE, TEXT, is_list_datatype, get_list_datatype, is_reference) -import caosdb as db +import linkahead as db from .apiutils import get_type_of_entity_with, create_flat_list import warnings diff --git a/src/linkahead/schema-pycaosdb-ini.yml b/src/linkahead/schema-pylinkahead-ini.yml similarity index 100% rename from src/linkahead/schema-pycaosdb-ini.yml rename to src/linkahead/schema-pylinkahead-ini.yml diff --git a/src/linkahead/utils/checkFileSystemConsistency.py b/src/linkahead/utils/checkFileSystemConsistency.py index a142c1dd7ffd1a4e6ee6cfc85891e1bf70f98d89..ddbb085ac978fb52c93163dfe525b26fcd25a8f5 100755 --- a/src/linkahead/utils/checkFileSystemConsistency.py +++ b/src/linkahead/utils/checkFileSystemConsistency.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -26,7 +26,7 @@ """requests the server to execute checkFileSystemConsistency job.""" import sys -import caosdb as db +import linkahead as db from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter diff --git a/src/linkahead/utils/create_revision.py b/src/linkahead/utils/create_revision.py index 419e1c9f2b97171be0dccf1bc772ae5db679c0b7..5f6ecc8148859d0ee0908412ff80d20d465cdb25 100644 --- a/src/linkahead/utils/create_revision.py +++ b/src/linkahead/utils/create_revision.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -23,8 +23,8 @@ # """provides utilities for creating revisions of database entries.""" -import caosdb as db -from caosdb import INTEGER, LIST +import linkahead as db +from linkahead import INTEGER, LIST def bend_references(from_id, to_id, except_for=None): diff --git a/src/linkahead/utils/get_entity.py b/src/linkahead/utils/get_entity.py index a27aafa99ffe3759a46876a5bcd5e686d631b1dc..ea9f3228bfc32f223979846623fccdec45752e5d 100644 --- a/src/linkahead/utils/get_entity.py +++ b/src/linkahead/utils/get_entity.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2023 Henrik tom Wörden <h.tomwoerden@indiscale.com> # Copyright (C) 2023 IndiScale GmbH <info@indiscale.com> diff --git a/src/linkahead/utils/linkahead_admin.py b/src/linkahead/utils/linkahead_admin.py index 09a8f64a3c6b9f0825089949840a8791604d1ded..e9a2c09b415f96825e8b70acd333ddf8d0a6c74b 100755 --- a/src/linkahead/utils/linkahead_admin.py +++ b/src/linkahead/utils/linkahead_admin.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -31,9 +31,9 @@ import getpass import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter -import caosdb as db -from caosdb import administration as admin -from caosdb.exceptions import HTTPClientError +import linkahead as db +from linkahead import administration as admin +from linkahead.exceptions import HTTPClientError __all__ = [] __version__ = 0.3 @@ -412,7 +412,7 @@ USAGE subparser = subparsers.add_parser( "delete_user", - help="Delete a user from caosdb's internal user database.") + help="Delete a user from linkahead's internal user database.") subparser.set_defaults(call=do_delete_user) subparser.add_argument(metavar='USERNAME', dest="user_name", help="The name of the user who is to be deleted.") diff --git a/src/linkahead/utils/plantuml.py b/src/linkahead/utils/plantuml.py index 6252a48983c62e7a2f33113422205209d616b5b6..1f925cbd1cfc44fadcd610f2e206a9367c2c4b2b 100644 --- a/src/linkahead/utils/plantuml.py +++ b/src/linkahead/utils/plantuml.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -36,8 +36,8 @@ plantuml FILENAME.pu -> FILENAME.png import os import shutil -import caosdb as db -from caosdb.common.datatype import is_reference, get_referenced_recordtype +import linkahead as db +from linkahead.common.datatype import is_reference, get_referenced_recordtype from typing import List, Optional diff --git a/src/linkahead/utils/register_tests.py b/src/linkahead/utils/register_tests.py index 9d0afcbb0845e1d8d31622e8ab9926f26f7e78f6..3035f69d443b2b075c275a937878e0efc99e9cdd 100644 --- a/src/linkahead/utils/register_tests.py +++ b/src/linkahead/utils/register_tests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 Alexander Schlemmer <alexander.schlemmer@ds.mpg.de> # Copyright (C) 2022 Timm Fitschen <t.fitschen@indiscale.com> @@ -19,8 +19,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. -import caosdb as db -from caosdb import administration as admin +import linkahead as db +from linkahead import administration as admin """ This module implements a registration procedure for integration tests which diff --git a/src/linkahead/utils/server_side_scripting.py b/src/linkahead/utils/server_side_scripting.py index 7e5ee4390ae3314792d12fd2942980aa3d9c9773..6a419191e5d15d51d8850f6663c65efa183d236b 100644 --- a/src/linkahead/utils/server_side_scripting.py +++ b/src/linkahead/utils/server_side_scripting.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -28,9 +28,9 @@ Helper functions for calling server-side scripts. from urllib.parse import quote from lxml import etree -from caosdb.connection.connection import get_connection -from caosdb.connection.utils import urlencode -from caosdb.connection.encode import (MultipartParam, multipart_encode, +from linkahead.connection.connection import get_connection +from linkahead.connection.utils import urlencode +from linkahead.connection.encode import (MultipartParam, multipart_encode, ReadableMultiparts) diff --git a/src/linkahead/yamlapi.py b/src/linkahead/yamlapi.py index 80bb4b13e4d1626c5d29c8950f3a22bbb73e0fdb..ba1f183dbed9334726d3d9fd5efb0800869b4b46 100644 --- a/src/linkahead/yamlapi.py +++ b/src/linkahead/yamlapi.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -28,9 +28,9 @@ import yaml from lxml import etree from lxml.etree import Element import re -import caosdb -import caosdb.common.utils as utils -from caosdb.connection.connection import get_connection +import linkahead +import linkahead.common.utils as utils +from linkahead.connection.connection import get_connection import warnings diff --git a/unittests/test_acl.py b/unittests/test_acl.py index 633c25ad5c4046c0fa41b66049bdf56aa695f482..c004979fd4fc437bdca5a3d037417e5f47f45b42 100644 --- a/unittests/test_acl.py +++ b/unittests/test_acl.py @@ -1,6 +1,6 @@ # -*- encoding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> # Copyright (C) 2022 Timm Fitschen <f.fitschen@indiscale.com> @@ -18,7 +18,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # -import caosdb as db +import linkahead as db from lxml import etree diff --git a/unittests/test_add_property.py b/unittests/test_add_property.py index 0d3183b4c0ca5517ecea68d0e49bbf335bb2a13e..2989adec5ded5dd227b21771a0d723c45952782a 100644 --- a/unittests/test_add_property.py +++ b/unittests/test_add_property.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -24,7 +24,7 @@ # ** end header # from pytest import raises -import caosdb as db +import linkahead as db def test_no_parameter(): diff --git a/unittests/test_administraction.py b/unittests/test_administraction.py index 25a7d0de7d2a591135ddf21530f23ad532101c53..7f40aa9437b327e140ab0de3a3438522a31b200c 100644 --- a/unittests/test_administraction.py +++ b/unittests/test_administraction.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -25,8 +25,8 @@ # pylint: disable=missing-docstring from __future__ import unicode_literals from pytest import raises -from caosdb import administration, configure_connection, get_connection -from caosdb.connection.mockup import MockUpServerConnection, MockUpResponse +from linkahead import administration, configure_connection, get_connection +from linkahead.connection.mockup import MockUpServerConnection, MockUpResponse def setup_module(): diff --git a/unittests/test_apiutils.py b/unittests/test_apiutils.py index bda381cf6427377194e272dfa14b83399b6f012f..4c15230d28cf2404c53d3088316b6ddbbaa6a229 100644 --- a/unittests/test_apiutils.py +++ b/unittests/test_apiutils.py @@ -1,5 +1,5 @@ # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2022 Florian Spreckelsen <f.spreckelsen@indiscale.com> @@ -27,13 +27,13 @@ import pytest -import caosdb as db -import caosdb.apiutils -from caosdb.apiutils import (apply_to_ids, compare_entities, create_id_query, +import linkahead as db +import linkahead.apiutils +from linkahead.apiutils import (apply_to_ids, compare_entities, create_id_query, empty_diff, EntityMergeConflictError, resolve_reference, merge_entities) -from caosdb.common.models import SPECIAL_ATTRIBUTES +from linkahead.common.models import SPECIAL_ATTRIBUTES def test_apply_to_ids(): diff --git a/unittests/test_authentication_auth_token.py b/unittests/test_authentication_auth_token.py index d0eb6b90883951af584d42a80e319c14891f6e50..356eb53cdc932f0d33ea5ac9153a4e20b8d6ae60 100644 --- a/unittests/test_authentication_auth_token.py +++ b/unittests/test_authentication_auth_token.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -29,11 +29,11 @@ Unit tests for the module caosdb.connection.authentication.auth_token from __future__ import unicode_literals from pytest import raises from unittest.mock import Mock -from caosdb.connection.authentication import auth_token as at -from caosdb.connection.mockup import MockUpServerConnection, MockUpResponse -from caosdb.connection.utils import parse_auth_token -from caosdb.exceptions import LoginFailedError -from caosdb import configure_connection +from linkahead.connection.authentication import auth_token as at +from linkahead.connection.mockup import MockUpServerConnection, MockUpResponse +from linkahead.connection.utils import parse_auth_token +from linkahead.exceptions import LoginFailedError +from linkahead import configure_connection def test_get_authentication_provider(): diff --git a/unittests/test_authentication_external.py b/unittests/test_authentication_external.py index a8fc6f79578c9812dab52dd1fa3807f62fd710fb..66a584ca4b2e6a2ee49bf1f16ae25ff26983fdd6 100644 --- a/unittests/test_authentication_external.py +++ b/unittests/test_authentication_external.py @@ -1,7 +1,7 @@ #! -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -29,7 +29,7 @@ Tests for the external_credentials_provider modul. from __future__ import unicode_literals import logging from pytest import raises -from caosdb.connection.authentication import ( +from linkahead.connection.authentication import ( external_credentials_provider as ecp ) diff --git a/unittests/test_authentication_keyring.py b/unittests/test_authentication_keyring.py index 715514498b406478a3bddcc64c7794316f64368e..d3b074795d7199a177cc44703c62074c7978049f 100644 --- a/unittests/test_authentication_keyring.py +++ b/unittests/test_authentication_keyring.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -27,7 +27,7 @@ Tests for the caosdb.connection.authentication.keyring module. """ import sys from pytest import raises -from caosdb.connection.authentication.keyring import KeyringCaller +from linkahead.connection.authentication.keyring import KeyringCaller def test_initialization(): diff --git a/unittests/test_authentication_pass.py b/unittests/test_authentication_pass.py index 45bda08a46bcc95aa73e5609f053f3ac178901dc..f3f5b6717bbb1915cd50d00cea6efba467896fe1 100644 --- a/unittests/test_authentication_pass.py +++ b/unittests/test_authentication_pass.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen diff --git a/unittests/test_authentication_plain.py b/unittests/test_authentication_plain.py index 146b59889c71c86ea77fb4ae962118cdda1afb06..55fbc45987c66112db00cb8ef82f3e45c6867b4d 100644 --- a/unittests/test_authentication_plain.py +++ b/unittests/test_authentication_plain.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -28,7 +28,7 @@ Unit tests for the modul caosdb.connection.authentication.plain. from __future__ import unicode_literals -from caosdb.connection.authentication.plain import PlainTextCredentialsProvider +from linkahead.connection.authentication.plain import PlainTextCredentialsProvider from pytest import raises diff --git a/unittests/test_authentication_unauthenticated.py b/unittests/test_authentication_unauthenticated.py index 45a709fcc62b609a97de7e87dd6c6f6ac94a55a1..efd419b364e0579e6236eee4b14b599d1ae0c24c 100644 --- a/unittests/test_authentication_unauthenticated.py +++ b/unittests/test_authentication_unauthenticated.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -29,11 +29,11 @@ Unit tests for the module caosdb.connection.authentication.unauthenticated. from __future__ import unicode_literals from pytest import raises from unittest.mock import Mock -from caosdb.connection.authentication import unauthenticated -from caosdb.connection.mockup import MockUpServerConnection, MockUpResponse -from caosdb.connection.utils import parse_auth_token -from caosdb.exceptions import LoginFailedError -from caosdb import configure_connection +from linkahead.connection.authentication import unauthenticated +from linkahead.connection.mockup import MockUpServerConnection, MockUpResponse +from linkahead.connection.utils import parse_auth_token +from linkahead.exceptions import LoginFailedError +from linkahead import configure_connection from .test_authentication_auth_token import response_with_auth_token diff --git a/unittests/test_cached.py b/unittests/test_cached.py index ce302d671d6077aed7d8457e70da2076ebe65d50..d49b7fb3abfc26047a42fa1cca340c16ba3c55b3 100644 --- a/unittests/test_cached.py +++ b/unittests/test_cached.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2023 Henrik tom Wörden <h.tomwoerden@indiscale.com> # Copyright (C) 2023 IndiScale GmbH <info@indiscale.com> @@ -21,10 +21,10 @@ """ Test the caosdb.cached module """ -from caosdb.cached import (cached_get_entity_by, cache_clear, cache_info, cache_fill, +from linkahead.cached import (cached_get_entity_by, cache_clear, cache_info, cache_fill, AccessType, cache_initialize, cached_query) from unittest.mock import patch -import caosdb as db +import linkahead as db from copy import deepcopy import pytest diff --git a/unittests/test_concrete_property.py b/unittests/test_concrete_property.py index 0e5c28534c7ac404b829df575225f42e908adb01..e70668f02aab12762a342f035a974f708652ae69 100644 --- a/unittests/test_concrete_property.py +++ b/unittests/test_concrete_property.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -24,9 +24,9 @@ """Tests for the _ConcreteProperty class.""" -from caosdb import configure_connection -from caosdb.common.models import _ConcreteProperty -from caosdb.connection.mockup import MockUpServerConnection +from linkahead import configure_connection +from linkahead.common.models import _ConcreteProperty +from linkahead.connection.mockup import MockUpServerConnection # pylint: disable=missing-docstring from nose.tools import assert_equal as eq from nose.tools import assert_is_not_none as there diff --git a/unittests/test_configuration.py b/unittests/test_configuration.py index b135e7cd65b11be7cb6c4ef2237a41a6639ccbb7..6ef147a85d25d0ead19b15060b4d27122461d1a4 100644 --- a/unittests/test_configuration.py +++ b/unittests/test_configuration.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -23,7 +23,7 @@ # import pytest -import caosdb as db +import linkahead as db from os import environ, getcwd, remove from os.path import expanduser, isfile, join from pytest import raises diff --git a/unittests/test_connection.py b/unittests/test_connection.py index 6cc23d87c5cdcf639709a444849a856a8c70af5f..a31ca6268fba1bdfa1b7b349aeff88d3fbca88de 100644 --- a/unittests/test_connection.py +++ b/unittests/test_connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -28,16 +28,16 @@ from __future__ import print_function, unicode_literals import re from builtins import bytes, str # pylint: disable=redefined-builtin -from caosdb import execute_query -from caosdb.configuration import _reset_config, get_config -from caosdb.connection.authentication.interface import CredentialsAuthenticator -from caosdb.connection.connection import (CaosDBServerConnection, +from linkahead import execute_query +from linkahead.configuration import _reset_config, get_config +from linkahead.connection.authentication.interface import CredentialsAuthenticator +from linkahead.connection.connection import (CaosDBServerConnection, _DefaultCaosDBServerConnection, configure_connection) -from caosdb.connection.mockup import (MockUpResponse, MockUpServerConnection, +from linkahead.connection.mockup import (MockUpResponse, MockUpServerConnection, _request_log_message) -from caosdb.connection.utils import make_uri_path, quote, urlencode -from caosdb.exceptions import (ConfigurationError, LoginFailedError, +from linkahead.connection.utils import make_uri_path, quote, urlencode +from linkahead.exceptions import (ConfigurationError, LoginFailedError, CaosDBConnectionError) from nose.tools import assert_equal as eq from nose.tools import assert_false as falz diff --git a/unittests/test_connection_utils.py b/unittests/test_connection_utils.py index 3890ae05cfe38b78a5ba0829753420246bdb560d..e07eab4251c5be3764a9e46cc27b1c09d96cd5cc 100644 --- a/unittests/test_connection_utils.py +++ b/unittests/test_connection_utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -28,16 +28,16 @@ from pytest import raises from nose.tools import (assert_equal as eq, assert_raises as raiz, assert_true as tru, assert_is_not_none as there, assert_false as falz) -from caosdb.exceptions import ConfigurationError, LoginFailedError -from caosdb.connection.utils import parse_auth_token, auth_token_to_cookie -from caosdb.connection.connection import ( +from linkahead.exceptions import ConfigurationError, LoginFailedError +from linkahead.connection.utils import parse_auth_token, auth_token_to_cookie +from linkahead.connection.connection import ( configure_connection, CaosDBServerConnection, _DefaultCaosDBServerConnection) -from caosdb.connection.mockup import (MockUpServerConnection, MockUpResponse, +from linkahead.connection.mockup import (MockUpServerConnection, MockUpResponse, _request_log_message) -from caosdb.configuration import get_config, _reset_config -from caosdb.connection.authentication.interface import CredentialsAuthenticator -from caosdb import execute_query +from linkahead.configuration import get_config, _reset_config +from linkahead.connection.authentication.interface import CredentialsAuthenticator +from linkahead import execute_query def setup_module(): diff --git a/unittests/test_container.py b/unittests/test_container.py index 0ac4be44826825aa3302119c8bca08f335ab68d3..113dd6223a9a8cd246b3b2998faa586fbae3da11 100644 --- a/unittests/test_container.py +++ b/unittests/test_container.py @@ -2,7 +2,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -25,7 +25,7 @@ """Tests for the Container class.""" from __future__ import absolute_import -import caosdb as db +import linkahead as db def test_get_property_values(): diff --git a/unittests/test_datatype.py b/unittests/test_datatype.py index 9b3c6267fb018e2cd3085dea568d7396c4549ac8..5a5e82cc5bfba9ac46a91b4baf4fe45665049c84 100644 --- a/unittests/test_datatype.py +++ b/unittests/test_datatype.py @@ -1,5 +1,5 @@ # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (c) 2020 IndiScale GmbH # Copyright (c) 2020 Daniel Hornung (d.hornung@indiscale.com) @@ -19,9 +19,9 @@ # # ** end header from pytest import raises -import caosdb as db -from caosdb.common import datatype -from caosdb.common.models import _parse_value +import linkahead as db +from linkahead.common import datatype +from linkahead.common.models import _parse_value def test_list(): diff --git a/unittests/test_entity.py b/unittests/test_entity.py index f2891fda266e1d62139b4cb2667c31b090ca6498..f91613a0386da73ca816db5f6511e90de44bd993 100644 --- a/unittests/test_entity.py +++ b/unittests/test_entity.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -27,9 +27,9 @@ import unittest from lxml import etree import os -from caosdb import (INTEGER, Entity, Property, Record, RecordType, +from linkahead import (INTEGER, Entity, Property, Record, RecordType, configure_connection) -from caosdb.connection.mockup import MockUpServerConnection +from linkahead.connection.mockup import MockUpServerConnection UNITTESTDIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/unittests/test_error_handling.py b/unittests/test_error_handling.py index 7f974e7db826d093e335b250953658b08db062cd..590755b916dc587bc079449cac0c23dd7c1de7f1 100644 --- a/unittests/test_error_handling.py +++ b/unittests/test_error_handling.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Indiscale GmbH <info@indiscale.com> # Copyright (C) 2020 Florian Spreckelsen <f.spreckelsen@indiscale.com> @@ -26,9 +26,9 @@ be TransactionErrors at first which may have one or more level of children. """ -import caosdb as db -from caosdb.common.models import raise_errors -from caosdb.exceptions import (AuthorizationError, +import linkahead as db +from linkahead.common.models import raise_errors +from linkahead.exceptions import (AuthorizationError, EntityDoesNotExistError, EntityError, EntityHasNoDatatypeError, TransactionError, UniqueNamesError, diff --git a/unittests/test_file.py b/unittests/test_file.py index 3c80af7f362a7cdabe0a9ebc89cd2986d04fe242..dd974cb176ca69e2ffb065b5de185611e528e815 100644 --- a/unittests/test_file.py +++ b/unittests/test_file.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -22,8 +22,8 @@ # ** end header # """Tests for the File class.""" -from caosdb import File, Record, configure_connection -from caosdb.connection.mockup import MockUpServerConnection +from linkahead import File, Record, configure_connection +from linkahead.connection.mockup import MockUpServerConnection # pylint: disable=missing-docstring from nose.tools import assert_equal as eq from nose.tools import assert_is_not_none as there diff --git a/unittests/test_high_level_api.py b/unittests/test_high_level_api.py index a9e55c9c2a79f7ead8bbb3fb652c1b81427e69e9..69bb987937cc6a88d692f27d1b6e8ce4ad4d8efa 100644 --- a/unittests/test_high_level_api.py +++ b/unittests/test_high_level_api.py @@ -1,4 +1,4 @@ -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -23,19 +23,19 @@ # A. Schlemmer, 02/2022 -import caosdb as db -from caosdb.high_level_api import (convert_to_entity, convert_to_python_object, +import linkahead as db +from linkahead.high_level_api import (convert_to_entity, convert_to_python_object, new_high_level_entity) -from caosdb.high_level_api import (CaosDBPythonUnresolvedParent, +from linkahead.high_level_api import (CaosDBPythonUnresolvedParent, CaosDBPythonUnresolvedReference, CaosDBPythonRecord, CaosDBPythonFile, high_level_type_for_standard_type, standard_type_for_high_level_type, high_level_type_for_role, CaosDBPythonEntity) -from caosdb.apiutils import compare_entities +from linkahead.apiutils import compare_entities -from caosdb.common.datatype import (is_list_datatype, +from linkahead.common.datatype import (is_list_datatype, get_list_datatype, is_reference) diff --git a/unittests/test_issues.py b/unittests/test_issues.py index 2c45a6d77ba61c3f948e403f708994c0fe31481a..158e561776ac29a728a3060484dc93d4aa96f514 100644 --- a/unittests/test_issues.py +++ b/unittests/test_issues.py @@ -1,4 +1,4 @@ -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (c) 2022 IndiScale GmbH # Copyright (c) 2022 Daniel Hornung (d.hornung@indiscale.com) @@ -22,7 +22,7 @@ import os import lxml -import caosdb as db +import linkahead as db from pytest import raises diff --git a/unittests/test_message.py b/unittests/test_message.py index 5e1003056c1b606a004b63bb7618e5e0474952bc..7c18095b9fa530c4a7f59709ffecf5b0e32d8f7e 100644 --- a/unittests/test_message.py +++ b/unittests/test_message.py @@ -1,7 +1,7 @@ # encoding: utf-8 # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -23,13 +23,13 @@ # # ** end header # -import caosdb as db +import linkahead as db from copy import deepcopy def test_messages_dict_behavior(): - from caosdb.common.models import Message - from caosdb.common.models import _Messages + from linkahead.common.models import Message + from linkahead.common.models import _Messages msgs = _Messages() diff --git a/unittests/test_plantuml.py b/unittests/test_plantuml.py index a507c36b2d3a4246205fc7507cb05119c575084c..4605ebcb24a785c4f176e9008c837177eac1e3cc 100644 --- a/unittests/test_plantuml.py +++ b/unittests/test_plantuml.py @@ -2,7 +2,7 @@ # encoding: utf-8 # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> # Copyright (C) 2022 Henrik tom Wörden <h.tomwoerden@indiscale.com> @@ -29,9 +29,9 @@ test plantuml utility import tempfile import pytest -import caosdb as db +import linkahead as db import shutil -from caosdb.utils.plantuml import to_graphics +from linkahead.utils.plantuml import to_graphics @pytest.fixture diff --git a/unittests/test_property.py b/unittests/test_property.py index 7c756117765e510587c00d818e39fb3945d44c53..6e92af097603ca63f0a1ac0f43cf61f8c153e644 100644 --- a/unittests/test_property.py +++ b/unittests/test_property.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -26,8 +26,8 @@ """Tests for the Property class.""" import os -import caosdb as db -from caosdb import Entity, Property, Record +import linkahead as db +from linkahead import Entity, Property, Record # pylint: disable=missing-docstring from lxml import etree diff --git a/unittests/test_query.py b/unittests/test_query.py index 12622ea486dda717ca1fbc1255510575c5e0c8e6..2c13f4b6488efacf32fc8c0afb8e26e29e0d7bc7 100644 --- a/unittests/test_query.py +++ b/unittests/test_query.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2021 Indiscale GmbH <info@indiscale.com> # Copyright (C) 2021 Timm Fitschen <f.fitschen@indiscale.com> @@ -22,7 +22,7 @@ # ** end header # from lxml import etree -import caosdb as db +import linkahead as db def test_query_parsing(): diff --git a/unittests/test_record.py b/unittests/test_record.py index c08a3eb1605d25ce4a9f142895e50647fe02cc3a..92c0f84a8115b1483b0f860a32009f775378a286 100644 --- a/unittests/test_record.py +++ b/unittests/test_record.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -26,7 +26,7 @@ # """Tests for the Record class.""" # pylint: disable=missing-docstring -from caosdb import Entity, Record, RecordType +from linkahead import Entity, Record, RecordType def test_is_entity(): diff --git a/unittests/test_record_type.py b/unittests/test_record_type.py index f31c56decfc394211940296babc83200a470cc8a..594f9c647997d68cccdcccc56eaab482cd694c74 100644 --- a/unittests/test_record_type.py +++ b/unittests/test_record_type.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -22,8 +22,8 @@ # ** end header # """Tests for the RecordType class.""" -from caosdb import Entity, RecordType, configure_connection -from caosdb.connection.mockup import MockUpServerConnection +from linkahead import Entity, RecordType, configure_connection +from linkahead.connection.mockup import MockUpServerConnection # pylint: disable=missing-docstring from nose.tools import assert_equal as eq from nose.tools import assert_is_not_none as there diff --git a/unittests/test_schema.py b/unittests/test_schema.py index fc3f63a4cbaeadcac3c1cb9be2d861a0688fe4b0..feb84e3b7cd2825ef50d712cfaf089b2c4905b35 100644 --- a/unittests/test_schema.py +++ b/unittests/test_schema.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> # Copyright (C) 2021 Alexander Schlemmer @@ -27,7 +27,7 @@ from jsonschema.exceptions import ValidationError from pytest import raises from glob import glob import os -from caosdb.configuration import config_to_yaml, validate_yaml_schema +from linkahead.configuration import config_to_yaml, validate_yaml_schema from configparser import ConfigParser diff --git a/unittests/test_server_side_scripting.py b/unittests/test_server_side_scripting.py index b699c4482d02972282167eb9683a956097ebc5e9..7749af982113c71be1717646e83813ee34c7cff0 100644 --- a/unittests/test_server_side_scripting.py +++ b/unittests/test_server_side_scripting.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -25,9 +25,9 @@ import json from urllib.parse import parse_qs from unittest.mock import Mock -from caosdb.utils import server_side_scripting as sss -from caosdb.connection.mockup import MockUpServerConnection, MockUpResponse -from caosdb import configure_connection +from linkahead.utils import server_side_scripting as sss +from linkahead.connection.mockup import MockUpServerConnection, MockUpResponse +from linkahead import configure_connection _REMOVE_FILES_AFTERWARDS = [] diff --git a/unittests/test_state.py b/unittests/test_state.py index 202c7a02af3db28434406626e5164def46febed7..d2bb08b791e3fc087b6078855667c4b5b3354024 100644 --- a/unittests/test_state.py +++ b/unittests/test_state.py @@ -1,7 +1,7 @@ import pytest -import caosdb as db -from caosdb import State, Transition -from caosdb.common.models import parse_xml, ACL +import linkahead as db +from linkahead import State, Transition +from linkahead.common.models import parse_xml, ACL from lxml import etree diff --git a/unittests/test_utils.py b/unittests/test_utils.py index 42d18ba06eb7516bb318de54cb537f548cfe9081..cd91de597820aabc4b894bfd0972490c1b4e2212 100644 --- a/unittests/test_utils.py +++ b/unittests/test_utils.py @@ -1,7 +1,7 @@ # coding: utf-8 # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2018 Research Group Biomedical Physics, # Max-Planck-Institute for Dynamics and Self-Organization Göttingen @@ -24,7 +24,7 @@ """Tests for caosdb.common.utils.""" from __future__ import unicode_literals from lxml.etree import Element -from caosdb.common.utils import xml2str +from linkahead.common.utils import xml2str def test_xml2str(): diff --git a/unittests/test_versioning.py b/unittests/test_versioning.py index 5047069ca17b573b8b54dcaab984419083d06859..2862d9026f93881b552a4b32525142cd107cc434 100644 --- a/unittests/test_versioning.py +++ b/unittests/test_versioning.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # ** header v3.0 -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> # Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -23,9 +23,9 @@ # from __future__ import absolute_import -from caosdb import Record -from caosdb.common.utils import xml2str -from caosdb.common.versioning import Version +from linkahead import Record +from linkahead.common.utils import xml2str +from linkahead.common.versioning import Version from .test_property import testrecord from lxml import etree diff --git a/unittests/test_yamlapi.py b/unittests/test_yamlapi.py index cdb1e0499890ee58d10ff7f102632e104ef60868..0b0aca47c009a6a2166b9c2dbeefbc168e71ad42 100644 --- a/unittests/test_yamlapi.py +++ b/unittests/test_yamlapi.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2021 Alexander Kreft <akreft@trineo.org> @@ -22,7 +22,7 @@ import os import warnings import tempfile -from caosdb.yamlapi import (append_sublist, kv_to_xml, +from linkahead.yamlapi import (append_sublist, kv_to_xml, dict_to_xml, yaml_to_xml, process, yaml_file_to_xml)