Skip to content

Commit

Permalink
metrics: removed old imports and use absolute imports
Browse files Browse the repository at this point in the history
  • Loading branch information
yashlamba committed Sep 14, 2023
1 parent 88cb9f5 commit fa8b1e3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions site/zenodo_rdm/metrics/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

"""ZenodoRDM Metrics API."""

from __future__ import absolute_import

import calendar
from datetime import datetime, timedelta

Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion site/zenodo_rdm/metrics/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion site/zenodo_rdm/metrics/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from flask import current_app

from . import config
from zenodo_rdm.metrics import config


class ZenodoMetrics(object):
Expand Down
2 changes: 1 addition & 1 deletion site/zenodo_rdm/metrics/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from celery import shared_task

from . import utils
from zenodo_rdm.metrics import utils


@shared_task(ignore_result=True)
Expand Down
2 changes: 1 addition & 1 deletion site/zenodo_rdm/metrics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
4 changes: 2 additions & 2 deletions site/zenodo_rdm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fa8b1e3

Please sign in to comment.