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 21 commits
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
33 changes: 14 additions & 19 deletions core/controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,23 @@

EDUCATION_BLOG_POST_CONTENT = """
<p>
Education is a constantly evolving landscape, and innovation lies at its core.
This summer, Oppia had the privilege of hosting a group of exceptional minds
through the prestigious Google Summer of Code (GSoC) program. These talented
Education is a constantly evolving landscape, and innovation lies at its core.
This summer, Oppia had the privilege of hosting a group of exceptional minds
through the prestigious Google Summer of Code (GSoC) program. These talented
individuals embarked on a journey to transform learning, one code at a time.
</p>\n
<p>
You should check out main
<oppia-noninteractive-link
text-with-value=\"&amp;quot;website.&amp;quot;\"
You should check out main
<oppia-noninteractive-link
text-with-value=\"&amp;quot;website.&amp;quot;\"
url-with-value=\"&amp;quot;https://www.oppia.org&amp;quot;\">
</oppia-noninteractive-link><br>\n&nbsp;
</p>\n\n
<p>Introduction to Oppia - Youtube Video</p>
<oppia-noninteractive-video
autoplay-with-value=\"false\"
end-with-value=\"0\"
start-with-value=\"0\"
<oppia-noninteractive-video
autoplay-with-value=\"false\"
end-with-value=\"0\"
start-with-value=\"0\"
video_id-with-value=\"&amp;quot;Wmvt-HH5-dI&amp;quot;\">
</oppia-noninteractive-video>
"""
Expand Down Expand Up @@ -155,7 +155,7 @@
'category': 'Algorithms',
'author_notes': '',
'blurb': '',
'states_schema_version': 55,
'states_schema_version': 56,
'init_state_name': 'Introduction',
'language_code': 'en',
'objective': 'Learn the exploration',
Expand Down Expand Up @@ -191,11 +191,6 @@
},
'classifier_model_id': None,
'linked_skill_id': None,
'recorded_voiceovers': {
'voiceovers_mapping': {
'content_0': {}
}
},
'solicit_answer_details': False,
'card_is_checkpoint': True,
}
Expand Down Expand Up @@ -431,7 +426,7 @@ def post(self) -> None:
Exception. The num_dummy_exps_to_publish must be provided when
the action is generate_dummy_explorations.
Exception. The num_dummy_translation_opportunities_to_generate
must be provided when the action is
must be provided when the action is
generate_dummy_translation_opportunities.
InvalidInputException. Generate count cannot be less than publish
count.
Expand All @@ -450,7 +445,7 @@ def post(self) -> None:
InvalidInputException. The input provided is not valid.
Exception. The skill_id must be provided when
the action is generate_dummy_question_suggestions.
Exception. The num_dummy_question_suggestions_generate must be
Exception. The num_dummy_question_suggestions_generate must be
provided when the action is generate_dummy_question_suggestions.
"""
assert self.user_id is not None
Expand Down Expand Up @@ -1120,7 +1115,7 @@ def _generate_dummy_translation_opportunities(
'User does not have enough rights to generate data.')
logging.info(
'[ADMIN] %s generated %s number of dummy '
'translation opportunities (explorations)' %
'translation opportunities (explorations)' %
(self.user_id, num_dummy_translation_opportunities_to_generate)
)

Expand Down
3 changes: 1 addition & 2 deletions core/controllers/creator_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,7 @@ def post(self) -> None:
new_exploration_id = exp_fetchers.get_new_exploration_id()
if constants.ALLOW_YAML_FILE_UPLOAD:
exp_services.save_new_exploration_from_yaml_and_assets(
self.user_id, yaml_content, new_exploration_id, [],
strip_voiceovers=True)
self.user_id, yaml_content, new_exploration_id, [])
self.render_json({
EXPLORATION_ID_KEY: new_exploration_id
})
Expand Down
17 changes: 0 additions & 17 deletions core/controllers/domain_objects_validator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@ def test_valid_object_raises_no_exception(self) -> None:
'hints': []
},
'linked_skill_id': None,
'recorded_voiceovers': {
'voiceovers_mapping': {
'content_0': {},
'default_outcome_1': {},
'ca_placeholder_2': {}
}
},
'classifier_model_id': None,
'card_is_checkpoint': False,
'solicit_answer_details': False
Expand Down Expand Up @@ -485,16 +478,6 @@ def test_valid_object_raises_no_exception(self) -> None:
'solution': None
},
'param_changes': [],
'recorded_voiceovers': {
'voiceovers_mapping': {
'content_0': {},
'default_outcome_1': {},
'ca_choices_2': {},
'ca_choices_3': {},
'feedback_4': {},
'feedback_5': {}
}
},
'solicit_answer_details': False,
'card_is_checkpoint': False
}
Expand Down
10 changes: 1 addition & 9 deletions core/controllers/suggestion_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ def test_raises_exception_if_target_exploration_image_is_not_in_target_explorati
self.assertIn(
'An image in the submitted translation\'s original content '
'named "img.png" cannot be found. Please save it to the '
'backend file system at /exploration/%s/assets/image/ '
'backend file system at /exploration/%s/assets/image/ '
'before submitting this translation again.' % exp_id,
response_dict['error']
)
Expand Down Expand Up @@ -2374,14 +2374,6 @@ def test_accept_question_suggestion_with_image_region_interactions(
'id': 'ImageClickInput', 'solution': None
},
'param_changes': [],
'recorded_voiceovers': {
'voiceovers_mapping': {
'content_0': {},
'default_outcome_1': {},
'feedback_2': {},
'hint_3': {}
}
},
'solicit_answer_details': False,
'card_is_checkpoint': False
}
Expand Down
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
Loading
Loading