From d8ab799e6e89a04467a4823e09776d0de3ea4d1e Mon Sep 17 00:00:00 2001 From: Johannes Laurin Hoermann Date: Thu, 13 Jun 2024 15:02:07 +0200 Subject: [PATCH] DEP: switch from dtool_lookup_server to dservercore --- CHANGELOG.rst | 7 +++++++ dserver_retrieve_plugin_mongo/utils_retrieve.py | 4 ++-- tests/conftest.py | 4 ++-- tests/test_utils_retrieve_standalone.py | 8 ++++---- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 32314ed..4568dd7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,13 @@ CHANGELOG This project uses `semantic versioning `_. This change log uses principles from `keep a changelog `_. +[unreleased] + +Changed +^^^^^^^ + +- Changed dependency from ``dtool_lookup_server`` to ``dservercore``. + [0.3.0] ------- diff --git a/dserver_retrieve_plugin_mongo/utils_retrieve.py b/dserver_retrieve_plugin_mongo/utils_retrieve.py index 4bcb71f..3b94c4c 100644 --- a/dserver_retrieve_plugin_mongo/utils_retrieve.py +++ b/dserver_retrieve_plugin_mongo/utils_retrieve.py @@ -4,9 +4,9 @@ from pymongo import MongoClient -from dtool_lookup_server import RetrieveABC, ValidationError, UnknownURIError +from dservercore import RetrieveABC, ValidationError, UnknownURIError -from dtool_lookup_server.date_utils import ( +from dservercore.date_utils import ( extract_created_at_as_datetime, extract_frozen_at_as_datetime, ) diff --git a/tests/conftest.py b/tests/conftest.py index 9d26bbe..a436a43 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,8 +26,8 @@ def snowwhite_token(): def tmp_app_with_users(request): """Provide app with users""" from flask import current_app - from dtool_lookup_server import create_app, sql_db - from dtool_lookup_server.utils import ( + from dservercore import create_app, sql_db + from dservercore.utils import ( register_users, register_base_uri, register_permissions, diff --git a/tests/test_utils_retrieve_standalone.py b/tests/test_utils_retrieve_standalone.py index c50a348..410fa34 100644 --- a/tests/test_utils_retrieve_standalone.py +++ b/tests/test_utils_retrieve_standalone.py @@ -15,7 +15,7 @@ from dtoolcore import DataSetCreator, DataSet -from dtool_lookup_server.utils import generate_dataset_info +from dservercore.utils import generate_dataset_info # This tested in this module. from dserver_retrieve_plugin_mongo.utils_retrieve import MongoRetrieve @@ -88,13 +88,13 @@ class _MockApp(object): ############################################################################## def test_is_subclass_of_abc(): - from dtool_lookup_server import RetrieveABC + from dservercore import RetrieveABC assert issubclass(MongoRetrieve, RetrieveABC) def test_functional(tmp_mongo_db): # NOQA - from dtool_lookup_server import UnknownURIError + from dservercore import UnknownURIError ds_info = create_dataset_info( base_uri="s3://store", @@ -143,7 +143,7 @@ def test_functional(tmp_mongo_db): # NOQA def test_register_raises_when_metadata_too_large(tmp_mongo_db): # NOQA - from dtool_lookup_server import ValidationError + from dservercore import ValidationError readme_lines = ["---"] for i in range(100000):