Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove voiceover from exp schema #20675

Draft
wants to merge 39 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f003882
Adds conversions function for exploration migration.
Nik-09 Apr 19, 2024
71a0266
Removes recorded voiceover fields from exploration states backend
Nik-09 Apr 22, 2024
d000747
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Jun 8, 2024
68b14ad
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Jun 9, 2024
a930682
Fixes merge conflict
Nik-09 Jul 8, 2024
17f95f4
Removed recorded voiceover from exploration
Nik-09 Jul 9, 2024
d9e5a91
Removes feature flag
Nik-09 Jul 9, 2024
2214f8b
Removes voice artist models and UI
Nik-09 Jul 10, 2024
7f21430
Removes audio translation service files and uses.
Nik-09 Jul 14, 2024
d62e948
Fixes merge conflict
Nik-09 Jul 15, 2024
e7a8ac4
Fixes backend tests
Nik-09 Jul 15, 2024
16eacbc
Fixes backend tests
Nik-09 Jul 15, 2024
9fb7eca
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Jul 16, 2024
49380f3
Fixes frontend tests
Nik-09 Jul 21, 2024
439c490
Fixes merge conflict and frontend test
Nik-09 Jul 29, 2024
79c333b
Fixes frontend tests
Nik-09 Jul 29, 2024
7de0993
Fixes frontend tests
Nik-09 Aug 1, 2024
a348168
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Aug 1, 2024
827700f
Fixes lint issues
Nik-09 Aug 1, 2024
789cb77
Fixes lint issues
Nik-09 Aug 3, 2024
7519f17
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Aug 3, 2024
77ce7d1
Fixes merge conflict
Nik-09 Aug 7, 2024
23661e3
Fixes typescript checks
Nik-09 Aug 8, 2024
ff67301
Fixes merge conflict
Nik-09 Aug 18, 2024
4acb589
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Sep 4, 2024
8072d16
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Sep 21, 2024
3ea710d
Fixes frontend tests
Nik-09 Sep 23, 2024
a06d486
Fixes merge conflicts
Nik-09 Sep 30, 2024
c8a2218
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Oct 7, 2024
7f34239
Fixes merge conflict
Nik-09 Oct 30, 2024
11942df
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Nov 2, 2024
e89e16c
Fixes frontend tests
Nik-09 Nov 7, 2024
a8ab730
Fixes merge conflict
Nik-09 Nov 11, 2024
fc155ba
Reverts unnecessary changes.
Nik-09 Nov 24, 2024
bd34115
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Nov 24, 2024
95d39fa
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Dec 1, 2024
c49c609
Fixes backend and lint checks
Nik-09 Dec 1, 2024
a87e250
Fixes merge conflict
Nik-09 Dec 10, 2024
446684c
Merge branch 'develop' into remove_voiceover_from_exp_schema
seanlip Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removes voice artist models and UI
  • Loading branch information
Nik-09 committed Jul 10, 2024
commit 2214f8b78abaa99916d5ce76bac5a0ddf2480022
108 changes: 0 additions & 108 deletions core/controllers/voiceover.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,114 +112,6 @@ def put(self) -> None:
self.render_json(self.values)


class PutVoiceArtistMetadataHandlerNormalizedPayloadDict(TypedDict):
"""Dict representation of VoiceArtistMetadataHandler's normalized_payload
dictionary.
"""

voice_artist_id: str
language_code: str
language_accent_code: str


class VoiceArtistMetadataHandler(
base.BaseHandler[
PutVoiceArtistMetadataHandlerNormalizedPayloadDict,
Dict[str, str]
]
):
"""Handler class to manage voice artist data for the voiceover admin page.
"""

GET_HANDLER_ERROR_RETURN_TYPE = feconf.HANDLER_TYPE_JSON
URL_PATH_ARGS_SCHEMAS: Dict[str, str] = {}
HANDLER_ARGS_SCHEMAS = {
'GET': {},
'PUT': {
'voice_artist_id': {
'schema': {
'type': 'basestring'
}
},
'language_code': {
'schema': {
'type': 'basestring'
}
},
'language_accent_code': {
'schema': {
'type': 'basestring'
}
}
}
}

