[WIP] Get refactoring of LegacyTool, Tool, and Repository to pass all tests

Review Request #9663 — Created Feb. 17, 2018 and discarded

Information

Review Board
master

Reviewers

The code from 2 weeks ago provided an outline of what needed to be
done to refactor the Tool, LegacyTool and the Repository models.
This week, I worked on getting the refactor to pass all test suites.

  • Renamed usages of tool to _legacy_tool
  • Rename entrypoint names to match the names in the tools themselves
  • Use scmtool_name instead of tool field in tests

Code is still WIP, for example how to handle renaming in
RepositoryForm.


 
Description From Last Updated

F401 'reviewboard.scmtools.service.get_scm_tools' imported but unused

reviewbotreviewbot

E501 line too long (85 > 79 characters)

reviewbotreviewbot

F401 'logging' imported but unused

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

E501 line too long (85 > 79 characters)

reviewbotreviewbot

E501 line too long (84 > 79 characters)

reviewbotreviewbot

E501 line too long (84 > 79 characters)

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.Tool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.Tool' imported but unused

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

F401 'reviewboard.scmtools.service.get_scm_tools' imported but unused

reviewbotreviewbot

F401 'logging' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.Tool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.Tool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.Tool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.LegacyTool' imported but unused

reviewbotreviewbot

F401 'reviewboard.scmtools.models.Tool' imported but unused

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

flake8

JT
Review request changed
Summary:
[WIP] Get refactoring of LegacyTool, Tool, and Repository to pass scmtools/tests
[WIP] Get refactoring of LegacyTool, Tool, and Repository to pass all tests
Description:
~  

The code from last week provided an outline of what needed to be done to

~   refactor the Tool, LegacyTool and the Repository models. This week, I
~   worked on getting the refactor to pass the tests in scmtools/tests

  ~

The code from 2 weeks ago provided an outline of what needed to be

  ~ done to refactor the Tool, LegacyTool and the Repository models.
  ~ This week, I worked on getting the refactor to pass all test suites.

   
   
  • Renamed usages of tool to _legacy_tool
   
  • Rename entrypoint names to match the names in the tools themselves
~  
  • Use classmethod to create a Tool
  ~
  • Use scmtool_name instead of tool field in tests
   
~  

Code is still WIP, many tests from RepositoryForm are still failing

  ~

Code is still WIP, for example how to handle renaming in

  + RepositoryForm.

Testing Done:
-  

Existing tests in scmtools/tests

Commit:
d39c72654af3916b7294e39a9cdfb1ce43ad38e9
f45fa5b01253dda89c9abe089a171948a0e73da5

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

JT
Review request changed
Status:
Discarded