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

Full coverage for CODEOWNERS in the codebase. #6616

Merged
merged 21 commits into from
May 16, 2019

Conversation

DubeySandeep
Copy link
Contributor

@DubeySandeep DubeySandeep commented Apr 17, 2019

This PR adds code owners to all possible files in the codebase.
Current status:

  • Full coverage, all the files which are tracked by git.
  • Update the lint test for the new behavior.

@DubeySandeep DubeySandeep requested a review from seanlip as a code owner April 17, 2019 00:21
/core/storage/question/ @aks681
/core/templates/dev/head/domain/question/ @aks681
/core/templates/dev/head/pages/question_editor/ @aks681
/core/templates/dev/head/pages/questions_list/ @aks681

# Practice session project.
/core/templates/dev/head/pages/practice_session/ @aks681
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this to be a part of the new structure project.

Copy link
Member

@seanlip seanlip Apr 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps @vinitamurthi should be co-codeowner? Comes under questions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, FYI - I am also adding /core/templates/dev/head/pages/question_player/ in #6620

# Skill project.
/core/controllers/concept_card_viewer*.py @aks681
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aks681 I'm not sure where to place this (As this is also used in the exploration) so can you confirm that we can place this over here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's fine to place it here.

/core/templates/dev/head/domain/topics_and_skills_dashboard/ @aks681
/core/templates/dev/head/pages/topics_and_skills_dashboard/ @aks681


# Infrastructure.
/core/controllers/cron*.py @seanlip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanlip, should I create a different section for corn, jobs and task or we can place this over here (inside Infrastructure)? &

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think infrastructure is fine.

@codecov-io
Copy link

codecov-io commented Apr 17, 2019

Codecov Report

Merging #6616 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6616   +/-   ##
========================================
  Coverage    93.95%   93.95%           
========================================
  Files          356      356           
  Lines        52462    52462           
  Branches       893      893           
========================================
  Hits         49290    49290           
  Misses        3172     3172

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0300b9d...b59ecce. Read the comment docs.

@DubeySandeep
Copy link
Contributor Author

DubeySandeep commented Apr 17, 2019