@acl_decorators.can_access_voiceover_admin_page
def get(self) -> None:
"""Retrieves voice artist data for the voiceover admin page."""
voice_artist_id_to_language_mapping = (
voiceover_services.get_all_voice_artist_language_accent_mapping())
voice_artist_id_to_voice_artist_name = (
voiceover_services.get_voice_artist_ids_to_voice_artist_names())

self.values.update({
'voice_artist_id_to_language_mapping':
voice_artist_id_to_language_mapping,
'voice_artist_id_to_voice_artist_name':
voice_artist_id_to_voice_artist_name
})
self.render_json(self.values)

@acl_decorators.can_access_voiceover_admin_page
def put(self) -> None:
"""Updates voice artist data from the voiceover admin page."""
assert self.normalized_payload is not None
voice_artist_id = self.normalized_payload['voice_artist_id']
language_code = self.normalized_payload['language_code']
language_accent_code = self.normalized_payload['language_accent_code']

voiceover_services.update_voice_artist_language_mapping(
voice_artist_id, language_code, language_accent_code)
self.render_json(self.values)


class GetSampleVoiceoversForGivenVoiceArtistHandler(
base.BaseHandler[Dict[str, str], Dict[str, str]]
):
"""Handler class to get sample contributed voiceovers of a voice artist in
a given language.
"""

GET_HANDLER_ERROR_RETURN_TYPE = feconf.HANDLER_TYPE_JSON
URL_PATH_ARGS_SCHEMAS = {
'voice_artist_id': {
'schema': {
'type': 'basestring'
}
},
'language_code': {
'schema': {
'type': 'basestring'
}
}
}
HANDLER_ARGS_SCHEMAS: Dict[str, Dict[str, str]] = {'GET': {}}

@acl_decorators.can_access_voiceover_admin_page
def get(self, voice_artist_id: str, language_code: str) -> None:
exploration_id_to_filenames = (
voiceover_services.get_voiceover_filenames(
voice_artist_id=voice_artist_id,
language_code=language_code
)
)

self.values.update({
'exploration_id_to_filenames': exploration_id_to_filenames,
})
self.render_json(self.values)


class EntityVoiceoversBulkHandler(
base.BaseHandler[Dict[str, str], Dict[str, str]]
):
Expand Down
3 changes: 0 additions & 3 deletions core/domain/exp_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,9 +2039,6 @@ def compute_models_to_put_when_saving_new_exp_version(
)
)

voiceover_services.update_exploration_voice_artist_link_model(
committer_id, change_list, old_exploration, updated_exploration)

new_content_id_set = set(updated_exploration.get_translatable_content_ids())
content_ids_corresponding_translations_to_remove = (
old_content_id_set - new_content_id_set
Expand Down
6 changes: 0 additions & 6 deletions core/domain/takeout_service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ def set_up_non_trivial(self) -> None:
20) Creates new BlogPostModel and BlogPostRightsModel.
21) Creates a TranslationContributionStatsModel.
22) Creates new LearnerGroupModel and LearnerGroupsUserModel.
23) Creates a VoiceArtistMetadataModel.
"""
# Setup for UserStatsModel.
user_models.UserStatsModel(
Expand Down Expand Up @@ -973,11 +972,6 @@ def set_up_non_trivial(self) -> None:
'en': 'en-US',
'hi': 'hi-IN'
}
# Setup for VoiceArtistMetadataModel.
voiceover_models.VoiceArtistMetadataModel.create_model(
voice_artist_id=self.USER_ID_1,
language_code_to_accent=language_code_to_accent
)

# Set-up for AppFeedbackReportModel scrubbed by user.
report_id = '%s.%s.%s' % (
Expand Down
Loading