Open hardikkat24 opened 3 years ago
Can I try to fix this?
Can I try to fix this?
@Siddhant-K-code Sorry for delayed response. Actually no one was assigned to this issue earlier. If you are still interested to work on it, can you pick one task (checkbox) and I will assign it to you. (I have also updated the issue description, so kindly go through that once more to understand the task). Thanks!
Hi @sajalasati, thanks for proposing this as a good first issue. I am removing the label for now and looping in @vojtechjelinek to approve the label. It will be added back if approved. Thanks!
Assigned myself to keep track of the progress made on this issue.
@sajalasati If the first Opia checkbox isn't claimed by anyone, I would like to work on it.
@aasiffaizal I have assigned you.
@sajalasati Could i work on the second check box (i.e oppia.core)
@sajalasati Could i work on the second check box (i.e oppia.core)
@KartikKapil I've assigned you :)
Yes, I would like to work on this, I can work on whole files ( except 1st and 2nd {already Assigned } ). Please Assign me, @sajalasati
Yes, I would like to work on this, I can work on whole files ( except 1st and 2nd {already Assigned } ). Please Assign me, @sajalasati
@Siddhant-K-code There are approx 280+ files remaining, and if you cover it in a single PR it will become very large and will take long time to review. I would advice taking individual checkboxes for now, or I am even fine if you want to pick one entire folder at a time like oppia.core.controllers
(which has 5 parts/checkboxes) or oppia.core.domain
(10 parts). Let me know, and I will assign you. (I can assign you more in future as you start making PRs)
Ok, I will start with 3rd. !
Ok, I will start with 3rd. !
@Siddhant-K-code Assigned you to 3rd checkbox - oppia.core.controllers
. Do Let us know if you have any questions!
@sajalasati i have a query, while making the doc string if a fuction returns a list which contains a model should i write it returns a list or should i also write what the returning model does ?
@sajalasati i have a query, while making the doc string if a fuction returns a list which contains a model should i write it returns a list or should i also write what the returning model does ?
@KartikKapil You can look at other examples in the file to get an idea - generally we write it in the docstring as Returns: list(<data_type>)
(link) where data type could also be the name of a model.
@sajalasati Thank you
@sajalasati could i ping you gitter? Regarding this issue
@sajalasati could i ping you gitter? Regarding this issue
@KartikKapil I am not sure if I can be available much on gitter. You can use this thread to ask all your doubts without any worry, and we will try to clear them or guide you to proper resources/wiki pages (it will only help future contributors working on this issue to get things cleared early on). If you have setup related questions you can use oppia-chat on gitter. We encourage usage of public chats more than DMs :)
@sajalasati i have edited all the three files , i have a few worries in oppia.core.platform_feature_list_test.py file there are functions that have no arguments or return value , should i leave those function as it is ?
@sajalasati i have edited all the three files , i have a few worries in oppia.core.platform_feature_list_test.py file there are functions that have no arguments or return value , should i leave those function as it is ?
@KartikKapil Thanks for checking!
You should include Args
in the docstring if the function has any parameters, include Returns
in the docstring if it has a return statement, else you don't need to make any changes. You can also look at the description comment for the lint check for which we are fixing all these files if you want.
Also just an advice - if you have doubts for specific files/functions, you should either provide a link to (a few of) those while asking question so that we can understand what the case is. It's also fine to create a PR with those modifications if you feel confident about it (reviewer will correct you then), or leave a comment in PR for specific places you are doubtful about.
@sajalasati Sure i would do that , thank you so much for helping me here .
@sajalasati Please review #12250
@sajalasati i could not pass some of these linter checks because they ask a new line above the Args arugument and when i give that it gives a critical error that first line cannot be empty how do i fix that kindly help ? thanks in advance , here is the screenshot of my terminal .
@KartikKapil This might happen if you don't start with a description and straightaway start with Args. Try adding a description then blank line, then Args and so on.
@sajalasati @arpit1912 I would like to work on this. Can you please assign the 4th checkbox to me (oppia.core.controllers
: PART 2) Thanks!!
@sajalasati @hardikkat24 i have managed to debug most of the error could you help me with this last one i could not really understand it. Thanks again
@KartikKapil You might have added get-pip.py file to get pip installed on your system. Please delete that file or move it to some other directory. This should solve the problem.
@hardikkat24 @sajalasati kindly reviw #12293
@Nisarg-Chaudhari I have assigned you.
@hardikkat24, Will you please assign me oppia.core.controllers : PART 4
?
Thanks
Also, I have one question, l was looking at the skill_editor.py
file and now I want to know the type of Args
.
class SkillDataHandler(base.BaseHandler):
"""A handler for accessing skills data."""
GET_HANDLER_ERROR_RETURN_TYPE = feconf.HANDLER_TYPE_JSON
@acl_decorators.open_access
def get(self, comma_separated_skill_ids):
"""Populates the data on skill pages of the skill ids."""
skill_ids = comma_separated_skill_ids.split(',')
try:
for skill_id in skill_ids:
skill_domain.Skill.require_valid_skill_id(skill_id)
except utils.ValidationError:
raise self.PageNotFoundException('Invalid skill id.')
try:
skills = skill_fetchers.get_multi_skills(skill_ids)
except Exception as e:
raise self.PageNotFoundException(e)
skill_dicts = [skill.to_dict() for skill in skills]
self.values.update({
'skills': skill_dicts
})
self.render_json(self.values)
Now for this function, if I want to know that where SkillDataHandler.get()
is being used in the frontend so that I can check the type of the Args
by console.log()
. I'm confused on how to figure out because git grep
is not much of a help here.
Also one more question, if I want to check Args
type for a test file, then how am I suppose to do that, I mean how to check which specific test will trigger that file?
Thanks
Hello @hardikkat24! A few tasks for you related to this issue:
I think we had a discussion earlier whether to enforce this lint check on test files or not, but it remained incomplete then. We need to be sure about that so ensure all files fixed in a PR and properly fixed at once.
Would you be able to create a small PR so that we can once verify the approach (and code) you used for finding the above list of files? The lint error log of that PR can serve as a checklist to ensure we are not missing any file for correction.
I think the best way ahead would be to create a small design doc for the change we want:
After that:
@hardikkat24 Would you be interested to complete this? If yes, then we should start working on it soon. Let me know where you need help. Thanks!
Thanks, @sajalasati.
@aasiffaizal @KartikKapil @Siddhant-K-code Since you have made your PRs, I will review them soon, and let you know if additional changes are required.
@Nisarg-Chaudhari @lkbhitesh07 Since you have not made a PR yet, I would suggest you to work on a different issue, as we realised about some of the requirements later, and it would hard (and time taking) to do a proper review and get it merged. Un-assigning you both for now. Extremely sorry for the inconvenience.
No problem at all @sajalasati, thanks for the updates.
@sajalasati No problem, Thanks for updating.
Hello @hardikkat24! A few tasks for you related to this issue:
I think we had a discussion earlier whether to enforce this lint check on test files or not, but it remained incomplete then. We need to be sure about that so ensure all files fixed in a PR and properly fixed at once.
Would you be able to create a small PR so that we can once verify the approach (and code) you used for finding the above list of files? The lint error log of that PR can serve as a checklist to ensure we are not missing any file for correction.
I think the best way ahead would be to create a small design doc for the change we want:
* Propose your solution for enforcing the lint check. * Show what kinds of lint errors you get in the codebase upon introducing it and get reviews from core maintainers on whether we should include lint check for test_files or not based on that. * Refine your approach if needed, get approval, create a PR and get the list of files to be fixed.
After that:
* Edit this issue (so that a contributor can make changes to linter for enabling those options, find and fix all lint errors in their assigned files, verify the file has been fixed, then undo the changes in linter). * Start assigning contributors to tasks again! Because only then we would be sure of the required fix that will enable us to introduce the lint check. (**Don't assign more contributors for now**)
@hardikkat24 Would you be interested to complete this? If yes, then we should start working on it soon. Let me know where you need help. Thanks!
@sajalasati I would love to do this. But I am currently working on my GSoC proposal and have 2 issues assigned. So sorry for this.
@sajalasati Could I work on controllers PART-2?
@sajalasati Could I work on controllers PART-2?
@nj1902 Sorry the issue description is a bit incomplete currently and I am not assigning anyone until it is complete. Could you please pick some other issue meanwhile? Thanks!
@sajalasati No problem, Thanks for updating.
@sajalasati @hardikkat24 My changes are merged #12287, can you update the description?
Also, please review #12250
@sajalasati @hardikkat24 My changes are merged #12287, can you update the description?
Done!
Also, please review #12250
@Siddhant-K-code Left a comment to resolve your query for fixing the lint errors. You need to make changes to fix those first before a review.
@sajalasati @hardikkat24, I don't think we need docstring for the test and setUp function in the _test.py file, can you please confirm and mention this very clearly in the issue description?
@DubeySandeep Done!
Can I try oppia.scripts : PART 1 ?
@seonwoo960000 Sorry, the issue description is not complete yet. We cannot assign you. Could you pick any other issue? Thanks!
@hardikkat24 Sure. Can I try [oppia.core.controllers : PART 2] then ?
@hardikkat24 Sure. Can I try [oppia.core.controllers : PART 2] then ?
For all the tasks we are working on completing the requirements for the issue, so that it's straightforward for contributors to solve it. Maybe you can take a look at other issues tagged with good-first-issue label.
@hardikkat24 Sure. Can I try [oppia.core.controllers : PART 2] then ?
For all the tasks we are working on completing the requirements for the issue, so that it's straightforward for contributors to solve it. Maybe you can take a look at other issues tagged with good-first-issue label.
Ok~ thanks !
Hi @oppia/core-maintainers, this issue is not assigned to any project. Can you please update the same? Thanks!
Aim/Problem: Improve the docstrings in all the python files in the codebase. This will also fulfill the prerequisite for the lint check
Check to enforce use of Args, Returns and Raises in the docstring.
to be introduced for #8423.Suggested fix: Do a
grep
or a search (CTRL+F) fordef
keyword in the file to get all the possible places (i.e functions and methods) that we would need to fix. Verify that the correct pattern for docstring (which includesArgs
,Return
, andRaises
if applicable as shown below) exists for all those functions/methods, and if it is not already present, then edit their doc string. An example of a good docstring is shown below:where,
Args
denotes all parameters with its type and details,Raises
denotes all the types of errors/exceptions that could be raised, andReturns
denotes the details about what a function returns.Important: Docstrings are not required for
test
andsetUp
functions in the test files(files that end with_test.py
).To be assigned one of the below tasks, leave a comment at-mentioning @SD-13 and specify which one you want to take up.
The list of files that need improvement (Please create a PR that fixes all the files assigned under one checkbox):