From 643998fcfa9b5e88d24c3227ad6baa160005726f Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Fri, 10 May 2024 19:47:04 +0530 Subject: [PATCH] onboarding_steps: Rename 'hotspots' files to 'onboarding_steps'. --- zerver/actions/{hotspots.py => onboarding_steps.py} | 2 +- zerver/lib/create_user.py | 2 +- zerver/lib/events.py | 2 +- zerver/lib/{hotspots.py => onboarding_steps.py} | 0 zerver/tests/test_events.py | 2 +- zerver/tests/{test_hotspots.py => test_onboarding_steps.py} | 4 ++-- zerver/views/{hotspots.py => onboarding_steps.py} | 4 ++-- zproject/urls.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename zerver/actions/{hotspots.py => onboarding_steps.py} (86%) rename zerver/lib/{hotspots.py => onboarding_steps.py} (100%) rename zerver/tests/{test_hotspots.py => test_onboarding_steps.py} (94%) rename zerver/views/{hotspots.py => onboarding_steps.py} (85%) diff --git a/zerver/actions/hotspots.py b/zerver/actions/onboarding_steps.py similarity index 86% rename from zerver/actions/hotspots.py rename to zerver/actions/onboarding_steps.py index 52095d6157..ce2ebba0b1 100644 --- a/zerver/actions/hotspots.py +++ b/zerver/actions/onboarding_steps.py @@ -1,4 +1,4 @@ -from zerver.lib.hotspots import get_next_onboarding_steps +from zerver.lib.onboarding_steps import get_next_onboarding_steps from zerver.models import OnboardingStep, UserProfile from zerver.tornado.django_api import send_event diff --git a/zerver/lib/create_user.py b/zerver/lib/create_user.py index 70f1b6b725..e92c50a216 100644 --- a/zerver/lib/create_user.py +++ b/zerver/lib/create_user.py @@ -6,8 +6,8 @@ import orjson from django.contrib.auth.models import UserManager from django.utils.timezone import now as timezone_now -from zerver.lib.hotspots import copy_onboarding_steps from zerver.lib.i18n import get_default_language_for_new_user +from zerver.lib.onboarding_steps import copy_onboarding_steps from zerver.lib.timezone import canonicalize_timezone from zerver.lib.upload import copy_avatar from zerver.models import ( diff --git a/zerver/lib/events.py b/zerver/lib/events.py index b47c4e73bb..5e3345a0e8 100644 --- a/zerver/lib/events.py +++ b/zerver/lib/events.py @@ -20,7 +20,6 @@ from zerver.lib.compatibility import is_outdated_server from zerver.lib.default_streams import get_default_streams_for_realm_as_dicts from zerver.lib.exceptions import JsonableError from zerver.lib.external_accounts import get_default_external_accounts -from zerver.lib.hotspots import get_next_onboarding_steps from zerver.lib.integrations import ( EMBEDDED_BOTS, WEBHOOK_INTEGRATIONS, @@ -40,6 +39,7 @@ from zerver.lib.message import ( from zerver.lib.muted_users import get_user_mutes from zerver.lib.narrow_helpers import NarrowTerm, read_stop_words from zerver.lib.narrow_predicate import check_narrow_for_events +from zerver.lib.onboarding_steps import get_next_onboarding_steps from zerver.lib.presence import get_presence_for_user, get_presences_for_realm from zerver.lib.realm_icon import realm_icon_url from zerver.lib.realm_logo import get_realm_logo_source, get_realm_logo_url diff --git a/zerver/lib/hotspots.py b/zerver/lib/onboarding_steps.py similarity index 100% rename from zerver/lib/hotspots.py rename to zerver/lib/onboarding_steps.py diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index 250cf7e2f5..5987475f93 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -43,7 +43,6 @@ from zerver.actions.default_streams import ( do_remove_streams_from_default_stream_group, lookup_default_stream_groups, ) -from zerver.actions.hotspots import do_mark_onboarding_step_as_read from zerver.actions.invites import ( do_create_multiuse_invite_link, do_invite_users, @@ -54,6 +53,7 @@ from zerver.actions.message_delete import do_delete_messages from zerver.actions.message_edit import do_update_embedded_data, do_update_message from zerver.actions.message_flags import do_update_message_flags from zerver.actions.muted_users import do_mute_user, do_unmute_user +from zerver.actions.onboarding_steps import do_mark_onboarding_step_as_read from zerver.actions.presence import do_update_user_presence from zerver.actions.reactions import do_add_reaction, do_remove_reaction from zerver.actions.realm_domains import ( diff --git a/zerver/tests/test_hotspots.py b/zerver/tests/test_onboarding_steps.py similarity index 94% rename from zerver/tests/test_hotspots.py rename to zerver/tests/test_onboarding_steps.py index 2ad8c1ba3c..2d025d5c23 100644 --- a/zerver/tests/test_hotspots.py +++ b/zerver/tests/test_onboarding_steps.py @@ -1,8 +1,8 @@ from typing_extensions import override from zerver.actions.create_user import do_create_user -from zerver.actions.hotspots import do_mark_onboarding_step_as_read -from zerver.lib.hotspots import ONE_TIME_NOTICES, get_next_onboarding_steps +from zerver.actions.onboarding_steps import do_mark_onboarding_step_as_read +from zerver.lib.onboarding_steps import ONE_TIME_NOTICES, get_next_onboarding_steps from zerver.lib.test_classes import ZulipTestCase from zerver.models import OnboardingStep from zerver.models.realms import get_realm diff --git a/zerver/views/hotspots.py b/zerver/views/onboarding_steps.py similarity index 85% rename from zerver/views/hotspots.py rename to zerver/views/onboarding_steps.py index 9cafd56dfe..e00bf74a38 100644 --- a/zerver/views/hotspots.py +++ b/zerver/views/onboarding_steps.py @@ -1,10 +1,10 @@ from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ -from zerver.actions.hotspots import do_mark_onboarding_step_as_read +from zerver.actions.onboarding_steps import do_mark_onboarding_step_as_read from zerver.decorator import human_users_only from zerver.lib.exceptions import JsonableError -from zerver.lib.hotspots import ALL_ONBOARDING_STEPS +from zerver.lib.onboarding_steps import ALL_ONBOARDING_STEPS from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.models import UserProfile diff --git a/zproject/urls.py b/zproject/urls.py index a6edb14eb6..d49fc506ab 100644 --- a/zproject/urls.py +++ b/zproject/urls.py @@ -62,7 +62,6 @@ from zerver.views.email_mirror import email_mirror_message from zerver.views.events_register import events_register_backend from zerver.views.health import health from zerver.views.home import accounts_accept_terms, desktop_home, home -from zerver.views.hotspots import mark_onboarding_step_as_read from zerver.views.invite import ( generate_multiuse_invite_backend, get_user_invites, @@ -87,6 +86,7 @@ from zerver.views.message_flags import ( ) from zerver.views.message_send import render_message_backend, send_message_backend, zcommand_backend from zerver.views.muted_users import mute_user, unmute_user +from zerver.views.onboarding_steps import mark_onboarding_step_as_read from zerver.views.presence import ( get_presence_backend, get_statuses_for_realm,