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
Commit:
646a68b3cca782a80d2dc13a941ac8921cd9fa3e
fd379e16b3b56e5dc5088dd192f110aba3eee90b

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
fd379e16b3b56e5dc5088dd192f110aba3eee90b
a0396bb3287bfd442926fa5a6b56fe947f21b669

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
a0396bb3287bfd442926fa5a6b56fe947f21b669
a8b29915c1a37b5742a0520bdbca79959e5d413e

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
a8b29915c1a37b5742a0520bdbca79959e5d413e
c807e0fd31ae4632a6139f4c6ba1108f6d41f5a4

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
c807e0fd31ae4632a6139f4c6ba1108f6d41f5a4
4957f09647642ea073b3b6f26adc625a88f7f877

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
4957f09647642ea073b3b6f26adc625a88f7f877
12baebd145259fdec3520f93b9bb58b61b260d5a

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
12baebd145259fdec3520f93b9bb58b61b260d5a
f2dcb03cc987a49e48293eeba678b05e061d2430

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
praiseA
Review request changed
Commit:
f2dcb03cc987a49e48293eeba678b05e061d2430
f409b45081803b7825903af0930da5f9e261de50

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
f409b45081803b7825903af0930da5f9e261de50
b478a7e96d6671a30339967df067ed346cbd962d

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

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
ad6cf8b15d96ba4b7cfec679342716996b883148
c080c8705c2967ed17f564e4f4b76fe369eebbd1

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

skaefer143
  1. 
      
  2. Show all issues

    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
Commit:
c080c8705c2967ed17f564e4f4b76fe369eebbd1
c8fdc405ea92939982249924393bea428e32dfed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
c8fdc405ea92939982249924393bea428e32dfed
db9a0baf05d98392f766aaa1f1e585fdda646f6a

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
db9a0baf05d98392f766aaa1f1e585fdda646f6a
9caffb57738749a0acfb14ac779098365d278dd7

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
9caffb57738749a0acfb14ac779098365d278dd7
41fe94633963717c17734aa5905232d811855b08

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
41fe94633963717c17734aa5905232d811855b08
ff7ae01b3ae853588a0fd51df1d7e0dba043141a

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
ff7ae01b3ae853588a0fd51df1d7e0dba043141a
4befb7633f32fb472c6f0f0b7cc0a2820cbdd865

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
  1. 
      
  2. Show all issues

    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. Show all issues

    You should add a trailing comma over here

    1. thanks for picking that

  3. Show all issues

    You have some trailing whitespace over here

  4. 
      
praiseA
Review request changed
Commit:
4befb7633f32fb472c6f0f0b7cc0a2820cbdd865
012e3e30b530a22c1bfd6afeccc7b0ce5b63087a

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
012e3e30b530a22c1bfd6afeccc7b0ce5b63087a
c3035ca899ddb27e3e4536ac3b05f6a7583bdf69

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
gojeffcho
  1. 
      
  2. Show all issues

    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. Show all issues

    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. Show all issues

    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)
     
     
    Show all issues

    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. Show all issues

    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. Show all issues

    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. Show all issues

    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. Show all issues

    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
Commit:
7aea0bc11a5f1fe2840c5b95f80ced28bce545c2
6162e080ec777502b7ba603bc736873795bf89de

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

praiseA
Review request changed
Commit:
6162e080ec777502b7ba603bc736873795bf89de
231ad794a18f234122916664eded04a9d5a672dc

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
231ad794a18f234122916664eded04a9d5a672dc
881857ff3572ef7b19212f556e3a7a15377e9a67

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
881857ff3572ef7b19212f556e3a7a15377e9a67
55d854a027b65e44e400fed7a282dd57722dd96b

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

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

    Trailing whitespace here

  3. 
      
praiseA
Review request changed
praiseA
Review request changed
Commit:
e28e6cc3d68767eec6e8a48b6025ae8db379659f
db5450449cb53c8def8d7a3bf2bd9f788970362c

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
db5450449cb53c8def8d7a3bf2bd9f788970362c
d732defd09868d36e1371ce7ebf4572dc9b022ee

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
brennie
  1. 
      
  2. Show all issues

    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. Show all issues

    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. Show all issues

    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)
     
     
    Show all issues

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

  6. Show all issues

    Docstrings should be of the format:

    """Single line summary.
    
    Multi-line description.
    """
    
  7. 
      
praiseA
praiseA
Review request changed
Commit:
bd9416670ba61d7e2ffe3a74e10ee820db6d6331
2665e9b4de3b8de8ef34444ac21f518e1f09b865

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
Review request changed
Commit:
2665e9b4de3b8de8ef34444ac21f518e1f09b865
3766656869d6df48f40ec467080b84c4ded97619

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

praiseA
praiseA
Review request changed
praiseA
praiseA
Review request changed
Commit:
fdfa9b2042f2acd3012d4c1b4837645e05bfe9d5
15c175847366238bce3d5de904e867b85c01f557

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

praiseA
praiseA
praiseA
praiseA
david
Review request changed
Status:
Discarded