@seanlip & @YashJipkate, is there any specific reason for excluding all the files in the root directory from the codeowner tests? (I'm following CODEOWNERS warning message for assigning codeowners to the remaining files.)

/scripts/ @apb7


# Exploration project.
/core/controllers/editor*.py @DubeySandeep
/core/controllers/reader*.py @aks681
/core/controllers/resources*.py @seanlip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vojtechjelinek can take this one, I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@seanlip
Copy link
Member

seanlip commented Apr 17, 2019

@seanlip & @YashJipkate, is there any specific reason for excluding all the files in the root directory from the codeowner tests? (I'm following CODEOWNERS warning message for assigning codeowners to the remaining files.)

This sounds like an error; we should extend the tests to those files too.

@apb7
Copy link
Contributor

apb7 commented Apr 19, 2019

Hi @DubeySandeep, please bring your PR branch up-to-date with develop. Thanks!

@DubeySandeep DubeySandeep changed the title [WIP] Full coverage for CODEOWNERS in the codebase. Full coverage for CODEOWNERS in the codebase. Apr 23, 2019
@DubeySandeep DubeySandeep requested a review from apb7 as a code owner April 24, 2019 04:18
/.gitignore @apb7
/.isort.cfg @apb7
/.pylintrc @apb7
/.stylelintrc @apb7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apb7, why do we have two .stylelintrc files? is there any specific reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apb7, can you please check this one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we had a discussion on this some time back, @DubeySandeep. We have two stylelintrc files -- one for oppia.css and other for css within html files. The two config files use different pre-processors and therefore, are not the same and one cannot be used for the other. Thanks!

/core/templates/dev/head/pages/footer_js_libs.html @vojtechjelinek
/core/templates/dev/head/pages/header_css_libs.html @vojtechjelinek
/core/templates/dev/head/pages/header_js_libs.html @vojtechjelinek
/gulpfile.js @vojtechjelinek
/jinja_utils*.py @vojtechjelinek
/Makefile @vojtechjelinek
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vojtechjelinek, is there any need of this file? (Introduced at #5659)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I was just playing with it and accidentaly commited the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed this file!

@DubeySandeep
Copy link
Contributor Author

@YashJipkate, Can you please help to review the test pre_commit_linter test file?

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally speaking this LGTM and I think 8-10 secs is OK. Thanks @DubeySandeep!


Args:
root: str. The path from where the function should start walking.
exclude_dirs: list(str). A list of dir path which should to be ignored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop "to"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

exclude_dirs: list(str). A list of dir path which should to be ignored.

Yields:
str. list(str). A list of unignored files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str or list(str)? Pick one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(str). Fixed.

Yields:
str. list(str). A list of unignored files.
"""
dirs, nondirs = [], []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does nondirs mean filepaths? If so perhaps that would be a better name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

"""
command = ['git', 'check-ignore', '-q', path_to_check]

# The "git check-ignore <path>" command use to return 0 when the path is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use to return --> returns

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

print ('WARNING! %s/%s is not covered under '
'CODEOWNERS' % (root, file_name))
break
if not match and self.verbose_mode_enabled:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If verbose mode is not enabled, we still need to show the viewer which file failed, right? Shouldn't that be stored in a summary message somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I've done my whole testing in --verbose mode, Fixed!

Copy link
Contributor

@YashJipkate YashJipkate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @DubeySandeep just some doubts. PTAL!

.gitignore Show resolved Hide resolved
scripts/pre_commit_linter.py Show resolved Hide resolved
@DubeySandeep
Copy link
Contributor Author

@apb7, Can you please review this PR as a code owner?

@DubeySandeep
Copy link
Contributor Author

@apb7 & @YashJipkate PTAL!

@oppiabot
Copy link

oppiabot bot commented Apr 29, 2019

Hi @DubeySandeep. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

@YashJipkate
Copy link
Contributor

@DubeySandeep Sorry for the delay; I have addressed the comments. PTAL!
Thanks

Copy link
Contributor

@YashJipkate YashJipkate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM!
Thanks @DubeySandeep

@DubeySandeep
Copy link
Contributor Author

@apb7, can you please review this PR?

@DubeySandeep DubeySandeep assigned apb7 and unassigned seanlip and YashJipkate May 5, 2019
@DubeySandeep
Copy link
Contributor Author

Hi @apb7, PTAL!

@DubeySandeep
Copy link
Contributor Author

@apb7, can we merge this PR?

"""
command = ['git', 'check-ignore', '-q', path_to_check]

# The "git check-ignore <path>" command use to returns 0 when the path is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please re-phrase this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll surely do it. Also, it would be great if you can provide some suggestion on what I should add or a pattern in which I can re-phrase this comment! :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something on these grounds:
The "git check-ignore <path>" command returns 0 when the path is ignored otherwise it returns 1. subprocess.call then returns this returncode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

@apb7 apb7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just one comment above. Thanks, @DubeySandeep!

/core/templates/dev/head/domain/question/ @aks681
/core/templates/dev/head/pages/practice_session/ @vinitamurthi
/core/templates/dev/head/pages/question_editor/ @aks681
/core/templates/dev/head/pages/questions_list/ @aks681

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add question_player in this with me as the code owner? It was added in #6620

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising this @vinitamurthi, I think within last 28 days we have added many new files so I'll add all those files/folders before merging this PR! (otherwise, the lint test will start failing on develop.)

Currently, I've added a label PR: don't merge - HAS MERGE CONFLICTS to avoid merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@DubeySandeep DubeySandeep merged commit 3d2a7fa into oppia:develop May 16, 2019
NishealJ pushed a commit to NishealJ/oppia that referenced this pull request May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants