Add new base classes and mixins for defining tools.

Review Request #11525 — Created March 15, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

Historically, tools have been a subclass of reviewbot.tools.Tool. We
later added a second base class, reviewbot.tools.RepositoryTool, for
tools that needed a full repository checkout. The fact that that
capability was a base class, and not a mixin, made it hard to introduce
any new base classes, which an upcoming change will do.

To prepare for that, and to keep things organized, a new
reviewbot.tools.base module has been created, with provides
reviewbot.tools.base.tool.BaseTool and
reviewbot.tools.base.mixins.FullRepositoryToolMixin. These are aliased
into reviewbot.tools.base, for convenience.

No tools have been updated yet for this change. Some further work will
be done on the base classes first. Tool updates will come in a series of
changes after this has been completed.

Unit tests pass.

Ran the worker and verified it was able to scan tools and check
dependencies.

Summary ID
Add new base classes and mixins for defining tools.
Historically, tools have been a subclass of `reviewbot.tools.Tool`. We later added a second base class, `reviewbot.tools.RepositoryTool`, for tools that needed a full repository checkout. The fact that that capability was a base class, and not a mixin, made it hard to introduce any new base classes, which an upcoming change will do. To prepare for that, and to keep things organized, a new `reviewbot.tools.base` module has been created, with provides `reviewbot.tools.base.tool.BaseTool` and `reviewbot.tools.base.mixins.FullRepositoryToolMixin`. These are aliased into `reviewbot.tools.base`, for convenience. No tools have been updated yet for this change. Some further work will be done on the base classes first. Tool updates will come in a series of changes after this has been completed.
ed72f9450e047b1854f998657cbf0695a49592f6
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (aaa83c0)