Create an Extension that suggests reviewers

Review Request #10248 — Created Oct. 19, 2018 and discarded

Information

Review Board
master

Reviewers

This extension would suggest reviewers for a current review request. It keeps
track of all previous reviews and suggests a username of someone who has
reviewed something similar in the past. The extension uses an ML model called
kNN algorithm by calculating the distance between past reviews and the current
review request.

  • Ran the ML model with past reviews and compared suggested reviewers with the
    actual person that reviewed the change set using SuggestReviewersAccuracy.py.
  • Settled on the combination of weights, and which variables to include in the
    distance calculation based on the combination that gave the highest accuracy score.
    Please take a look at allresults.csv.
Description From Last Updated

Hey Praise! I looked at your code, and even after reading the Review Board documentation for extensions I still don't …

skaefer143skaefer143

E401 multiple imports on one line

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W601 .has_key() is deprecated, use 'in'

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

E501 line too long (94 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'django.contrib.auth.models.User' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'django.db.models' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'django.contrib.auth.models.User' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'django.db.models' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (102 > 79 characters)

reviewbotreviewbot

E501 line too long (117 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'django.contrib.auth.models.User' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

F401 'django.db.models' imported but unused

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'reviewboard.urls.diffviewer_url_names' imported but unused

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E302 expected 2 blank lines, found 0

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (110 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'reviewboard.urls.diffviewer_url_names' imported but unused

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E302 expected 2 blank lines, found 0

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (110 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (92 > 79 characters)

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'django.contrib.auth.models.User' imported but unused

reviewbotreviewbot

F401 'djblets.util.fields.JSONField' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.models.ReviewRequest' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.models.Review' imported but unused

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

E301 expected 1 blank line, found 0

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E225 missing whitespace around operator

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

F821 undefined name 'models'

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E501 line too long (110 > 79 characters)

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E703 statement ends with a semicolon

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E501 line too long (110 > 79 characters)

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (93 > 79 characters)

reviewbotreviewbot

E501 line too long (93 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

F821 undefined name 'calculateDistanceBetweenTwoDirs'

reviewbotreviewbot

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

F821 undefined name 'dist'

reviewbotreviewbot

F821 undefined name 'operator'

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E114 indentation is not a multiple of four (comment)

reviewbotreviewbot

E116 unexpected indentation (comment)

reviewbotreviewbot

F841 local variable 'review_request' is assigned to but never used

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E501 line too long (91 > 79 characters)

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E501 line too long (110 > 79 characters)

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (93 > 79 characters)

reviewbotreviewbot

E501 line too long (93 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

F821 undefined name 'calculateDistanceBetweenTwoDirs'

reviewbotreviewbot

E501 line too long (89 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

F821 undefined name 'dist'

reviewbotreviewbot

F821 undefined name 'operator'

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E501 line too long (91 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E501 line too long (108 > 79 characters)

reviewbotreviewbot

F401 'suggest_reviewers_extension.models.SuggestReviewers' imported but unused

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E501 line too long (110 > 79 characters)

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

F841 local variable 'filename1' is assigned to but never used

reviewbotreviewbot

F841 local variable 'filename2' is assigned to but never used

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (99 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (94 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E114 indentation is not a multiple of four (comment)

reviewbotreviewbot

E111 indentation is not a multiple of four

reviewbotreviewbot

E114 indentation is not a multiple of four (comment)

reviewbotreviewbot

E111 indentation is not a multiple of four

reviewbotreviewbot

E111 indentation is not a multiple of four

reviewbotreviewbot

E114 indentation is not a multiple of four (comment)

reviewbotreviewbot

E114 indentation is not a multiple of four (comment)

reviewbotreviewbot

E111 indentation is not a multiple of four

reviewbotreviewbot

E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

E501 line too long (85 > 79 characters)

reviewbotreviewbot

F401 'suggest_reviewers_extension.models.SuggestReviewers' imported but unused

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E501 line too long (104 > 79 characters)

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E501 line too long (84 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E113 unexpected indentation

reviewbotreviewbot

E501 line too long (90 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E113 unexpected indentation

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E501 line too long (90 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (99 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E113 unexpected indentation

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

E271 multiple spaces after keyword

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E114 indentation is not a multiple of four (comment)

reviewbotreviewbot

E116 unexpected indentation (comment)

reviewbotreviewbot

E501 line too long (99 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E401 multiple imports on one line

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E225 missing whitespace around operator

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E113 unexpected indentation

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (84 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

F841 local variable 'filename1' is assigned to but never used

reviewbotreviewbot

F841 local variable 'filename2' is assigned to but never used

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (99 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (94 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E301 expected 1 blank line, found 0

reviewbotreviewbot

E501 line too long (85 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E271 multiple spaces after keyword

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W503 line break before binary operator

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E271 multiple spaces after keyword

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W503 line break before binary operator

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E271 multiple spaces after keyword

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W503 line break before binary operator

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

You should add a trailing comma over here

bolariinwabolariinwa

E127 continuation line over-indented for visual indent

reviewbotreviewbot

F401 'pdb' imported but unused

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

You're creating a "Model" here, but that's not really what you want. Django models correspond to database tables, and you're …

daviddavid

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

You have some trailing whitespace over here

bolariinwabolariinwa

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E271 multiple spaces after keyword

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E303 too many blank lines (3)

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

W503 line break before binary operator

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

F401 'suggest_reviewers_extension.SuggestReviewersResource.suggestReviewersResource' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.resources.unregister_resource_for_model' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.resources.register_resource_for_model' imported but unused

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

Is it worth using a Counter here instead of a Dict? I don't know if this will actually boost performance …

gojeffchogojeffcho

I know that this is WIP so a lot of these comments could be self-notes so you can keep track …

gojeffchogojeffcho

Ditto some of your variable naming, some of them don't conform to standards and others are unclear/unspecific like download_dir being …

gojeffchogojeffcho

This seems to be hardcoded into a lot of these files - could it be centralized somewhere and retrieved instead …

gojeffchogojeffcho

I believe this docstring should end with a period, and the linebreaks look a bit off to me in the …

gojeffchogojeffcho

Is it worth checking that the files exist before this?

gojeffchogojeffcho

It seems like Counter could work well here as well.

gojeffchogojeffcho

Does an if not review_request.get_draft() fail here sometimes even when it's not None?

gojeffchogojeffcho

E902 IndentationError: unindent does not match any outer indentation level

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E999 IndentationError: unindent does not match any outer indentation level

reviewbotreviewbot

F401 'djblets.util.fields.JSONField' imported but unused

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

Col: 9 'self' is defined but never used.

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E304 blank lines found after function decorator

reviewbotreviewbot

E999 IndentationError: unexpected unindent

reviewbotreviewbot

E902 TokenError: EOF in multi-line statement

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

E131 continuation line unaligned for hanging indent

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E113 unexpected indentation

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E999 IndentationError: unexpected unindent

reviewbotreviewbot

E304 blank lines found after function decorator

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

F401 'reviewboard.extensions.base.JSExtension' imported but unused

reviewbotreviewbot

F821 undefined name 'SuggestReviewersJSExtension'

reviewbotreviewbot

F821 undefined name 'SuggestReviewersJSExtension'

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

F821 undefined name 'suggestReviewersResource'

reviewbotreviewbot

E999 IndentationError: unexpected unindent

reviewbotreviewbot

F821 undefined name 'suggest_reviewers_resource'

reviewbotreviewbot

E999 IndentationError: unexpected unindent

reviewbotreviewbot

Trailing whitespace here

bolariinwabolariinwa

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E301 expected 1 blank line, found 0

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E301 expected 1 blank line, found 0

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E301 expected 1 blank line, found 0

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

This file is not a model. I'm confused as to its location (and why an extension would have RB models?)

brenniebrennie

This is a class, which isn't intended to contain arbitrary code. In Java, everything must be contained in a class, …

brenniebrennie

This file is not a model. I'm confused as to its location (and why an extension would have RB models?)

brenniebrennie

This file is not a model. I'm confused as to its location (and why an extension would have RB models?)

brenniebrennie

Docstrings should be of the format: """Single line summary. Multi-line description. """

brenniebrennie

F401 'djblets.webapi.decorators.webapi_request_fields' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.decorators.webapi_login_required' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.decorators.webapi_check_local_site' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.resources.resources' imported but unused

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E305 expected 2 blank lines after class or function definition, found 1

reviewbotreviewbot

F401 'reviewboard.extensions.base.JSExtension' imported but unused

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E203 whitespace before ':'

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

Col: 53 Expected '!==' and instead saw '!='.

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E225 missing whitespace around operator

reviewbotreviewbot

E122 continuation line missing indentation or outdented

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

F401 'pdb' imported but unused

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E231 missing whitespace after ':'

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E226 missing whitespace around arithmetic operator

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E201 whitespace after '('

reviewbotreviewbot

E225 missing whitespace around operator

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E305 expected 2 blank lines after class or function definition, found 1

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Summary:

-[WIP]: Create a Suggestive reviewers Extension
+[WIP]: Create an Extension that suggests reviewers

Commit:

-b478a7e96d6671a30339967df067ed346cbd962d
+ad6cf8b15d96ba4b7cfec679342716996b883148

Diff:

Revision 11 (+475)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

skaefer143
  1. 
      
  2. Hey Praise! I looked at your code, and even after reading the Review Board documentation for extensions I still don't really know a lot about extensions. So I don't really have anything specific to comment on, but I did want to ask a question.

    Have you put thought into when the extension is going to run? Like, if it runs when you click on a Review Request, or something else? That could be a good place to start. Then you'd have some code that actually triggers your extension, and you can utilize the methods you wrote that calculate a suggested reviewer. Just some thoughts!

    1. Hey Storm! Thanks for the feedback. I have added the extension to the review request page. so when the model works, it will correctly show up on the review request page. Right now, I have a placeholder there with my username

  3. 
      
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
  1. 
      
  2. You're creating a "Model" here, but that's not really what you want. Django models correspond to database tables, and you're not storing things in the database. I think this can just be a normal class, and it probably would make sense to rename the file so as to not be confusing.

    1. thanks for pointing that out. i have changed it.

  3. 
      
bolariinwa
  1. 
      
  2. You should add a trailing comma over here

    1. thanks for picking that

  3. 
      
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
praiseA
gojeffcho
  1. 
      
  2. Is it worth using a Counter here instead of a Dict? I don't know if this will actually boost performance in a noticeable way, but I know I've used it in the past for this kind of purpose. It can turn your algorithm below for key reviewer into a single method call as well.

    1. hey Jeff,

      For this method, I need to count the reviews each different reviewer has done. So essentially it's a counter, but its for each reviewer. Does that make sense? or did I misunderstand your question?

  3. I know that this is WIP so a lot of these comments could be self-notes so you can keep track of what you're doing, but I definitely think the majority of your comments could be done away with when it comes out of WIP.

    1. thanks Jeff, I'll keep that in mind!

  4. Ditto some of your variable naming, some of them don't conform to standards and others are unclear/unspecific like download_dir being a filename, not a directory.

    1. you are right. I'll spend sometime going through my naming convention and make sure they are correct for Python. Thank you

  5. reviewboard/reviews/models/reviewers.py (Diff revision 21)
     
     

    This seems to be hardcoded into a lot of these files - could it be centralized somewhere and retrieved instead of defined in each one?

    1. reviewers.py was majorly my testing script, when I was playing around with models. I wouldn't be submitting that file. Also retrieveInformation.py was the script I wrote to extract the public reviews from review board for testing my ML model's accuracy as well. I wouldn't be submitting that in the final patch as well.

  6. I believe this docstring should end with a period, and the linebreaks look a bit off to me in the diff.

    1. I'll look into this! thanks

  7. Is it worth checking that the files exist before this?

    1. Yeah you are right. I will check if file1 and file2 are not None first. Its better to be safe than sorry right? lol

  8. It seems like Counter could work well here as well.

    1. hey, its the same as I said for the other question. I don't want a generic counter, I want it different for each reviewer because I want the reviewer with the highest count

  9. Does an if not review_request.get_draft() fail here sometimes even when it's not None?

    1. I played around with this for a while, I don't think so. It's either the review_request is public and we can access it or its a draft and then we can get it that way

  10. 
      
praiseA
Review request changed

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
praiseA
Review request changed
praiseA
bolariinwa
  1. 
      
  2. suggest_reviewers_extension/README.rst (Diff revision 27)
     
     

    Trailing whitespace here

  3. 
      
praiseA
Review request changed
praiseA
Review request changed
praiseA
Review request changed
praiseA
brennie
  1. 
      
  2. This file is not a model. I'm confused as to its location (and why an extension would have RB models?)

    1. Hi Barret. I was using this script to test my first idea on how to suggest reviewers based on stats. It wouldn't be submitted. I would remove this script right away

  3. This is a class, which isn't intended to contain arbitrary code.

    In Java, everything must be contained in a class, but that is not the case for python. If you are intending for this to be a script you can remove the class and keep everything at top-level.

    1. ohh okay, yes it was intended as a script, I will always keep that in mind from now on. Thanks!

  4. This file is not a model. I'm confused as to its location (and why an extension would have RB models?)

    1. This script was used to retrieve review board reviews so I could use it to test the reliability of the ML model. I will remove this as well now.

  5. reviewboard/reviews/models/reviewers.py (Diff revision 31)
     
     

    This file is not a model. I'm confused as to its location (and why an extension would have RB models?)

  6. Docstrings should be of the format:

    """Single line summary.
    
    Multi-line description.
    """
    
  7. 
      
praiseA
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
praiseA
praiseA
Review request changed
praiseA
praiseA
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
praiseA
praiseA
praiseA
david
Review request changed

Status: Discarded

Loading...