diff --git a/site/zenodo_rdm/metrics/api.py b/site/zenodo_rdm/metrics/api.py index 7c2053621..cc5ba1cb2 100644 --- a/site/zenodo_rdm/metrics/api.py +++ b/site/zenodo_rdm/metrics/api.py @@ -7,8 +7,6 @@ """ZenodoRDM Metrics API.""" -from __future__ import absolute_import - import calendar from datetime import datetime, timedelta @@ -21,7 +19,7 @@ from invenio_search.utils import build_alias_name from opensearchpy import Search -from .proxies import current_metrics +from zenodo_rdm.metrics.proxies import current_metrics class ZenodoMetric(object): diff --git a/site/zenodo_rdm/metrics/config.py b/site/zenodo_rdm/metrics/config.py index 24cae4827..90a893296 100644 --- a/site/zenodo_rdm/metrics/config.py +++ b/site/zenodo_rdm/metrics/config.py @@ -9,7 +9,7 @@ import datetime -from .api import ZenodoMetric +from zenodo_rdm.metrics.api import ZenodoMetric METRICS_START_DATE = datetime.datetime(2021, 1, 1) METRICS_CACHE_TIMEOUT = int(datetime.timedelta(hours=1).total_seconds()) diff --git a/site/zenodo_rdm/metrics/ext.py b/site/zenodo_rdm/metrics/ext.py index 1caacc9e2..b38b922d5 100644 --- a/site/zenodo_rdm/metrics/ext.py +++ b/site/zenodo_rdm/metrics/ext.py @@ -9,7 +9,7 @@ from flask import current_app -from . import config +from zenodo_rdm.metrics import config class ZenodoMetrics(object): diff --git a/site/zenodo_rdm/metrics/tasks.py b/site/zenodo_rdm/metrics/tasks.py index 5b50726a6..6dca45f0d 100644 --- a/site/zenodo_rdm/metrics/tasks.py +++ b/site/zenodo_rdm/metrics/tasks.py @@ -9,7 +9,7 @@ from celery import shared_task -from . import utils +from zenodo_rdm.metrics import utils @shared_task(ignore_result=True) diff --git a/site/zenodo_rdm/metrics/views.py b/site/zenodo_rdm/metrics/views.py index cbb6555d9..11a2ea6e9 100644 --- a/site/zenodo_rdm/metrics/views.py +++ b/site/zenodo_rdm/metrics/views.py @@ -10,7 +10,7 @@ import humanize from flask import Blueprint, Response, current_app -from . import tasks, utils +from zenodo_rdm.metrics import tasks, utils blueprint = Blueprint("METRICS", __name__) diff --git a/site/zenodo_rdm/utils.py b/site/zenodo_rdm/utils.py index 6a94fca31..888a70dc8 100644 --- a/site/zenodo_rdm/utils.py +++ b/site/zenodo_rdm/utils.py @@ -7,12 +7,12 @@ """Utility functions.""" import re -import idutils from urllib.parse import parse_qs, urlencode, urlsplit, urlunsplit -from invenio_i18n import _ +import idutils from flask import current_app, url_for from invenio_app_rdm.records_ui.utils import dump_external_resource +from invenio_i18n import _ def github_link_render(record):