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

Refactor prod validators to be split into individual validators #10415

Open
ankita240796 opened this issue Aug 22, 2020 · 46 comments
Open

Refactor prod validators to be split into individual validators #10415

ankita240796 opened this issue Aug 22, 2020 · 46 comments

Comments

@ankita240796
Copy link
Contributor

@ankita240796 ankita240796 commented Aug 22, 2020

Refactor prod_validators.py such that there is one validator module per model module in core/storage/.

List of model categories

TODO

  • exploration
  • feedback
  • subtopic

In progress

Done

Steps to refactor

  • Extract all the validators related to a given model type for example activity into a new file named as <model-type>_validators.py for example activity_validators.py from prod_validators.py. Make sure you name the validators file exactly as <folder-name-in-above-list>_validators.py
  • Extract all the test related to the model type from prod_validators_test.py to <model-type>_validators_test.py.
  • Clean up the unused imports from the new validators file and existing prod validators file.
  • Clean up the unused variables from the new validators file and existing prod validators file.
  • Fix the file overview to have the correct explanation and copyright year.

Example PR: #10416 #10360

@ankita240796
Copy link
Contributor Author

@ankita240796 ankita240796 commented Aug 22, 2020

@vojtechjelinek PTAL to confirm if this looks fine, Thanks!

ankita240796 added a commit that referenced this issue Aug 24, 2020
* Refactor activity validators

* Fix import

* Fix import

* Address review comments

* Fix braces
@DubeySandeep
Copy link
Member

@DubeySandeep DubeySandeep commented Sep 19, 2020

Assigning @savithakj to the opportunity module. (As per offline discussion.)

@vojtechjelinek vojtechjelinek added this to To do in Data handling Sep 23, 2020
seanlip pushed a commit that referenced this issue Sep 26, 2020
* refractored oppportunity validators

* fixed linter error

* refractored oppportunity validators

* fixed linter error

* removed collection_models

* reverting local linter error based changes

* reverted local linter error changes
@rlhouser
Copy link
Contributor

@rlhouser rlhouser commented Sep 30, 2020

I would like to try to work on the classifier model; thanks. @ankita240796, @DubeySandeep

@vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek commented Sep 30, 2020

@rlhouser I have assigned you

@sunny1401
Copy link
Contributor

@sunny1401 sunny1401 commented Sep 30, 2020

I would like to try to work on the recommendations model. Thanks @ankita240796 @DubeySandeep

@vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek commented Oct 1, 2020

@sunny1401 I have assigned you.

@vcamari2-bit
Copy link

@vcamari2-bit vcamari2-bit commented Oct 1, 2020

Can I try to work on audit?

@EricZLou
Copy link
Contributor

@EricZLou EricZLou commented Oct 1, 2020

@sf11047 absolutely! Assigned the task to you. Let us know if you have any questions!

@EricZLou
Copy link
Contributor

@EricZLou EricZLou commented Oct 1, 2020

@vcamari2-bit sorry! Audit just got assigned -- do you want to take a stab at one of the other modules?

@vcamari2-bit
Copy link

@vcamari2-bit vcamari2-bit commented Oct 1, 2020

Sure. How about config or email?

@dchen97
Copy link
Contributor

@dchen97 dchen97 commented Oct 1, 2020

@vcamari2-bit - Go for config!

@shujingl-2020
Copy link

@shujingl-2020 shujingl-2020 commented Oct 1, 2020

Hi! I would like to work on the job module! As a part of GHC OSD

@EricZLou
Copy link
Contributor

@EricZLou EricZLou commented Oct 1, 2020

@shujingl-2020 awesome! Assigning you to the job module. DM me with questions!

@pseyla
Copy link

@pseyla pseyla commented Oct 1, 2020

Hi! Could I work on the email module?

@EricZLou
Copy link
Contributor

@EricZLou EricZLou commented Oct 1, 2020

@pseyla absolutely!

@Salset
Copy link

@Salset Salset commented Oct 1, 2020

Hey, can I work on the exploration module as part of GHC OSD?

@kiranmayee-dobbali
Copy link

@kiranmayee-dobbali kiranmayee-dobbali commented Oct 1, 2020

Hey, Can I get feedback module? I am a part of GHC OSD.

@ajin46
Copy link

@ajin46 ajin46 commented Oct 1, 2020

Hi, can I work on Suggestion as a part of GHC OSD?

@EricZLou
Copy link
Contributor

@EricZLou EricZLou commented Oct 1, 2020

@Salset @kiranmayee-dobbali @ajin46 yes yes and yes! Let us know if you have any questions

vcamari2-bit added a commit to vcamari2-bit/oppia that referenced this issue Oct 1, 2020
Overview

    This PR fixes or fixes part of oppia#10415.
    This PR does the following: Refactors config classifier validator to a separate file.
vcamari2-bit added a commit to vcamari2-bit/oppia that referenced this issue Oct 1, 2020
Overview

    This PR fixes or fixes part of oppia#10415.
    This PR does the following: Refactors config classifier validator to a separate file.
@jian-en jian-en mentioned this issue Oct 21, 2020
4 of 4 tasks complete
@JoelWee
Copy link

@JoelWee JoelWee commented Oct 23, 2020

Hi @vojtechjelinek, could I pick up "Question" validators? :)

JoelWee added a commit to JoelWee/oppia that referenced this issue Oct 23, 2020
JoelWee added a commit to JoelWee/oppia that referenced this issue Oct 23, 2020
@vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek commented Oct 23, 2020

@JoelWee I have assigned you

@iramin
Copy link
Collaborator

@iramin iramin commented Nov 1, 2020

Hi @vojtechjelinek
I would like to work on the config validator.

vojtechjelinek pushed a commit that referenced this issue Nov 5, 2020
vojtechjelinek pushed a commit that referenced this issue Nov 6, 2020
kevintab95 pushed a commit that referenced this issue Nov 9, 2020
* Extract validators for audit models to new module

* Fix lint errors: unused imports and EOL whitespace

* Put floating parameter inside function call

Co-authored-by: Sandeep Dubey <dubeysandeep.in@gmail.com>

* Remove unused constant

* Format to span fewer lines

Co-authored-by: Sandeep Dubey <dubeysandeep.in@gmail.com>

* Update accidentally reverted code

* Undo accidental reverts & remove unused constant

* Undo accidental reversion missed on first pass

* Fix typo and add json.dumps missed on first pass

* Fix lint errors

* Fix merge error: add changes from #10981

* Unpack tuple correctly

Co-authored-by: Vojtěch Jelínek <vojtin.j@gmail.com>

* Match tuple unpacking notation in similar modules

Co-authored-by: Vojtěch Jelínek <vojtin.j@gmail.com>

Co-authored-by: Sandeep Dubey <dubeysandeep.in@gmail.com>
Co-authored-by: Vojtěch Jelínek <vojtin.j@gmail.com>
@MahmoudAmmar-96
Copy link

@MahmoudAmmar-96 MahmoudAmmar-96 commented Nov 10, 2020

Hi @vojtechjelinek. Could I work on the suggestion model?

@vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek commented Nov 10, 2020

@MahmoudAmmar-96 Yes, I have assigned you.

@nskirkey
Copy link

@nskirkey nskirkey commented Nov 16, 2020

Hi, @vojtechjelinek! I was hoping to be assigned the job models.

@vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek commented Nov 16, 2020

@nskirkey I have assigned you.

@vojtechjelinek
Copy link
Member

@vojtechjelinek vojtechjelinek commented Nov 16, 2020

@nskirkey Btw, you will need to follow these instructions in order to contribute to Oppia https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia please go throught them.

vojtechjelinek pushed a commit that referenced this issue Nov 16, 2020
kevintab95 pushed a commit that referenced this issue Nov 17, 2020
* validators: Refactor topic and subtopic validators into individual validators

* validators: Refactor topic and resolve backend test coverage

* validators: Remove recommendations validator from topic validators file

* validators: Remove unused variable

* validators: Fix docstring naming and update copyright date

* validators: Define model vars in alphabetical order

* validators: Include topic test changes from #10981

* Fix topic validators

* Fix backend tests

* Fix tests

Co-authored-by: Matt Higgins <matt@matthiggins.dev>
Co-authored-by: Vojtěch Jelínek <vojtin.j@gmail.com>
gp201 added a commit to gp201/oppia that referenced this issue Nov 17, 2020
Fixes part of oppia#10415: Topic validator refractor  (oppia#10967)
@DubeySandeep
Copy link
Member

@DubeySandeep DubeySandeep commented Nov 19, 2020

Assigning @mozammel to the question part of this issue. (As per offline discussion.)

kevintab95 pushed a commit that referenced this issue Nov 20, 2020
* Refactor classifier validators

* Refactor classifier validators

* Refactor classifier validators

* refactor classifier validators

* refactor classifier validators

* Refactor classifier validators

Co-authored-by: Rebekah Houser <rlhouser@Rebekahs-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Data handling
  
TODO (for new contributors)
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.