Skip to content

Commit

Permalink
fix es6 with MC help, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Aug 29, 2024
1 parent d55eefa commit 6862bdb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def _test_speedups_disable(request, settings, _test_speedups):
@pytest.fixture(scope='session')
def setup_connections():
connections.create_connection(hosts=['http://localhost:9201'])
connections.create_connection(hosts=['http://127.0.0.1:9201'])
connections.create_connection(hosts=['http://192.168.168.167:9201'])


Expand Down
4 changes: 2 additions & 2 deletions osf/metrics/reporters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .preprint_count import PreprintCountReporter
from .user_count import UserCountReporter
from .spam_count import SpamCountReporter
from .institutional_users import InstitutionalUsersReporter
from .institutional_users import InstitutionalUserReporter


class AllDailyReporters(enum.Enum):
Expand All @@ -27,4 +27,4 @@ class AllDailyReporters(enum.Enum):

class AllMonthlyReporters(enum.Enum):
SPAM_COUNT = SpamCountReporter
INSTITUTION_USERS = InstitutionalUsersReporter
INSTITUTION_USERS = InstitutionalUserReporter
7 changes: 3 additions & 4 deletions osf/metrics/reporters/institutional_users.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import datetime
from django.contrib.contenttypes.models import ContentType

from osf import models as osfdb
from osf.metrics.reports import InstitutionalUsersReport
from osf.metrics.reports import InstitutionalUserReport
from osf.metrics.utils import YearMonth
from website import settings as website_settings
from api.caching.utils import storage_usage_cache
Expand All @@ -11,7 +10,7 @@
from ._base import MonthlyReporter


class InstitutionalUsersReporter(MonthlyReporter):
class InstitutionalUserReporter(MonthlyReporter):
def report(self, yearmonth: YearMonth):
before_datetime = yearmonth.next_month()
institutions = osfdb.Institution.objects.all()
Expand All @@ -24,7 +23,7 @@ def report(self, yearmonth: YearMonth):

def generate_report(self, institution, user, yearmonth, before_datetime):
affiliation = user.get_institution_affiliation(institution._id)
report = InstitutionalUsersReport(
report = InstitutionalUserReport(
report_yearmonth=yearmonth,
institution_id=institution._id,
user_id=user._id,
Expand Down
2 changes: 1 addition & 1 deletion osf/metrics/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ class InstitutionalUserReport(MonthlyReport):
storage_byte_count = metrics.Integer()
month_last_login = YearmonthField()
account_creation_date = YearmonthField()
orcid_id = metrics.Keyword()
orcid_id = metrics.Keyword()

0 comments on commit 6862bdb

Please sign in to comment.