oppia: Implement missing domain objects with full `validate()` function.
Please note that for any model picked up, first describe in a comment what will be the domain object properties and what validation checks will be put in place and only after that is approved, the model can be assigned to you. Please avoid adding any code here to explain the checks. It is difficult to review that. So, stick to describing the checks as you would do in a design doc.
Additionally, please note that you will need to ensure that, after your refactor, none of the instances of the corresponding storage model should be used in the rest of the codebase, except for the get/save methods that convert a datastore model to a domain object and vice versa. All other usages besides those two methods should be of the domain object. (See ExplorationModel and the Exploration domain object for an example.)
Implement missing domain objects for the following storage models with full validate() function:
- AnswerSubmittedEventLogEntryModel
- BlogPostReadEventLogEntryModel
- BlogPostViewedEventLogEntryModel
- BlogPostExitedEventLogEntryModel
- BulkEmailModel
- CollectionCommitLogEntryModel
- CollectionProgressModel
- CollectionRightsModel
- CollectionRightsSnapshotMetadataModel
- CollectionSnapshotContentModel
- CollectionSnapshotMetadataModel
- CompleteExplorationEventLogEntryModel
- CsrfSecretModel
- DeletedUserModel
- DeletedUsernameModel
- ExplorationActualStartEventLogEntryModel
- ExplorationAnnotationsModel
- ExplorationContextModel
- ExplorationIssuesModel
- ExplorationRecommendationsModel: @aasmaa11
- ExplorationRightsModel: @Somnath-Mishra
- ExplorationRightsSnapshotMetadataModel
- ExplorationSnapshotMetadataModel
- ExplorationStatsTaskEntryModel
- ExplorationUserDataModel
- ExplorationVoiceArtistsLinkModel
- FirebaseSeedModel
- JobModel
- LearnerGoalsModel
- LearnerGroupsUserModel
- LearnerPlaylistModel
- LeaveForRefresherExplorationEventLogEntryModel
- MaybeLeaveExplorationEventLogEntryModel
- PinnedOpportunityModel
- PlatformParameterSnapshotMetadataModel
- PlaythroughModel
- PseudonymizedUserModel
- QuestionCommitLogEntryModel
- QuestionSnapshotMetadataModel
- RateExplorationEventLogEntryModel
- RoleQueryAuditModel
- SentEmailModel
- SkillCommitLogEntryModel
- SkillSnapshotMetadataModel
- SolutionHitEventLogEntryModel
- StartExplorationEventLogEntryModel
- StateCompleteEventLogEntryModel
- StateCounterModel
- StateHitEventLogEntryModel
- StoryCommitLogEntryModel
- StoryProgressModel
- StorySnapshotMetadataModel
- SubtopicPageCommitLogEntryModel
- SubtopicPageSnapshotMetadataModel
- TopicCommitLogEntryModel
- TopicRightsSnapshotMetadataModel
- TopicSimilaritiesModel
- TopicSnapshotMetadataModel
- TranslationCoordinatorsModel
- UnsentFeedbackEmailModel
- UserBulkEmailsModel
- UserEmailPreferencesModel
- UserIdByFirebaseAuthIdModel
- UserIdentifiersModel
- UsernameChangeAuditModel
- UserRecentChangesBatchModel
- UserStatsModel
- UserSubscribersModel
- UserSubscriptionsModel @FCancella
- VoiceArtistMetadataModel
- VoiceoverAutogenerationPolicyModel: @aasmaa11
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 94 (49 by maintainers)
Thanks @Ashu463, I will take a look and add comments on the doc in a couple hours.
Thanks @Ashu463, all that sounds great, feel free to let me know if you need any help. You do not have to worry about polishing the doc, just having a list of what checks exist in the codebase is good enough to determine the next steps.
No worries at all, I found it only when I went through your comment and started digging deeper. I don’t expect you to know the entire codebase but just develop to skill to go through it and find required learnings which you are doing well!
I think that makes sense. I have assigned this model to you, thanks!
Thank you so much @ankita240796 This opportunity means a lot to me. I’ll begin making the changes asap and will update you once I make progress.
All, just a note: @ankita240796 is away this week. She will be back next week and I think she will look at your comments then.
I don’t currently have the bandwidth to go through all the suggestions in detail, but here are a few quick observations in case you want to edit your comments before she gets back:
@in it” or “it has an HTML tag in it”. Think about what exactly what makes an email or HTML string valid. Your validity check should be such that anything that passes that check is valid, and anything that doesn’t pass it is not valid.