diff --git a/src/caoscrawler/converters.py b/src/caoscrawler/converters.py index dddb83a7c57d90a987de74f337668f3bae73ee1b..772f690b2ce7f8a3822d0d833f13c84cdd9d5e35 100644 --- a/src/caoscrawler/converters.py +++ b/src/caoscrawler/converters.py @@ -36,7 +36,7 @@ from inspect import signature from string import Template from typing import Any, List, Optional, Tuple, Union -import caosdb as db +import linkahead as db import pandas as pd import yaml import yaml_header_tools diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index e0bddb57a987e38b0e4b782d399bc94cb4a84eae..698a154f49d84e15dbe41f91da67469184151316 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -207,14 +207,13 @@ def _treat_merge_error_of(newrecord, record): # TODO can we also compare lists? and not isinstance(this_p.value, list) and not isinstance(that_p.value, list)): - logger.error("The Crawler is trying to merge two entities " - "because they should be the same object (same" - " identifiables), but they have " - "different values for the same Property." - f"Problematic Property: {this_p.name}\n" - f"Values: {this_p.value} and " - f"{that_p.value}\n" - f"{record}\n{newrecord}") + logger.error( + "The Crawler is trying to merge two entities because they should be the same " + "object (same identifiables), but they have different values for the same " + "Property.\n" + f"Problematic Property: {this_p.name}\n" + f"Values: {this_p.value} and {that_p.value}\n" + f"{record}\n{newrecord}") raise RuntimeError("Cannot merge Entities") @@ -1149,7 +1148,7 @@ class Crawler(object): """ if crawled_data is None: warnings.warn(DeprecationWarning( - "Calling synchronize without the data to be synchronized is depricated. Please " + "Calling synchronize without the data to be synchronized is deprecated. Please " "use for example the Scanner to create this data.")) crawled_data = self.crawled_data diff --git a/src/caoscrawler/hdf5_converter.py b/src/caoscrawler/hdf5_converter.py index 506c7b3942cc2518ffa47762c4bed742b9f09b83..5b1ff5775fb74919c989507c449636fd822db7f0 100644 --- a/src/caoscrawler/hdf5_converter.py +++ b/src/caoscrawler/hdf5_converter.py @@ -30,7 +30,7 @@ import numpy as np from typing import Union -import caosdb as db +import linkahead as db from .converters import (convert_basic_element, Converter, DictElementConverter, match_name_and_value, SimpleFileConverter) diff --git a/src/caoscrawler/identifiable.py b/src/caoscrawler/identifiable.py index 75af5be8f06a6ab95a4b7f2b92eda8cf3e321a1b..cefdf4a0f42b1f610e0712fdefebc2dc3b78d69f 100644 --- a/src/caoscrawler/identifiable.py +++ b/src/caoscrawler/identifiable.py @@ -20,7 +20,7 @@ # from __future__ import annotations -import caosdb as db +import linkahead as db from datetime import datetime import json from hashlib import sha256 diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index d661b97a6ef158bf05b66ac79cf0520921abef0a..da31fa3979113d2a610bee400eb3bef183230957 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -84,13 +84,13 @@ class IdentifiableAdapter(metaclass=ABCMeta): Some terms: -- Registered identifiable is the definition of an identifiable which is: +- *Registered identifiable* is defined as an identifiable with: - A record type as the parent - A list of properties - A list of referenced by statements -- Identifiable is the concrete identifiable, e.g. the Record based on +- *Identifiable* is the concrete identifiable, e.g. the Record based on the registered identifiable with all the values filled in. -- Identified record is the result of retrieving a record based on the +- *Identified record* is the result of retrieving a record based on the identifiable from the database. General question to clarify: diff --git a/src/caoscrawler/scanner.py b/src/caoscrawler/scanner.py index c4a8063cae5e74222e92f28a3898656bf4a97f6a..5d92401a50d3e4aa9cc258e792be41df18ef3976 100644 --- a/src/caoscrawler/scanner.py +++ b/src/caoscrawler/scanner.py @@ -39,7 +39,7 @@ import warnings from collections.abc import Callable from typing import Any, Optional, Type, Union -import caosdb as db +import linkahead as db import yaml from importlib_resources import files from jsonschema import validate diff --git a/src/caoscrawler/utils.py b/src/caoscrawler/utils.py index 61b363099d0892b74e91f257bccb6cc832c3d59f..c62f44eeaa75ca42579aa3d6ead437e901cd38ff 100644 --- a/src/caoscrawler/utils.py +++ b/src/caoscrawler/utils.py @@ -25,7 +25,7 @@ # Some utility functions, e.g. for extending pylib. -import caosdb as db +import linkahead as db def has_parent(entity: db.Entity, name: str): diff --git a/unittests/test_crawler.py b/unittests/test_crawler.py index 26aa9e73c42e4d3923d01d83a47c8dfa7007f0a6..14185d4564344b0052f9e41e7cc9b65997fcca8e 100644 --- a/unittests/test_crawler.py +++ b/unittests/test_crawler.py @@ -51,9 +51,9 @@ from caoscrawler.scanner import (create_converter_registry, scan_directory, from caoscrawler.stores import GeneralStore, RecordStore from caoscrawler.structure_elements import (DictElement, DictListElement, DictTextElement, File) -from caosdb.apiutils import compare_entities -from caosdb.cached import cache_clear -from caosdb.exceptions import EmptyUniqueQueryError +from linkahead.apiutils import compare_entities +from linkahead.cached import cache_clear +from linkahead.exceptions import EmptyUniqueQueryError from pytest import raises UNITTESTDIR = Path(__file__).parent