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 18, 2023
1 parent 9678d1b commit a34d576
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 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

0 comments on commit a34d576

Please sign in to comment.